Skip to main content

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

VariableDescriptionRequired
SEVEN_N_SEVEN_D_API_KEYAPI key for the 7N7D REST APIYes
SEVEN_N_SEVEN_D_API_URLOverride API URLNo
SEVEN_N_SEVEN_D_RPC_URLOverride RPC endpointNo
SEVEN_N_SEVEN_D_PRIVATE_KEYPrivate key for on-chain transactionsFor tx
SEVEN_N_SEVEN_D_NETWORKNetwork: testnet or mainnetNo

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