Skip to main content
synti-cli is the terminal client for Synti. It connects over WebSocket (ws:// or wss://) to a running headless server and lets you list workspaces, drive sessions, and stream agent responses from scripts and CI.
For a gentler, task-oriented walkthrough of connecting the client, see CLI Client. This page is the exhaustive flag reference.

Prerequisites

  • Bun runtime installed.
  • For run and --validate-server: an API key via --api-key, $LLM_API_KEY, or a provider-specific variable (e.g. $ANTHROPIC_API_KEY).
  • For every other command: a running Synti headless server with a URL and token.

Installation

Quick start

The fastest way to try it — no server setup needed. The run command spawns its own server:

Connection options

Flags take precedence over environment variables. If --workspace is omitted, the CLI auto-detects the first available workspace.

Commands

Info & health

Resource listing

Session operations

Send a message (streaming)

The send command subscribes to session events and streams them to stdout:
  • text_delta — text streamed inline
  • tool_start[tool: name] marker
  • tool_result — tool output (truncated to 200 chars)
  • error — printed to stderr, exit code 1
  • complete — exit code 0
  • interrupted — exit code 130

Power user

Examples:

Run (self-contained)

The run command is fully self-contained — it spawns a headless server, creates a session, sends the prompt, streams the response, and exits. No separate server setup needed. An API key is resolved from --api-key, $LLM_API_KEY, or a provider-specific variable (e.g. $ANTHROPIC_API_KEY, $OPENAI_API_KEY). LLM configuration:
The prompt can also be piped via stdin:

Validate server

When no --url is provided, --validate-server automatically spawns a local headless server (the same way run does), runs the validation, and shuts it down. It exercises a full server-lifecycle integration test — connect/handshake, credential health check, workspace and session listing, message streaming, tool use, and temporary source and skill creation — cleaning up every resource it creates on completion. Use --json for machine-readable output.
--validate-server mutates workspace state while it runs: it creates and deletes a temporary session, source, and skill. All of them are removed when the run finishes.

Scripting patterns

TLS / wss://

For remote servers with TLS:
The --tls-ca flag sets NODE_EXTRA_CA_CERTS before connecting. You can also set SYNTI_TLS_CA in your environment.

Troubleshooting