Skip to content

CLI

The ai command: models, routes, trying a task, keys, limits, usage and calls.

Applies to EngineCloud
View as Markdown
Terminal
npx @sypnia/ai <command>

Installed globally (npm i -g @sypnia/ai), the command is ai. It uses the sign-in that every Sypnia command line shares: npx @sypnia/app login. Against a self-hosted gateway, set SYPNIA_AI_URL and SYPNIA_AI_TOKEN.

CommandDoes
ai link --project <ref>link this folder to a project (writes project in sypnia.toml)
ai models [--task <task>]the catalog, with prices
ai tasksthe project’s tasks and the model of each
ai routes pull / diff / applyread the project’s routes into the [ai] table of sypnia.toml, compare, apply
ai routes history / rollback --to <version>versions of the routes, and going back
ai try <task> "<text>" [--case <id>] [--file <path>]one call, with its cost and timing
ai keys create <name> --scope call|read|admin [--credits-per-day <n>]a key; printed once
ai keys list / revoke <id>keys and their last use
ai provider-keys add openrouter|bedrock / list / removeyour own provider keys Cloud
ai origins add <url> / list / removesites allowed to use browser tokens
ai limits show / set <scope> <kind> <value>limits
ai usage --by case|task|key|end-user|model --since 30d [--csv]usage
ai calls [--case <id>] [--status error] / ai call <id>recent calls and one call in detail
ai cache purge --task <task>empty a route’s cache
ai end-users delete <id>forget a person of your app

Every command takes --project and --json. Exit codes: 0 done, 1 error, 2 wrong usage, 3 needs a person’s approval.

    Search pages, sections and terms