
netpad cli
一个用于管理 NetPad 插件和工作流的专业命令行工具。
Repository Info
About This Server
一个用于管理 NetPad 插件和工作流的专业命令行工具。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
NetPad CLI 🚀
A professional CLI tool for managing NetPad plugins, workflows, and more.
Features
- 🔌 Plugin Management - Create, publish, and list NetPad plugins
- 🔐 Authentication - OAuth2 device code flow with Google/GitHub
- 📦 Scaffolding - Multiple plugin templates (basic, API, database, transformer)
- ✅ Validation - Comprehensive plugin validation and testing
- 🌐 Multi-Instance - Support for SaaS and self-hosted NetPad instances
Installation
# Install globally via npm
npm install -g netpad-cli
# Verify installation
netpad-cli --version
Quick Start
# Authenticate with NetPad
netpad-cli login --google
# Create a new plugin
netpad-cli plugin create my-awesome-plugin
# Validate plugin (dry run)
netpad-cli plugin publish --dry-run
# Publish to NetPad
netpad-cli plugin publish
# List available plugins
netpad-cli plugin list
Commands
Plugin Management
netpad-cli plugin create <name> # Scaffold a new plugin
netpad-cli plugin publish [path] # Publish a plugin
netpad-cli plugin publish --dry-run # Validate without publishing
netpad-cli plugin list # List available plugins
netpad-cli plugin list --scope public # Filter by scope
Authentication
netpad-cli login # Interactive login
netpad-cli login --google # Google OAuth
netpad-cli login --github # GitHub OAuth
netpad-cli logout # Clear credentials
netpad-cli whoami # Show auth status
Other Commands
netpad-cli status # NetPad instance status
netpad-cli help # Show all commands
Authentication
NetPad CLI uses OAuth2 Device Code Flow for secure authentication:
- Run login command:
netpad-cli login --google - Visit verification URL: CLI opens browser automatically
- Enter device code: Complete OAuth in browser
- CLI receives token: Stored securely in
~/.netpadrc
Supports Google OAuth, GitHub OAuth, and email/password authentication.
Plugin Development
Create Plugin
# Interactive creation
netpad-cli plugin create my-plugin
# Choose from templates:
# - Basic: Simple data processing
# - API: External API integration
# - Database: Database connectivity
# - Transformer: Data transformation
Plugin Structure
my-plugin/
├── manifest.json # Plugin metadata
├── package.json # Node.js dependencies
├── src/
│ ├── runner.js # Plugin execution logic
│ ├── shape.js # UI component definition
│ └── icon.svg # Plugin icon
├── tests/
│ └── runner.test.js # Unit tests
└── README.md # Documentation
Publishing
# Validate plugin
netpad-cli plugin publish --dry-run
# Publish to NetPad
netpad-cli plugin publish
# Check status
netpad-cli plugin list --scope private
Configuration
The CLI stores configuration in ~/.netpadrc:
{
"apiKey": "mcp_your_api_key_here",
"baseUrl": "https://netpad.io"
}
Requirements
- Node.js: >=16.0.0
- NetPad Instance: Compatible with NetPad v2.0+
- Authentication: Valid NetPad account
Examples
Example 1: Create and Publish Plugin
# Create plugin
netpad-cli plugin create url-shortener
# Edit plugin files
cd url-shortener
# ... implement your logic ...
# Test and publish
netpad-cli plugin publish --dry-run
netpad-cli plugin publish
Example 2: Different NetPad Instance
# Login to custom instance
netpad-cli login --url https://my-netpad.company.com
# Create and publish
netpad-cli plugin create company-plugin
netpad-cli plugin publish
Troubleshooting
Common Issues
Authentication Failed
# Check auth status
netpad-cli whoami
# Re-authenticate
netpad-cli login --google
Plugin Validation Errors
# Check detailed validation
netpad-cli plugin publish --dry-run
# Common fixes:
# - Ensure manifest.json is valid
# - Check all required files exist
# - Verify plugin name format
Connection Issues
# Check NetPad status
netpad-cli status
# Verify URL and connectivity
netpad-cli login --url https://your-netpad-instance.com
Development
Local Development
# Clone repository
git clone https://github.com/mrlynn/netpad-cli.git
cd netpad-cli
# Install dependencies
npm install
# Run locally
node bin/netpad-cli.js --help
# Run tests
npm test
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Add tests for new functionality
- Run tests:
npm test - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
Links
- GitHub: https://github.com/mrlynn/netpad-cli
- npm Package: https://www.npmjs.com/package/netpad-cli
- NetPad: https://netpad.io
- Issues: Report bugs and request features
License
MIT License - see LICENSE file for details.
Author
NetPad Team - team@netpad.io
🚀 Build amazing NetPad plugins with ease!
Quick Start
Clone the repository
git clone https://github.com/mrlynn/netpad-cliInstall dependencies
cd netpad-cli
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.