cara CLI Guide

This page is command-reference-first: subcommands, key flags, and CLI-specific behavior that is easy to miss from --help.

For first-run walkthroughs and channel onboarding:

Command Reference

cara / cara start

Starts the Carapace service (default when no subcommand is given).

cara config

Manage configuration values.

cara setup

Interactive first-run wizard for provider/auth/network/channel setup.

Wizard outcomes include local-chat, discord, telegram, and hooks. Use --force to overwrite an existing config file. For the full setup flow and decision guidance, use First Run.

cara verify

Run first-run outcome checks with pass/fail output and next-step guidance.

cara verify --outcome auto --port 18789

Autonomy scenario:

cara verify --outcome autonomy --port 18789

Outcomes:

Options:

Notes:

cara status

Health/status check via HTTP.

cara status --port 18789

cara logs

Fetch log lines via WebSocket (logs.tail).

cara logs -n 50 --port 18789

cara logs is a snapshot tail request (not a persistent follow stream).

Remote hosts require TLS or explicit plaintext opt-in:

cara chat

Start an interactive chat REPL (chat.send over WebSocket).

cara chat

Options:

REPL commands:

cara pair

Pair this CLI with a Carapace service.

cara pair https://gateway.local:3001 --name "My CLI" --trust

Notes:

cara backup / cara restore

Create or restore a backup archive of Carapace state.

cara reset

Remove state data categories. Use --all or explicit flags plus --force.

cara update

Check for or install updates from GitHub releases.

cara version

Print version/build info.

cara tls

Manage cluster CA and node certificates:

Authentication Inputs

The CLI resolves auth inputs in this order:

  1. Environment: CARAPACE_GATEWAY_TOKEN / CARAPACE_GATEWAY_PASSWORD
  2. Config file: gateway.auth.token / gateway.auth.password
  3. OS credential store (Keychain / Secret Service / Credential Manager)

If none are found, local-direct access may still work when configured.

Device Identity (CLI)

The CLI creates a device identity for WebSocket access:

Strict mode to disallow legacy fallback:

Strict mode behavior:

State Directory

Default: platform config directory (for example ~/.config/carapace/ on Linux).

Override with:

Common Snippets

Tail logs over TLS (self-signed service cert):

cara logs --host gateway.local --port 3001 --tls --trust -n 200

Allow plaintext logs (unsafe):

cara logs --host 10.0.0.12 --port 18789 --allow-plaintext

Pair with a remote Carapace service:

CARAPACE_GATEWAY_TOKEN=... cara pair https://gateway.local:3001 --name "Ops CLI" --trust

Start a fresh local chat session:

cara chat --new