Skip to content
styrev0.11.0
GitHub

CLI reference

The styre binary has four commands: run, setup, migrate and notify.

Two flags work before any command:

Flag Effect
--version Print the version and exit. Must be the first argument.
--help, -h Print usage and exit. Works anywhere.

Drive one ticket to an open pull request, then exit.

Terminal window
styre run <ticket>

<ticket> is the tracker identifier, e.g. ENG-482. It is required for a fresh run and omitted when resuming.

Flag Default Effect
--profile <path> the cwd repo’s profile The project profile to run against.
--config <path> discovered Use this config file only. When set, nothing else is merged — see Configuration.
--slug <name> derived from the repo Which project’s profile and config to load.
--db <path> a fresh temp database Where the run’s state of record lives.
--resume <ticket> Resume a parked run instead of starting one. Replaces the positional argument.
--accept-head off On resume, proceed even though the branch moved — dropping the carried-over context.
--inspect off On resume, print what would happen and exit without running.
--in-place off Work on a branch in the repo root instead of an isolated worktree. See the warning below.

run writes only NDJSON telemetry to stdout; everything human-readable — progress, the final summary, warnings, resume hints — goes to stderr. This is what makes styre run … | jq clean.

See The run loop for what happens between the command and the pull request, and Recovering a run for --resume, --accept-head and --inspect in context.

Probe a repository and write its project profile.

Terminal window
styre setup <repo>

<repo> is optional. Give a path and it probes that repo. Omit it and it probes the current directory — but only if the repo root holds a .styre-disposable marker, the same guard as --in-place. Pass the path explicitly and you do not need the marker.

Flag Default Effect
--out <path> the profile path for this repo Write the profile somewhere else.
--checks <github|external|none> the probe decides Override how CI status is read. Any other value is rejected.
--slug <name> derived from the repo Store the profile under a different project name.
--force off Discard the existing profile and probe from scratch, dropping hand-resolved values.
--reprobe off Same behaviour as --force.
--config <path> discovered Selects the agent provider for the probe, so the right API key is required. Not written into the profile.
--trust-agent-commands off Headless only. Accept agent-refined command strings without a prompt. See the warning.

When run in a terminal, setup prints the full resolved command list and waits for you to type y. Anything else aborts and writes nothing. See Your first run for that flow.

Create or upgrade the shared SQLite database. Idempotent — safe to run any time.

Terminal window
styre migrate
Flag Default Effect
--db <path> the default state database Which database file to create or upgrade.

Most people never run this directly. styre run uses a fresh per-run database by default, so migrate only matters if you point runs at a shared --db you manage yourself.

Send one test message through your configured notifier, to check your Slack setup.

Terminal window
styre notify --test
Flag Default Effect
--test off Required. Send one test message. Without it, notify prints usage and exits 64.
--config <path> discovered Use a specific config file.
--slug <name> derived from the cwd repo Which project’s notifier config to use.

It resolves config exactly as styre run does, so it tests the same channel a real run would post to. Notifier setup lives in Configuration.

Styre reads all credentials from the environment; see Install for setting them.

Variable Needed for
ANTHROPIC_API_KEY The default claude agent provider.
OPENAI_API_KEY The codex agent provider.
GITHUB_TOKEN Pushing the branch, opening the PR, reading checks.
LINEAR_API_KEY The Linear tracker.
JIRA_BASE_URL, JIRA_EMAIL, JIRA_API_TOKEN The Jira tracker.
SLACK_BOT_TOKEN The Slack notifier.
Variable Effect
XDG_CONFIG_HOME Base for Styre’s config and profiles. Defaults to ~/.config.
XDG_STATE_HOME Base for the database, park dumps and telemetry id. Defaults to ~/.local/state.
STYRE_TELEMETRY Set to 0 or false to disable analytics.
DO_NOT_TRACK Any value except empty/0/false disables analytics.

See Files and paths for what Styre reads and writes, and Telemetry for what analytics covers. Full exit-code meanings are on the Exit codes page.