Skip to content

CLI reference

The sypnia command: how to install it, the variables it reads, what its exit codes mean, and where each command is documented.

Applies to EngineCloud
View as Markdown
On this page
  1. Install
  2. Say where and who
  3. Output
  4. Exit codes
  5. Commands

Engine Cloud sypnia is one program. It is the engine itself (sypnia serve) and the tool you use around it: create projects and tokens, upload source maps from your build, read problems from a terminal.

You want toCommandWorks with
Run the engine on your own serversypnia serve, migrate, doctor, aggregateA self-hosted engine
Create projects, ingest keys and API tokenssypnia project, key, tokenA self-hosted engine. key and token also on Sypnia Cloud
Upload source maps in your buildsypnia sourcemaps uploadBoth
See what is failing, from a terminalsypnia problems, sypnia problemBoth

If you use Sypnia Cloud and a framework SDK such as @sypnia/telemetry/next, you may never need the CLI: the SDK uploads source maps by itself and the app does the rest.

Install

Script

Terminal
curl -fsSL https://sypnia.com/install.sh | sh

Linux and macOS, x86-64 and ARM. Installs to ~/.local/bin/sypnia.

Check it:

Terminal
sypnia version
You should see
sypnia 1.0.0 (a1c9e3f, 2026-03-01) schema 12

Say where and who

Commands that talk to the API need to know which engine and which credential. They read them from the environment.

VariableUsed byMeaning
SYPNIA_BASE_URLadmin, clientWhere the API is. For a self-hosted engine, its base URL, without /v1. On the engine’s own machine it is also the setting that says the engine’s public address. Default: https://telemetry.api.sypnia.com.
SYPNIA_API_TOKENadmin, clientAn API token (sps_…). read for problems and problem; ci for sourcemaps upload; admin for key and token.
SYPNIA_ROOT_TOKENadminThe root token of a self-hosted engine. Needed for project create and project delete. When both tokens are set, admin commands use the root token.
SYPNIA_PROJECTadmin, clientA project id or slug. Needed only with the root token; an API token already belongs to one project. The same as --project.
SYPNIA_CONFIGenginePath of the configuration file. The same as --config.
SYPNIA_…engineEvery setting of the engine. See the configuration reference.
Against Sypnia Cloud
export SYPNIA_API_TOKEN=<your API token>
sypnia problems
Against your own engine
export SYPNIA_BASE_URL=https://sypnia.example.com
export SYPNIA_API_TOKEN=<your API token>
sypnia problems

The CLI never stores a token. It has no login command and writes no configuration file of its own.

Output

By default the CLI prints for people: tables, colours, short sentences. Add --json to any command that reads data and it prints exactly what the HTTP API returns, so a script can use it:

Terminal
sypnia problems --json | jq '.data[].slug'

Errors go to standard error, as one line: the API’s code and message.

Exit codes

The same on every command, so a script can tell what went wrong.

CodeMeaning
0Success.
1The command ran and the answer is no: a doctor check failed (a warning alone exits 0), an upload failed, the API answered an error not listed below.
2Wrong usage: an unknown flag, a missing argument. Nothing was done.
3Wrong configuration: a required setting is missing or invalid, or the database schema is older than the binary (run sypnia migrate).
4Cannot reach something: the database, the storage, the API or the network. Safe to retry.
5Not allowed: the token is missing, unknown, revoked, or lacks the scope (401, 403).
6Not found: no such project, problem, key or token (404).

Commands

  1. Install
  2. Say where and who
  3. Output
  4. Exit codes
  5. Commands

    Search pages, sections and terms