npx (Recommended)
The simplest way to use the CLI is with npx - no installation required:- One-time usage
- Quick testing
- CI/CD pipelines
- Avoiding global installs
Example Usage
npm Global Installation
Install globally with npm to use thesnackmoney command directly:
npx:
Updating
Keep the CLI up to date:Uninstalling
Remove the global installation:Homebrew (macOS/Linux)
Install via Homebrew for system-level package management:Updating
Uninstalling
Prerequisites
Regardless of installation method, you need:1. Node.js
- Version: Node.js 20 or higher
- Check version:
node --version - Install: nodejs.org or use nvm
2. Private Key
You need a private key for the blockchain network you want to use: For Base (EVM):- Never commit private keys to version control
- Use environment variables or
.envfiles - Keep your keys secure and backed up
- Only fund with amounts you’re willing to use
3. USDC Balance
Ensure your wallet has sufficient USDC on the network you’re using:- Base: USDC on Base mainnet
- Solana: USDC on Solana mainnet
- Base: BaseScan
- Solana: Solana Explorer
Environment Setup
Create a.env file in your project directory:
.env files in the current directory.
Verifying Installation
Test your installation:Troubleshooting
”command not found: snackmoney”
If using global installation, ensure npm global bin is in your PATH:Permission Errors (macOS/Linux)
If you encounter permission errors with global npm install:Node Version Issues
If you have an older Node.js version:Next Steps
Now that you have the CLI installed:- Quick Start - Send your first payment
- Commands - Learn all available commands
- View on GitHub - Source code and examples