@ligantic/cli
v1.58.0
Published
The Ligantic CLI - authenticate, manage Spaces and Resources, work with Records, and invoke and inspect Flows.
Readme
@ligantic/cli
The Ligantic CLI — a thin, human-friendly layer over @ligantic/sdk. The same result-based operations, rendered as tables by default and as JSON with --json.
Install
pnpm add --global @ligantic/cliRequires Node.js 22+.
To install the local checkout, run these commands from the repository root:
pnpm --filter @ligantic/sdk build
pnpm --filter @ligantic/cli build
pnpm add --global ./packages/cliQuick start
# Authenticate (the key is read from piped stdin, never a flag)
echo "$LIGANTIC_API_KEY" | ligantic auth login
# Save another account; it becomes the current profile on login
echo "$OTHER_API_KEY" | ligantic auth login --profile work
# ...or store it without switching the current profile:
echo "$OTHER_API_KEY" | ligantic auth login --profile work --no-switch
# List Spaces
ligantic space list
# Show the field vocabulary of a Schema
ligantic schemas show "Release"
# List Records, filtered and expanded, as JSON
ligantic records list "Release" \
--where "Release Date >= 2026-08-01" \
--expand "Tasks" \
--jsonGlobal options
| Option | Description |
| --------------- | ----------------------------------------------------------------------- |
| --space <id> | Override the current Space for this command. |
| --json | Emit raw JSON output (valid JSON on stdout; errors still go to stderr). |
| -V, --version | Print the CLI version. |
| -h, --help | Print help. |
Authentication
API-key only in v1. The key is never a flag. Credentials are stored in named profiles, with default used initially. The active profile can be changed with ligantic auth use <name>; use ligantic auth list to see profiles. Login to a profile with ligantic auth login --profile <name> — this also makes it the current profile, so no separate auth use is needed. Pass --no-switch to store a profile without changing the current one. The selected profile is stored in the CLI config, while keys are stored in the OS key store when available. LIGANTIC_API_KEY remains an explicit override and takes precedence over the active profile.
Pre-profiles single-key setups (a top-level apiKey in the config file, or the legacy Ligantic/api-key key-store entry) are migrated to the default profile automatically on the next run.
Note on the OS key store: the key store uses
keytar, a native module with prebuilt binaries for common platforms. If it cannot be loaded — unsupported platform, or a package manager that blocks native build scripts (e.g. pnpm withoutkeytarinonlyBuiltDependencies) — the CLI falls back to the0600config file and everything else works unchanged.
Commands
| Group | Commands |
| --------- | ---------------------------------------------------------------------- |
| auth | login, list, use, whoami, logout |
| config | show, set, unset |
| space | list, current, use, select, overview |
| schemas | list, show, create, update, delete |
| records | list, show, create, update, delete |
| flows | list, show, run, runs, run-show, run-outputs, cancel-run |
Run ligantic --help (or ligantic <command> --help) for the full option reference.
Update check
On each non-informational command the CLI checks whether a newer version is published and prints a notice on stderr (never on stdout, so --json stays clean). The check is cached in ~/.ligantic/update-check.json (at most one network call per day) and is non-fatal. Disable it with LIGANTIC_NO_UPDATE_CHECK=1 (it is also skipped in CI and for --help/--version).
