Overview
Install the CLI and authenticate it.
CodeSpar CLI
@codespar/cliv0.5.5The 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/cliVerify the install:
codespar --versionIf 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 loginThe 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