CLI tool to set up CDP (Coinbase Developer Platform) documentation and integration in your project
npm install cdp-docs-cliA CLI tool to quickly set up Coinbase Developer Platform (CDP) documentation and integration in your Node.js projects.
bash
npm install -g cdp-docs-cli
`$3
`bash
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:
1. š Create Documentation Structure: Sets up a
/doc/cdp/ directory in your project
2. š Copy Documentation: Adds comprehensive CDP wallet API documentation
3. š§ Integration Guides: Provides step-by-step setup and integration guides
4. š¦ Install Dependencies: Optionally installs required CDP packages
5. š Environment Setup: Creates environment file templates with CDP credentialsš Quick Start
$3
`bash
Install globally first
npm install -g cdp-docs-cliThen run interactive setup
cdp-setup
`This will guide you through:
- Setting up documentation
- Installing CDP dependencies
- Creating environment templates
- Configuring your project
$3
`bash
Install globally first
npm install -g cdp-docs-cliSetup documentation only
cdp-docs setupList available documentation
cdp-docs listSetup with custom path
cdp-docs setup --path ./docs/coinbaseForce 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:
$3
- @coinbase/cdp-sdk - Official Coinbase Developer Platform SDK
- dotenv - Environment variable management
- viem - Ethereum interaction library$3
- @types/node - Node.js TypeScript definitionsš Environment Setup
The tool creates a
.env.local.example file with the required CDP configuration:`bash
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_hereNetwork configuration (optional)
CDP_NETWORK_ID=base-sepolia # Use base-sepolia for testing, base-mainnet for production
`š Available Commands
$3
Main documentation management command:`bash
cdp-docs setup [options] # Setup CDP documentation
cdp-docs list # List available documentation
cdp-docs --help # Show help
`#### Options:
-
-f, --force - Overwrite existing files
- -p, --path - Custom documentation path (default: ./doc/cdp)$3
Interactive setup wizard:`bash
cdp-setup # Run interactive setup
`šļø Integration Guide
After running the setup:
1. Get CDP Credentials:
- Visit https://portal.cdp.coinbase.com/
- Create API keys and wallet secret
2. Configure Environment:
`bash
cp .env.local.example .env.local
# Edit .env.local with your actual credentials
`3. Review Documentation:
- Read
./doc/cdp/integration/SETUP-CDP-WALLET.md
- Follow ./doc/cdp/integration/INTEGRATION-SUMMARY.md4. Start Building:
- Use the wallet API documentation in
./doc/cdp/wallet/`- Node.js: 16.0.0 or higher
- npm: 7.0.0 or higher
- Operating System: macOS, Linux, Windows
This package is maintained by must-be-ash.
MIT
- 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
---
Built with ā¤ļø for the CDP developer community