CLI Overview
The 7n7d CLI lets you interact with the 7N7D protocol from the command line — check vault status, manage deposits and withdrawals, stake tokens, and chat with the AI agent.
Installation
npm install -g @7n7d/cli
Configuration
The CLI reads configuration from environment variables or ~/.7n7d/config.json.
Environment Variables
| Variable | Description | Required |
|---|---|---|
SEVEN_N_SEVEN_D_API_KEY | API key for the 7N7D REST API | Yes |
SEVEN_N_SEVEN_D_API_URL | Override API URL | No |
SEVEN_N_SEVEN_D_RPC_URL | Override RPC endpoint | No |
SEVEN_N_SEVEN_D_PRIVATE_KEY | Private key for on-chain transactions | For tx |
SEVEN_N_SEVEN_D_NETWORK | Network: testnet or mainnet | No |
Config File
Create ~/.7n7d/config.json:
{
"apiKey": "your-api-key",
"network": "testnet",
"privateKey": "0x..."
}
Environment variables take precedence over the config file.
Quick Start
# Check vault and agent status
7n7d status
# View open positions
7n7d positions
# Check your balances
7n7d balance
# Deposit 1000 USDC into the vault
7n7d deposit 1000
# Chat with the AI agent
7n7d chat "What is the current market outlook?"
All commands support --json for machine-readable output.
Next Steps
- Commands Reference — Full command documentation
- SDK Overview — Use the SDK programmatically