CLI · v3.3.0

Command Reference

Every command, flag, argument, env var, and exit behavior. turkeycode and turkey are the same executable.

Detail
Versionturkeycode --version
Helpturkeycode <command> --help
Config loadLoads deploy/.env on startup, then process env vars.

Command map

CommandPurpose
runRun the full orchestration loop.
scopeInteractively converge on a spec without building.
resumeResume from the last checkpoint.
statusShow current orchestration status.
resetReset / nuke orchestration state.
gateManually check a specific pipeline gate.
loginAuthenticate with turkeycode.ai.
run-localRun the current project locally in Docker.
deployPackage and deploy to turkeycode.ai.
deliverDeliver a non-web project to GitHub.
appsManage deployed apps (list/status/logs/delete).
storyBug/story mode: prompt → pointed Jira ticket → run.
run-ticketRun a single existing Jira ticket.
my-ticketsList Jira tickets assigned to you, then run one.

run

Run the full orchestration loop. A bare description auto-enters the interactive scope loop first on a TTY; skip it with --spec (or by running non-interactively).

$ turkeycode run <description> [options]
FlagDescription
-j, --jira <project>Jira project key — create Jira tickets per phase.
-g, --github <repo>GitHub repo (owner/repo) — create PRs per phase.
-s, --spec <file>Spec file path. Skips the scope loop (fully autonomous).
--persona <file>Persona the scope agent embodies.
-v, --verboseVerbose output.
-w, --allow-warningsAllow warnings in QA (only blockers must be zero).
--no-pushSkip git push (local-only / no_push remotes).
--no-prSkip gh pr create (implied by --no-push).
--aarGenerate a per-phase After-Action Report (off by default).
--strict-phasesGate every phase on zero warnings; disables the polish pass.
--type <type>Force project type, skipping auto-detection (see below).
--base <branch>Base branch override. Defaults to detected main/master.
--feature <branch>Feature branch — phases branch off and merge back into it.

--type accepts: web-fullstack, web-frontend, web-api, cli, library, desktop, mobile, embedded, legacy, monorepo.

# Converge interactively, then build straight through
$ turkeycode run "a habit tracker with streaks and reminders"
 
# Fully autonomous from a spec
$ turkeycode run "Build a project management tool" --spec spec.md
 
# Per-phase PRs to GitHub, let cosmetic warnings pass
$ turkeycode run "SaaS dashboard with Stripe billing" --github me/dash -w
 
# Force a CLI build into a gitflow repo
$ turkeycode run "docker-monitoring CLI" --type cli --feature develop

Scope auto-skip

The interactive loop is skipped when you pass --spec, point at a spec file, or run non-interactively (CI / piped stdin).

scope

Interactively scope a build into a spec (reflect-and-correct loop) without building. Writes the working model and confirmed spec under .turkey/.

$ turkeycode scope <description> [options]
FlagDescription
-s, --spec <file>Seed spec/notes file to start the working model from.
--persona <file>Persona the scope agent embodies.
--model <model>Override the model used for the scoping agent.
-v, --verboseStream the underlying session output.

resume

Resume orchestration from the current state in .turkey/state.json.

$ turkeycode resume [options]
FlagDescription
-v, --verboseVerbose output.
-w, --allow-warningsAllow warnings in QA (only blockers must be zero).
--aarGenerate a per-phase After-Action Report.
--strict-phasesGate every phase on zero warnings (disables the polish pass).
--no-pushSkip git push.
--no-prSkip gh pr create (implied by --no-push).
--base <branch>Base branch override (seed/override; persisted to state).
--feature <branch>Feature branch (seed/override; persisted to state).

status

Show the current orchestration status (phase, QA attempts, gate progress).

$ turkeycode status

reset

Reset orchestration state — wipes the .turkey/ state directory.

$ turkeycode reset [-f|--force]
FlagDescription
-f, --forceForce reset without confirmation.

gate

Manually check a specific pipeline gate (useful for debugging a stalled build).

$ turkeycode gate <gate> [options]
Arg / FlagDescription
<gate>scope · research · plan · phase-build · qa-smoke · qa-functional · qa-visual · qa-verdict · code-review · aar
-p, --phase <number>Phase number for phase-specific gates (default 1).
-a, --attempt <number>Attempt number for QA gates (default 1).

Gate artifacts & validation

GateArtifactPasses when
scopereference/scope.donestarts with DONE, specs.md > 200 chars
researchreference/research.doneexists, specs.md > 200 chars
planphase-plan.jsonvalid JSON, 2–5 phases
buildphases/phase-N.doneexists
qa-smokeqa/phase-N/smoke-M.doneexists
qa-functionalqa/phase-N/functional-M.doneexists
qa-visualqa/phase-N/visual-M.doneexists
qa-verdictqa/phase-N/verdict-M.json0 blockers
code-reviewreviews/phase-N.mdexists
aaraar/phase-N.doneexists

login

Authenticate with turkeycode.ai. Stores credentials at ~/.turkeycode/credentials.json. API base is https://turkeycode.ai/api/v1.

$ turkeycode login [-t|--token <api-key>]
FlagDescription
-t, --token <api-key>API token for headless / CI login (else prompts to paste).

Get or rotate your key at turkeycode.ai/settings/api-keys.

run-local

Run the current project locally in Docker — mirrors turkeycode.ai hosting. Auto-detects app name, stack, and tier.

$ turkeycode run-local [-p|--port <port>]
FlagDescription
-p, --port <port>Local port to expose (default 3000).

deploy

Package and deploy the current project to turkeycode.ai. Requires login first. Auto-detects your stack and generates a Dockerfile if none exists (an existing one is used as-is).

$ turkeycode deploy [options]
FlagDescription
-n, --name <subdomain>Custom subdomain name.
-d, --domain <domain>Custom domain (Pro+).
-t, --tier <tier>Explicit tier: free | starter | pro | business.
-e, --env <file>Env file to inject (e.g. .env.production).
--skip-buildSkip the build step.

Hosting tiers

TierPriceWhat you get
Free$0/moStatic hosting, subdomain, sleeps on idle
Starter$12/moFull stack (DB + Redis), always-on
Pro$29/mo+ Stripe, Auth, S3, Email, background jobs, custom domain
Business$49/mo+ Priority support, daily backups, analytics
$ turkeycode deploy # -> https://my-app.turkeycode.ai
$ turkeycode deploy --tier starter
$ turkeycode deploy --name cool-app
$ turkeycode deploy --env .env.production

deliver

Deliver a non-web project (CLI, library, desktop, mobile) to your GitHub instead of hosting it. Uses your existing gh auth — no extra tokens. Go projects are cross-compiled (Linux/macOS/Windows), Rust gets a native release build, and a GitHub release is created with binaries attached.

$ turkeycode deliver [options]
FlagDescription
-n, --name <name>Repository name.
-d, --description <desc>Repository description.
--publicCreate a public repo (default: private).

apps

Manage deployed apps. list is the default subcommand.

$ turkeycode apps [list]
$ turkeycode apps status [app-name]
$ turkeycode apps logs <app-name> [-n|--lines <number>]
$ turkeycode apps delete <app-name> [-f|--force]
SubcommandDescriptionOptions
listList all deployed apps (default).
status [app-name]Show app health and status.
logs <app-name>Tail logs for an app.-n, --lines
delete <app-name>Tear down a deployed app.-f, --force

Tickets (Jira)

These commands require Jira env vars: JIRA_HOST, JIRA_EMAIL, JIRA_TOKEN (and JIRA_PROJECT for story, since it creates tickets). Generate a token at id.atlassian.com.

story

Bug/story mode: turn a prompt into a points-estimated Jira ticket (auto bug-vs-story), burn down its epic, then run it.

$ turkeycode story <prompt> [options]
FlagDescription
-e, --epic <key>Parent epic key. Omit for an interactive picker; supplying it links + reports burndown.
--bugForce issue type Bug.
--storyForce issue type Story.
--points <n>Override the estimated story points.
--budget <n>Override the epic point budget used for burndown.
--dry-runEstimate only. Create nothing, run nothing.
--no-runCreate + point the ticket, but skip the run flow.
--triage-onlyCreate the ticket, then stop after triage.
-v, --verboseVerbose output.
--manifest <path>Override the repos.yaml manifest path.
--mcp-config <path>Override MCP config path (else TURKEYCODE_MCP_CONFIG).
Epic burndown is read-and-report (remaining = epic budget − committed points); it never writes back to the epic, so it never fights Jira's native rollup.
$ turkeycode story "users can export their dashboard to CSV"
$ turkeycode story "fix broken CSV export on empty sets" --epic PROJ-100 --bug
$ turkeycode story "add SSO via Okta" --dry-run
$ turkeycode story "rate-limit the public API" --no-run

run-ticket

Run a single existing Jira ticket: triage it, then research (non-coding) or build + push branches (coding).

$ turkeycode run-ticket <key> [options]
FlagDescription
-v, --verboseVerbose output.
--manifest <path>Override the repos.yaml manifest path.
--mcp-config <path>Override MCP config path (else TURKEYCODE_MCP_CONFIG).
--triage-onlyStop after triage. No branches, build, or Jira comment/worklog.

my-tickets

List Jira tickets assigned to you, then pick one to run.

$ turkeycode my-tickets [options]
FlagDescription
-v, --verboseVerbose output.
--include-doneInclude tickets in the Done status category.
-k, --key <key>Skip the picker and run the given key directly.
--manifest <path>Override the repos.yaml manifest path.
--mcp-config <path>Override MCP config path (else TURKEYCODE_MCP_CONFIG).
--triage-onlyStop after triage. No branches, build, or Jira comment/worklog.

Environment variables

VariableRequiredDescription
ANTHROPIC_API_KEYNo*Anthropic API key. *Not needed with Claude Max/Pro via claude login.
ANTHROPIC_AUTH_TOKENNoAlternative auth token honored by the direct API client.
GH_TOKENNoGitHub token (alternative to gh auth login).
JIRA_HOSTNoJira instance hostname (e.g. company.atlassian.net).
JIRA_EMAILNoJira account email.
JIRA_TOKENNoJira API token.
JIRA_PROJECTNoJira project key. Required for story (it creates tickets).
TURKEYCODE_MCP_CONFIGNoDefault MCP config path for ticket commands.

Files, state & paths

PathWhat
.turkey/Per-project build state (gitignored).
.turkey/state.jsonCurrent phase, QA attempts.
.turkey/audit.logTimestamped event log.
.turkey/fatal.logWhy a long autonomous run died (survives buffered stdout).
.turkey/reference/specs.mdConfirmed intent spec + research survey.
.turkey/phase-plan.jsonThe 2–5 phase plan.
.turkey/qa/phase-N/Smoke / functional / visual reports + verdict.
.turkey/reviews/Code review reports.
~/.turkeycode/credentials.jsonturkeycode.ai login credentials.
~/.turkeycode/persona.mdGlobal scoping persona (lowest-priority source).
deploy/.envEnv file auto-loaded by the CLI on startup.

Exit & failure behavior

Command handlers exit non-zero on failure (failed auth, invalid ticket selection, deploy/detection errors), printing an ❌-prefixed message. Uncaught exceptions and unhandled rejections are logged to .turkey/fatal.log and exit 1 — check that file when a background run dies silently. Most builds are resumable: after a crash, turkeycode resume continues from the last gate that passed.

Tracks turkeycode v3.3.0. If the CLI's command surface changes, update this page from the upstream src/index.ts and README.md.