Skip to documentation
Documentation
Documentation
OverviewInstallationQuickstartConfigurationTroubleshootingFAQ

Usage

Terminal interfaceCLIDashboardAnalytics

Collaborate

ArtifactsLessonsSession sharingSession linksSession messagingAsks addressed to membersAsks privacy fact sheetThe LedgerFeedbackEmail from crewkitBlueprintsAgent identitiesMCP server

Configure

AgentsSkillsRulesCommandsInheritancePlaybooksExperimentsHooksCapture modesTeam

Workspaces

WorkspacesSet up a workspaceFix a ticket end to endShip a feature with approvalHand off work and set agent settings

API Reference

API OverviewAuthenticationSessions APIResources APIOrganizations APIProjects APIPlaybooks APIExperiments API
Need a hand?Find an answer in troubleshooting.
Loading docs…
CREWKIT / DOCUMENTATION

Fix a ticket end to end

Start a fix from a Jira card, work in its worktrees, save, open pull requests and close it.

You end up with a fix shipped from one command per step: a work item keyed to a Jira card, a branch and worktree in each repository it touches, pull requests into each base branch, and Slack posts for the team along the way.

You need:

  • What every workspace guide needs — see Before you start — and to be a member or lead of the workspace.
  • A workspace folder — see Set up a workspace.
  • For GitHub repositories, the GitHub CLI (gh) installed and signed in (gh auth login).

1. Start the work item

From the workspace folder, with the card's key:

crewkit work start CREW-123

crewkit creates the work item (its title comes from the card), fetches each repository's base branch from origin and cuts a branch and worktree in each:

  Work item crew-123-fix-login-redirect  CREW-123
  • /Users/you/code/acme/work/crew-123-fix-login-redirect/api

When the workspace has several repositories it asks which to work in; pass --repo api (repeatable) to choose up front. --title "…" overrides the card's summary. Starting a key that already has an open work item resumes it.

No card yet? Start from a description instead:

crewkit work start "login redirect loops"

crewkit searches the workspace's Jira project and lists the matches. Pick one, or pick Create a Task in CREW: … and confirm to create the card.

Setup in each new worktree

Right after cutting a worktree, crewkit sets it up from the repository's declared commands. The first time a repository's commands would run on your machine — and again whenever a manager changes them — crewkit lists them and asks:

api declares these commands. crewkit runs them as you, without a shell, in its worktrees.
Repository id 8c1f…, last changed by Alex at 2026-10-14T12:00:00Z.

Setup (crewkit work start, pickup and provision run these at the worktree root):
  1. bin/setup
  2. npm ci

Components (crewkit work run <name> test|gate):
  api at api
    test: bin/rails test
    gate: bundle exec rubocop

A program containing a '/' is a file in the repository, and any command may read and
run other repository files (a Gemfile, package scripts, .tool-versions). This yes covers
the commands listed; it does not cover what those files contain.
Commands hash: 4be1…
Run these commands on this machine? [y/N]

Your yes is kept on this machine for exactly these commands. Then, in each worktree, crewkit:

  1. Copies your local secret files from this machine's secrets folder for the repository into the worktree, at the same relative path and mode 600, and adds them to git's exclude file so they are never committed or saved. The folder is ~/.config/crewkit/secrets/<organization id>/<repository id>/ (on macOS, ~/Library/Application Support/crewkit/secrets/…); crewkit prints its exact path, and a missing folder only prints what would have been copied. For example, put api/config/master.key there to have it in every new api worktree. Secret files never go through crewkit's servers.
  2. Runs the setup commands in order at the worktree root. A failing step stops there and prints its number, its command, its exit status and the last 20 lines of its output; the worktree is left as it is. Fix the cause and run crewkit work provision crew-123-fix-login-redirect to resume at that step.
  3. Writes .crewkit/work.env with CREWKIT_WORK_HANDLE, CREWKIT_WORKTREE, CREWKIT_TEST_DATABASE (a test database name of its own, like crewkit_test_crew_123_fix_login_redirect_api) and the toolchain's PATH, for agents and scripts to source.
  4. Writes the workspace's agent settings into the worktree, and adds .claude/settings.json and .mcp.json to git's exclude file so they are never saved.

Without a terminal (a script, CI), crewkit runs nothing it has not had your yes for: it skips the setup commands, says so, and the work item still starts. --no-setup skips all of this.


2. Work in the worktree

cd work/crew-123-fix-login-redirect/api
crewkit code

Commit as you normally would. The worktree is a regular git checkout on CREW-123-fix-login-redirect.

The worktree has the workspace's agent settings and its .crewkit/work.env. Run a declared test or gate with that environment from inside it:

crewkit work run api test            # the api component's test command
crewkit work run api test -- -n foo  # extra arguments, passed as they are
crewkit work run api gate            # each gate command, in order
crewkit work run setup               # the setup commands again

Check every worktree at once from anywhere in the workspace folder:

crewkit work status
  work/crew-123-fix-login-redirect/api   CREW-123-fix-login-redirect   dirty 2 ahead of origin/main

Signed in, status also reports each branch's head and commits ahead to its work item, so your team sees it on the workspace page. A crewkit session in the worktree reports the same when it stops.


3. Save work in progress

crewkit work save

Inside a worktree it saves that work item; elsewhere, name it: crewkit work save crew-123-fix-login-redirect. Each worktree's uncommitted changes are pushed as a WIP commit to refs/crewkit/wip/<branch> on origin — your branch and working tree are untouched, so no CI runs. A host that refuses that ref namespace gets a wip/<branch> branch instead, which CI may build like any other branch. crewkit records only the commit's sha and time.

The first save of each repository on a machine asks Save api to its origin from this machine? Once you say yes, crewkit also saves a dirty worktree on its own every 10 minutes during a session and when the session ends.


4. Open the pull requests

crewkit work pr crew-123-fix-login-redirect

For each worktree crewkit asks Push CREW-123-fix-login-redirect to origin and open a pull request into main (api)?, pushes the branch and prints the pull request's URL. --repo api limits it to one repository. GitHub pull requests open with your own gh login.

The work item moves to In review.


5. Follow it through merge

Slack posts each step to the workspace's channel (once a Slack agent is set up). On the workspace page, the Work card shows the item's state, Jira status and last save; its branch count opens each branch with its head, commits ahead, push, last save and pull request state. From the CLI:

crewkit work show crew-123-fix-login-redirect

When the pull request merges and none is left open, the work item closes on its own — but only if your code host is connected: crewkit learns of the merge from its webhook and never polls. Without it the item stays In review, Slack posts no merge, and you close it yourself (step 6).


6. Close it

For a work item that ends without a merge, one whose merge crewkit was not told about, or to close it early:

crewkit work close crew-123-fix-login-redirect

The worktrees are kept; crewkit prints their paths so you can remove them when you are done.


If it stops

  • pick a card with crewkit work start <KEY-n>; creating one needs an interactive terminal — choosing from search results and creating a card need a yes on a terminal. Rerun in a terminal, or start with the card key.
  • crewkit work pr pushes and opens a pull request only after a yes on a terminal — work pr has no --yes. Run it in a terminal.
  • pass --repo <name> (one of: …) — without a terminal crewkit cannot ask which repositories to work in.
  • CREW-123 is not in this workspace's tracker projects — the card's project is not the workspace's Jira key (or a member project's). Check Jira project key in Settings.
  • This organization has no Jira connection, so CREW-123's title cannot be read from its card — pass --title "…".
  • this organization has no Jira connection — searching needs Jira connected; start with the card key and --title, or ask an admin to connect Jira.
  • no local clone of api in … — clone the repository into the workspace folder first.
  • api has base branch main, which its origin does not have — set the right base branch in Settings → Repositories.
  • the first save of api on this machine needs a yes on a terminal — run crewkit work save once in a terminal. Until then, automatic saves do nothing.
  • refusing to save files that look like credentials: .env — files named like credentials (.env*, *.pem, *.key, id_rsa, .npmrc, credentials*.json and similar) are never saved. An untracked one: add it to .gitignore or move it out of the worktree. One the branch already tracks: .gitignore does not help — untrack it with git rm --cached <file>, add it to .gitignore and commit. Then save again.
  • gh is not signed in — run gh auth login, then crewkit work pr again.
  • Skipped: setup of api not run: its commands need your yes on a terminal — the worktree was set up without a terminal. Run crewkit work provision crew-123-fix-login-redirect in one.
  • Skipped: setup of api not run: you declined its commands — you answered no. Run crewkit work provision crew-123-fix-login-redirect to be asked again.
  • Skipped: api not provisioned: … — the repository's declared commands are not valid for this version of crewkit; its worktree is cut but not set up, and the other repositories are. A manager can correct the commands in Settings → Repositories.
  • setup step 2/3 (npm ci) exited with status 1 — fix what its output shows, then crewkit work provision crew-123-fix-login-redirect resumes at that step.
  • … is a symlink or not a directory; refusing to provision through it — a secret file's folder in the worktree (or in the secrets folder) is a symlink, often one the branch commits. crewkit never writes through one; remove the link or move the secret file.
  • … cannot take a secret file: the workspace's git checkout tracks it — the branch tracks a file at that path. crewkit never overwrites a tracked file with a secret; rename one of them.
  • … has 2 hard links; refusing to copy it — keep a plain copy of the file in the secrets folder, not a hard link.

Next steps

  • Ship a feature with approval
  • Workspaces

Set up a workspace

Create a workspace, add its members, link its repositories, and connect your code host, Jira and Slack.

Ship a feature with approval

Propose a feature keyed to an Epic, get a lead's approval, start it and follow the Epic's progress.

On this page

1. Start the work itemSetup in each new worktree2. Work in the worktree3. Save work in progress4. Open the pull requests5. Follow it through merge6. Close itIf it stopsNext steps