CLI

The agent, in your shell

The Vectr CLI gives you the agent, prices and token data from your terminal. Ask questions, script the answers, pipe them into anything that runs a command.

  • 4Commands
  • 18+Node
  • MITLicense
  • macOSSupported
  • LinuxSupported
  • WindowsSupported

Get started in minutes

Three steps and you’re in.

1

Install it

Grab the CLI with your package manager, or build it from source.

npm install -g @vectr/cli

The package publishes at launch. Until then, use the Source tab.

2

Get a key

Create an API key on your profile. It is shown once — save it somewhere safe.

Profile → API keys

Keys act as your wallet, fenced in by the rules on your Security tab.

3

Log in and ask

Point the CLI at the backend once, then talk to the agent.

vectr login --key YOUR_KEY
# then ask it something
vectr agent "top tokens?"

Explore the commands

Four commands. That’s the whole surface.

Full reference

Installation

Node 18 or newer, on macOS, Linux or Windows.

Pick a method

Every method installs the same vectr binary.

npm install -g @vectr/cli

The package publishes at launch. Until then, use the Source tab.

Check it worked

--help lists the commands. Neither of these touches the network.

vectr --version
vectr --help

No install needed for a one-off, once the package is live:

npx @vectr/cli agent "what is trending?"

Authentication

price and tokens read public data and need no key. Anything that reaches the agent does.

The CLI sends your key as an X-API-Key header on every request. Create one on your profile, save it locally, and point the CLI at the backend — it defaults to localhost.

  1. 1Open Profile → API keys and create a key. The full value is shown once; only a preview is stored for display.
  2. 2Save it: vectr login --key vectr_xxxx --url https://api.vectr.bot
  3. 3Ask the agent something. The key resolves to your wallet server-side, so you never pass an address.
Treat it like a private key

A key acts as your wallet. Keep it out of git and revoke it the moment it leaks.

  • Read-only keys can query but never move funds.
  • IP allowlists are checked before any endpoint logic.
  • Recipient allowlists cap where funds can go.
  • Revoking is instant — the key stops validating.

Commands

Signatures, flags and what each one prints.

vectr agent

vectr agent <prompt> [--json] [--model <id>]

API key

Opens a job, polls it until it settles, then prints the answer. Trades come back as a prepared transaction instead of a receipt.

--json
Print the raw job object instead of formatted text
--model <id>
Override the model for this turn
vectr agent
vectr agent "what tokens are trending?"
Thinking...
MOON leads the curve at $0.0843, up 34% today.
AGENT and PULSE follow, both graduated this week.

vectr price

vectr price

No key

USD price of the chain's native coin. Labelled with whatever symbol the backend reports, so it follows the chain.

vectr price
vectr price
ETH $4,182.40

vectr tokens

vectr tokens [-n <limit>] [--search <query>]

No key

Top tokens by market cap, or a name and symbol search. Graduated tokens are tagged in the output.

-n, --limit <n>
How many rows to print (default 10)
--search <query>
Filter by name or symbol instead of ranking
vectr tokens
vectr tokens -n 3
# Symbol Price (USD) Name
1 MOON $0.0843 Moonshot [graduated]
2 AGENT $0.0312 Agent Coin
3 PULSE $0.0129 Pulse

vectr login

vectr login --key <key> [--url <url>]

Local

Writes the key to the local config. Run it again to swap keys or point the CLI at a different backend.

-k, --key <key>
API key from your profile — always starts with vectr_
--url <url>
Backend base URL (default http://localhost:3001)
vectr login
vectr login --key vectr_xxxx --url https://api.vectr.bot
Logged in.

Examples

The agent is a command, so it composes like one.

Ask in plain language

Anything the terminal understands works here too.

vectr agent "what is my portfolio worth?"
vectr agent "top 5 tokens by market cap"
vectr agent "who launched MOON?"

Pipe it somewhere

--json prints the whole job object. Commands exit non-zero when a job fails.

vectr agent "top 3 by mcap" --json | jq -r .response
vectr tokens -n 50 > snapshot.txt
# cron: log the native price every hour
vectr price >> prices.log

Configuration

One JSON file, written by vectr login.

Config file
~/.vectr/config.json
Auth header
X-API-Key
Key prefix
vectr_
Default API URL
http://localhost:3001
Node
>=18

Edit the file directly or re-run vectr login. Switching environments is a matter of swapping the key and URL together, since keys are per backend.

cat ~/.vectr/config.json
{
  "apiKey": "vectr_...",
  "apiUrl": "https://api.vectr.bot"
}

Troubleshooting

Every error the CLI can print, and what it means.

  • Not logged in. Run: vectr login --key <your-api-key>

    No key in the config. Create one on your profile, then run vectr login. Only agent needs it — price and tokens do not.

  • Invalid key format — keys start with vectr_

    The key was mistyped or truncated. Copy it again from the API keys tab; it is only shown once, so create a fresh one if it is lost.

  • 401: X-API-Key header required

    The CLI reached the backend without a key. Usually means the config was written to a different home directory than the one the shell is using.

  • 401: Invalid or revoked API key

    The key was revoked, or it belongs to a different backend than the one in --url. Keys are per environment.

  • 403: IP <address> is not in this key's allowlist

    The key has an IP allowlist that does not include this machine. Edit it on the Security tab of your profile.

  • fetch failed / ECONNREFUSED 127.0.0.1:3001

    The CLI defaults to localhost. Point it at the real backend: vectr login --key vectr_xxxx --url https://api.vectr.bot

  • 403: Not your job

    The job id belongs to another wallet. Each key can only read jobs it created.

Ready to build?

The CLI and the MCP server hit the same endpoints, with the same guardrails.

See every surface