Skip to main content
The Snack Money CLI can be installed in multiple ways. Choose the method that works best for your workflow. The simplest way to use the CLI is with npx - no installation required:
This automatically downloads and runs the latest version. Perfect for:
  • One-time usage
  • Quick testing
  • CI/CD pipelines
  • Avoiding global installs

Example Usage

npm Global Installation

Install globally with npm to use the snackmoney command directly:
After installation, you can run commands without npx:

Updating

Keep the CLI up to date:

Uninstalling

Remove the global installation:

Homebrew (macOS/Linux)

Install via Homebrew for system-level package management:
After installation:

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):
For Solana (SVM):
Important Security Notes:
  • Never commit private keys to version control
  • Use environment variables or .env files
  • 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
You can check your balance at:

Environment Setup

Create a .env file in your project directory:
The CLI will automatically load variables from .env files in the current directory.

Verifying Installation

Test your installation:
Expected output:

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:
  1. Quick Start - Send your first payment
  2. Commands - Learn all available commands
  3. View on GitHub - Source code and examples