Skip to content

CLI reference

Cowliss is the admin CLI: a thin client of the dashboard API with full parity, so anything the dashboard does, the CLI does, through the same typed endpoints.

Terminal window
cow login # browser flow; caches the session token
cow login --token <jwt> # or paste a Clerk session token (headless)
cow whoami # subject, org, role, expiry of the cached token

Global flags, available on every command:

  • --api <url>: API base URL; overrides env and the value saved at login. Precedence: flag → COW_API_URL → saved → http://localhost:3400.
  • --env <environment>: the environment to act on, development or production. Precedence: flag → COW_ENVIRONMENT → production. cow deploy and cow rollback refuse to guess and require one of the two.
  • --json: force compact single-line JSON output (automatic when stdout is not a TTY, i.e. in pipes and scripts).

Conventions worth knowing once:

  • Every command prints the API’s response envelope as JSON: { data } on success, { error: { code, message } } on failure, with a non-zero exit code on failure.
  • JSON-valued flags accept - to read the document from stdin: echo '{"maxLength":64}' | cow catalog events create --name web --properties -.
  • List commands take --cursor and --limit and print meta.nextCursor for the next page.
  • cow journeys also answers to cow journey, and both spellings are the same group.
  • cow init, cow add example, cow build, and cow test are local: they hit no API and need no login (init makes one best-effort call to create the project row, and shrugs if it cannot). Everything else needs a session or a deploy key.
  • The project commands (init, build, push, deploy, rollback, pull, dev, test, add example) act on the cow project in the current directory. See Projects.

The command pages in this section are generated by walking the CLI’s command tree: names, arguments, options, and descriptions come from the definitions themselves, so a changed command changes the docs on the next pnpm -F cowliss-docs generate. The sidebar lists every group.