Skip to main content

CLI Getting Started

The 7n7d CLI lets you interact with the 7N7D protocol from your terminal — check vault status, manage positions, stake tokens, and chat with the AI agent.

Installation

npm install -g @7n7d/cli
note

The CLI package is not yet published to npm. For now, build from source:

git clone https://github.com/byennen-team/7N7D.git
cd 7N7D
npm install
npm run build -w packages/cli
npm link -w packages/cli

Configuration

The CLI needs an API key and (optionally) a private key for on-chain transactions.

Environment Variables

VariableRequiredDescription
SEVEN_N_SEVEN_D_API_KEYYesAPI key for the 7N7D API
SEVEN_N_SEVEN_D_API_URLNoCustom API URL (defaults to production)
SEVEN_N_SEVEN_D_RPC_URLNoArbitrum RPC endpoint
SEVEN_N_SEVEN_D_PRIVATE_KEYFor transactionsWallet private key
SEVEN_N_SEVEN_D_NETWORKNotestnet or mainnet (default: testnet)

Config File

Alternatively, create ~/.7n7d/config.json:

{
"apiKey": "your-api-key",
"apiUrl": "https://api.7n7d.com",
"rpcUrl": "https://arb1.arbitrum.io/rpc",
"privateKey": "0x...",
"network": "testnet"
}

Environment variables take precedence over the config file.

Quick Start

# Check vault and agent status
7n7d status

# View open trading positions
7n7d positions

# Check balances for an address
7n7d balance 0xYourAddress

# Chat with the AI agent
7n7d chat "What's your current strategy?"

All commands support --json for machine-readable output.

Next Steps