@nevermined-io/cli
v1.13.0
Published
CLI for Nevermined Payments SDK
Downloads
822
Readme
Nevermined Payments CLI
Official command-line interface for the Nevermined Payments SDK.
Installation
Via npm (global)
npm install -g @nevermined-io/cliVia npx (no installation)
npx @nevermined-io/cli <command>From source
git clone https://github.com/nevermined-io/payments
cd payments/cli
pnpm install
pnpm build
./bin/run.js --helpQuick Start
1. Initialize Configuration
nevermined config initThis will prompt you for:
- Your Nevermined API key
- Target environment (sandbox, live)
Configuration is saved to ~/.config/nvm/config.json.
2. List Plans
nevermined plans get-plans3. Get Plan Details
nevermined plans get-plan did:nvm:abc1234. Get X402 Access Token
nevermined x402token get-x402-access-token did:nvm:plan123Usage
nevermined [COMMAND]
TOPICS
agents Manage AI agents
config Manage CLI configuration
plans Manage payment plans
x402 X402 protocol operations
COMMANDS
help Display help for neverminedConfiguration
Using Environment Variables
Instead of nevermined config init, you can set environment variables:
export NVM_API_KEY=nvm-your-api-key
export NVM_ENVIRONMENT=sandboxUsing Configuration Profiles
Support for multiple profiles:
# Initialize a production profile
nevermined config init --profile production
# Use a specific profile
nevermined plans get-plans --profile production
# Show all profiles
nevermined config show --allOutput Formats
All commands support multiple output formats:
# Table format (default)
nevermined plans get-plans
# JSON format
nevermined plans get-plans --format json
# Quiet mode (no output, useful for scripts)
nevermined plans get-plans --format quietCommands
Configuration Commands
nevermined config init- Initialize CLI configurationnevermined config show- Display current configurationnevermined config set <key> <value>- Set a configuration value
Plan Commands
nevermined plans get-plans- List all payment plansnevermined plans get-plan <planId>- Get details of a specific plannevermined plans get-plan-balance <planId>- Get plan balance for a subscribernevermined plans register-plan- Register a new payment plan (flexible)nevermined plans register-credits-plan- Register a credits-based plannevermined plans register-time-plan- Register a time-based plannevermined plans register-credits-trial-plan- Register a trial credits plannevermined plans register-time-trial-plan- Register a trial time plan
Agent Commands
nevermined agents get-agent <agentId>- Get details of a specific agentnevermined agents get-agent-plans <agentId>- Get plans associated with an agentnevermined agents register-agent- Register a new AI agentnevermined agents register-agent-and-plan- Register an agent with a plannevermined agents add-plan-to-agent <planId>- Associate a plan with an agentnevermined agents remove-plan-from-agent <planId>- Remove a plan from an agentnevermined agents update-agent-metadata <agentId>- Update agent metadata
X402 Commands
nevermined x402token get-x402-access-token <planId>- Get an X402 access token for a plan
Examples
Register a Plan and Agent
# Initialize config
nevermined config init
# Get X402 token for a plan
nevermined x402token get-x402-access-token did:nvm:abc123 --format json
# Get plan details
nevermined plans get-plan did:nvm:abc123Using JSON Config Files
# Register plan from JSON config
nevermined plans register-plan --config plan-config.json
# Register agent from JSON config
nevermined agents register-agent did:nvm:plan123 --config agent-config.jsonDevelopment
Building
pnpm buildTesting
pnpm testLinting
pnpm lintLicense
Apache-2.0
