cdp-docs-cli
v1.0.1
Published
CLI tool to set up CDP (Coinbase Developer Platform) documentation and integration in your project
Maintainers
Readme
🚀 CDP Docs CLI
A CLI tool to quickly set up Coinbase Developer Platform (CDP) documentation and integration in your Node.js projects.
📦 Installation
Global Installation (Recommended)
npm install -g cdp-docs-cliUsing npx (No Installation Required)
# Install globally first, then use commands
npm install -g cdp-docs-cli
cdp-setup🎯 What This Package Does
When you install and run this CLI tool, it will:
- 📁 Create Documentation Structure: Sets up a
/doc/cdp/directory in your project - 📖 Copy Documentation: Adds comprehensive CDP wallet API documentation
- 🔧 Integration Guides: Provides step-by-step setup and integration guides
- 📦 Install Dependencies: Optionally installs required CDP packages
- 🔐 Environment Setup: Creates environment file templates with CDP credentials
🚀 Quick Start
Interactive Setup (Recommended)
# Install globally first
npm install -g cdp-docs-cli
# Then run interactive setup
cdp-setupThis will guide you through:
- Setting up documentation
- Installing CDP dependencies
- Creating environment templates
- Configuring your project
Manual Setup
# Install globally first
npm install -g cdp-docs-cli
# Setup documentation only
cdp-docs setup
# List available documentation
cdp-docs list
# Setup with custom path
cdp-docs setup --path ./docs/coinbase
# Force overwrite existing files
cdp-docs setup --force📁 Generated Directory Structure
After running the setup, your project will have:
your-project/
├── doc/
│ └── cdp/
│ ├── wallet/ # Wallet API documentation
│ │ ├── wallet-start.md
│ │ ├── fund.md
│ │ ├── transfer.md
│ │ ├── managing-accounts.md
│ │ ├── policies.md
│ │ ├── importing.md
│ │ ├── exporting.md
│ │ └── wallet-accounts.md
│ ├── integration/ # Integration guides
│ │ ├── SETUP-CDP-WALLET.md
│ │ ├── INTEGRATION-SUMMARY.md
│ │ ├── cdp-wallet.md
│ │ ├── context.md
│ │ └── directory.md
│ └── examples/ # Code examples (future)
├── .env.local.example # Environment template
└── package.json # Updated with CDP dependencies🔧 Dependencies Installed
The CLI will optionally install these packages:
Runtime Dependencies
@coinbase/cdp-sdk- Official Coinbase Developer Platform SDKdotenv- Environment variable managementviem- Ethereum interaction library
Dev Dependencies
@types/node- Node.js TypeScript definitions
🔐 Environment Setup
The tool creates a .env.local.example file with the required CDP configuration:
# CDP (Coinbase Developer Platform) Configuration
# Get these values from https://portal.cdp.coinbase.com/
# Your CDP API credentials
CDP_API_KEY_ID=your_actual_key_id_here
CDP_API_KEY_SECRET=your_actual_key_secret_here
CDP_WALLET_SECRET=your_actual_wallet_secret_here
# Network configuration (optional)
# CDP_NETWORK_ID=base-sepolia # Use base-sepolia for testing, base-mainnet for production📚 Available Commands
cdp-docs
Main documentation management command:
cdp-docs setup [options] # Setup CDP documentation
cdp-docs list # List available documentation
cdp-docs --help # Show helpOptions:
-f, --force- Overwrite existing files-p, --path <path>- Custom documentation path (default: ./doc/cdp)
cdp-setup
Interactive setup wizard:
cdp-setup # Run interactive setup🏗️ Integration Guide
After running the setup:
Get CDP Credentials:
- Visit https://portal.cdp.coinbase.com/
- Create API keys and wallet secret
Configure Environment:
cp .env.local.example .env.local # Edit .env.local with your actual credentialsReview Documentation:
- Read
./doc/cdp/integration/SETUP-CDP-WALLET.md - Follow
./doc/cdp/integration/INTEGRATION-SUMMARY.md
- Read
Start Building:
- Use the wallet API documentation in
./doc/cdp/wallet/ - Implement CDP features in your application
- Use the wallet API documentation in
🌟 Features
📖 Comprehensive Documentation
- Complete wallet API v2 documentation
- Step-by-step integration guides
- Security best practices
- Troubleshooting guides
🛠️ Developer Experience
- Interactive CLI setup
- Automatic dependency management
- Environment template generation
- Force overwrite options
🔒 Security First
- Environment variable management
- Private key handling best practices
- Testnet-first development approach
🌐 Multi-Network Support
Documentation covers:
- Base (Layer 2 Ethereum)
- Ethereum (Mainnet & Testnets)
- Solana (Mainnet & Devnet)
📋 Requirements
- Node.js: 16.0.0 or higher
- npm: 7.0.0 or higher
- Operating System: macOS, Linux, Windows
🤝 Contributing
This package is maintained by must-be-ash.
📄 License
MIT
🆘 Support
- NPM Package: https://www.npmjs.com/package/cdp-docs-cli
- CDP Documentation: https://docs.cdp.coinbase.com/
- Base Network: https://base.org/
- Issues: GitHub Issues
🔄 Version History
1.0.0
- Initial release
- CDP documentation setup
- Interactive CLI
- Dependency management
- Environment templates
Built with ❤️ for the CDP developer community
