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, vote on token listings, 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 (Ethereum Sepolia on testnet) | 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, staked 7N7D, pending USDC rewards)
7n7d balance 0xYourAddress
# Stake 7N7D and check your rewards (Ethereum Sepolia, ProfitDistributor v2)
7n7d stake 1000
7n7d rewards 0xYourAddress
# On-chain governance
7n7d governance pairs
7n7d governance vote 7 for
# Chat with the AI agent
7n7d chat "What is the current market outlook?"
:::caution Published CLI 0.2.0 stakes on Arbitrum Sepolia
@7n7d/cli 0.2.0, the release currently on npm and Homebrew, depends on @7n7d/sdk 0.2.0. Its testnet is Arbitrum Sepolia, so 7n7d stake, rewards and governance there use the retired Arbitrum Sepolia contracts, and deposit and withdraw target the retired V1 vault. Do not use them. The Ethereum Sepolia staking (ProfitDistributor v2) and no-vault behaviour shown here are in the repository source and ship in the next release (0.3.0).
:::
:::note No vault commands on testnet yet
The V1 vault on Arbitrum Sepolia was retired on 2026-11-25 and Vault V2 (HyperEVM, chain 998) is not deployed yet. On testnet, 7n7d deposit, 7n7d withdraw and 7n7d delegate-deposit exit with an error and send nothing, 7n7d status shows the share price and TVL as N/A, and 7n7d balance shows vault shares as n/a. They work again once Vault V2 is configured. See Commands.
:::
All commands support --json for machine-readable output.
Next Steps
- Commands Reference — Full command documentation
- SDK Overview — Use the SDK programmatically