SextantDocs
v2.4latest
v2.4latestv1.9legacy

Switching keeps you on the same page when it exists in the other version.

On this page

CLI overview

How the sextant command is organized, how it finds the server and your credentials, and the flags every command shares.

Updated CLI reference Version v2.4

sextant is one binary. Some commands run a long-lived process (server, worker); the rest are API clients that talk to a server.

Text
sextant <command> [subcommand] [flags]

Run
  server        Start the API server and the scheduler
  worker        Start a worker that runs command handlers

Work
  jobs          Create, list, inspect, cancel and retry jobs
  schedules     Manage recurring schedules
  queues        List queues; pause and resume them

Operate
  tokens        Create and revoke API tokens
  webhooks      Manage webhook endpoints
  logs          Stream server logs
  inspect       Show the timeline of one job
  config        Check and print the effective configuration
  migrate       Run store migrations and import from v1

Other
  init          Write a starter sextant.toml
  login         Save a server URL and token for later commands
  version       Print the version

Connecting to a server

Client commands resolve the server and token in this order, first match wins:

  1. the flags --url and --token;
  2. the environment variables SEXTANT_URL and SEXTANT_TOKEN;
  3. the profile saved by sextant login, in ~/.config/sextant/profiles.toml.
Shell
sextant login --url https://sextant.internal.example --name production
sextant --profile production queues list

Global flags

--urlstring optional default $SEXTANT_URL
Server base URL.
--tokenstring optional default $SEXTANT_TOKEN
API token. Prefer the environment variable so the secret stays out of your shell history.
--profilestring optional
Use a saved profile from sextant login.
--output, -ostring optional default table
table, json or yaml. Use json in scripts.
--no-colorboolean optional
Disable ANSI colors. Also honors NO_COLOR.
--timeoutduration optional default 30s
Request timeout.

Exit codes

Code Meaning
0 Success
1 The request failed (network error, 5xx)
2 Bad usage: unknown flag or missing argument
3 The API rejected the request (4xx); the message is printed to standard error
4 --wait gave up before the job finished

Scripting

With -o json every command prints exactly one JSON document, so jq pipelines stay simple:

Shell
sextant jobs list --state dead -o json | jq -r '.data[].id' | xargs -n1 sextant jobs retry