Skip to main content

Overview

Install the CLI and authenticate it.

1 min read
View MarkdownEdit on GitHub

CodeSpar CLI

@codespar/cliv0.5.5

The codespar CLI lets you interact with the CodeSpar platform directly from your terminal. Use it to authenticate, inspect servers and tools, execute one-off tool calls, manage per-user connections, and scaffold new agents.

The CLI is the fastest way to explore the server catalog, run smoke tests, and debug production sessions — no frontend or SDK integration required.

Install

npm install -g @codespar/cli

Verify the install:

codespar --version

If codespar: command not found after install, make sure your global npm bin directory is on your $PATH. Run npm config get prefix to check.

Authenticate

Log in with your CodeSpar API key — you only do this once per machine:

codespar login

The CLI opens a browser window for you to authorize, then stores a session token at ~/.codespar/config.json. All subsequent commands use that token.

Alternatively, authenticate non-interactively with an API key (useful in CI):

export CODESPAR_API_KEY=csk_live_...
codespar whoami
Overview | CodeSpar