Skip to main content

Prerequisites

  • Node.js 18 or higher
  • A Cavos account with an active session (from the Dashboard)

Installation

From Source

Clone and build the CLI from the repository:
# Clone the repository
git clone https://github.com/cavos-labs/cavos.git
cd cavos/cli

# Install dependencies
npm install

# Build the CLI
npm run build

# Link globally (optional)
npm link

Verify Installation

cavos --version

Configuration

The Cavos CLI requires a session token exported from your dashboard. There are two ways to provide it: Set the CAVOS_TOKEN environment variable:
export CAVOS_TOKEN="<base64_session_token>"

# Now run any command
cavos whoami
cavos balance
[!TIP] Add export CAVOS_TOKEN="..." to your ~/.bashrc or ~/.zshrc for persistence.

Option 2: Import Session File

Import the session token once, and it will be saved locally:
cavos session import <base64_session_token>

# Session is now saved
cavos whoami

Getting a Session Token

  1. Go to the Cavos Dashboard
  2. Navigate to SettingsSessions
  3. Click “Export Session for CLI”
  4. Copy the base64 token
  5. Set it as CAVOS_TOKEN or import it using cavos session import
[!IMPORTANT] The session token contains your session private key. Never share it publicly or commit it to version control.

Network Configuration

The CLI operates exclusively on Starknet Mainnet. All transactions and queries are executed against the public Mainnet RPC.

Next Steps