Command Reference
Complete reference for all parsec commands. Every option, argument, and example in one place.
Core Workflow
Creates a new git worktree tied to a ticket ID. Fetches the ticket title from your configured tracker (Jira, GitHub Issues, or GitLab), names the branch consistently, and sets up an isolated workspace directory alongside your main repo.
parsec start <TICKET> [OPTIONS]
| Argument | Description |
|---|---|
<TICKET> required |
Ticket ID to create a worktree for (e.g. PROJ-123, 42). |
| Option | Description |
|---|---|
--base <BRANCH> | Base branch to create the worktree from. Defaults to the repo's default branch. |
--title <TEXT> | Override the ticket title (useful when offline or using an unsupported tracker). |
--on <TICKET> | Set this worktree's base to another ticket's branch, creating a stacked PR dependency. |
--branch <NAME> | Override the generated branch name. |
Displays all active parsec-managed worktrees with their ticket IDs, branch names, PR status, and paths. Use --full to include unpushed commit counts, ahead/behind divergence, and last commit metadata per worktree.
parsec list [--full] [--no-pr]
| Option | Description |
|---|---|
--full | Show extended metadata: unpushed commits, ahead/behind divergence, last commit message and age. |
--no-pr | Skip fetching PR status from GitHub/GitLab (faster output, works offline). |
Prints the path to a ticket's worktree. With shell integration active (eval "$(parsec init zsh)"), your shell automatically cds into that directory. Without shell integration it prints the path for use in scripts.
parsec switch [TICKET] [OPTIONS]
| Argument | Description |
|---|---|
[TICKET] |
Ticket ID to switch to. If omitted, shows an interactive picker. |
The one-command shipping workflow. Pushes your branch to the remote, creates a Pull Request (or Merge Request on GitLab) with the ticket title pre-filled, and removes the worktree. All in a single step.
parsec ship <TICKET> [OPTIONS]
| Argument | Description |
|---|---|
<TICKET> required | Ticket ID of the worktree to ship. |
| Option | Description |
|---|---|
--draft | Open the PR as a draft (GitHub only). |
--no-pr | Push the branch but skip creating a PR/MR. |
--base <BRANCH> | Override the target base branch for the PR. |
--skip-hooks | Skip pre-ship hooks defined in [hooks] config. |
Merges the PR associated with a ticket via the GitHub API, waits for the merge to complete, deletes the remote branch, and removes the local worktree. Returns you to the main repository.
parsec merge [TICKET] [OPTIONS]
| Option | Description |
|---|---|
--rebase | Use rebase strategy instead of merge commit. |
--no-wait | Trigger the merge and return immediately without waiting. |
--no-delete-branch | Keep the remote branch after merging. |
Scans all parsec-managed worktrees and removes those whose PRs have been merged or whose branches no longer exist on the remote. Use --dry-run to preview what would be removed.
parsec clean [OPTIONS]
| Option | Description |
|---|---|
--all | Remove ALL parsec worktrees regardless of PR status. |
--dry-run | Preview what would be removed without deleting anything. |
--orphans | Also remove worktrees not tracked by parsec. |
Inspection
Shows the full status of a worktree: uncommitted changes, commits ahead of base, PR state, CI checks, and ticket metadata.
parsec status [TICKET] [OPTIONS]
Fetches and displays full ticket details from your configured issue tracker (Jira, GitHub Issues, or GitLab). Optionally shows comments.
parsec ticket [TICKET] [OPTIONS]
| Option | Description |
|---|---|
--comment | Include comments in the output. |
Shows the diff between the worktree's current state and its base branch. Defaults to full diff output; use --stat or --name-only for a summary.
parsec diff [TICKET] [OPTIONS]
| Option | Description |
|---|---|
--stat | Show diffstat summary (files changed, insertions, deletions). |
--name-only | Show only the names of changed files. |
Scans all active worktrees and reports files modified by more than one of them. Surfaces potential merge conflicts before you open a PR — essential when running multiple parallel agents.
parsec conflicts [OPTIONS]
Fetches the current PR state: review approvals, requested changes, CI check results, and merge readiness. Useful in agent scripts to poll before triggering a merge.
parsec pr-status [TICKET] [OPTIONS]
Shows CI/CD pipeline status for a ticket's branch. With --watch it polls continuously until all checks complete or fail.
parsec ci [TICKET] [OPTIONS]
| Option | Description |
|---|---|
--watch | Poll CI status until completion (useful in scripts). |
--all | Show CI status for all active worktrees. |
Advanced
Updates a worktree by fetching and merging (or rebasing) changes from its base branch. Keeps long-running feature branches current without manually switching contexts.
parsec sync [TICKET] [OPTIONS]
| Option | Description |
|---|---|
--all | Sync all active worktrees at once. |
--strategy <merge|rebase> | Integration strategy. Defaults to merge. |
Opens the associated PR or ticket page in your default browser. By default opens the PR; use --ticket-page to open the issue tracker instead.
parsec open <TICKET> [OPTIONS]
| Option | Description |
|---|---|
--pr | Open the PR/MR page (default). |
--ticket-page | Open the issue tracker page instead. |
Registers an existing git branch as a parsec-managed worktree, linking it to a ticket ID. Use this when you've already started work on a branch outside of parsec.
parsec adopt <TICKET> [OPTIONS]
| Option | Description |
|---|---|
--branch <NAME> | Branch name to adopt (if different from the ticket-derived name). |
--title <TEXT> | Override ticket title for display. |
Displays the dependency graph of stacked PRs created with parsec start --on. With --sync, updates all PRs in the stack to use their correct base branches after an upstream merge.
parsec stack [OPTIONS]
| Option | Description |
|---|---|
--sync | Re-target stacked PRs after an upstream PR was merged. |
Fetches tickets assigned to you from the configured tracker that don't yet have a parsec worktree. Use --pick to interactively select and immediately run parsec start on one.
parsec inbox [OPTIONS]
| Option | Description |
|---|---|
--pick | Interactive mode: select a ticket to immediately start a worktree. |
Renders a Kanban-style sprint board in the terminal, pulling data from your configured tracker. Shows ticket titles, statuses, and assignees.
parsec board [OPTIONS]
| Option | Description |
|---|---|
--board-id <ID> | Target a specific board by ID. |
--project <KEY> | Filter by project key. |
--assignee <USER> | Filter tickets by assignee. |
--all | Show tickets for all assignees. |
History
Displays a chronological log of all parsec operations: start, ship, merge, clean, undo, etc. Use --last N to limit output.
parsec log [TICKET] [OPTIONS]
| Option | Description |
|---|---|
--last <N> | Show only the last N operations. |
Rolls back the most recent parsec operation. For example, undoing a ship removes the PR and restores the worktree. Use --dry-run to see what would happen without committing.
parsec undo [OPTIONS]
| Option | Description |
|---|---|
--dry-run | Preview what undo would do without making any changes. |
Setup
Prints the absolute path of the main (non-worktree) repository root. Useful in scripts to navigate back to the primary workspace from any worktree.
parsec root [OPTIONS]
Prints a shell integration script that enables automatic cd when using parsec switch, and automatic working-directory recovery after parsec merge removes a worktree you were inside. Use --install to auto-append the integration to your shell config file instead of managing it manually.
parsec init [SHELL] [--install] [--yes]
| Argument / Option | Description |
|---|---|
[SHELL] | Shell to generate integration for. Supported: zsh, bash, fish. Defaults to zsh. |
--install | Auto-append eval "$(parsec init <shell>)" to your shell config file with a confirmation prompt. |
-y, --yes | Skip the confirmation prompt. Useful for scripted or non-interactive environments. |
Top-level configuration command with subcommands for initial setup, showing current config, generating shell completions, and reading the manual.
parsec config <SUBCOMMAND> [OPTIONS]
| Subcommand | Description |
|---|---|
init | Run interactive first-time setup (tracker URL, API tokens, default branch). |
show | Display current configuration (redacts sensitive tokens). |
man | Open the parsec manual in your pager. |
completions <SHELL> | Generate shell completion script for zsh, bash, or fish. |
shell | Deprecated. Use parsec init <SHELL> instead. |
Checks your environment and prints ✓/✗ for each item with actionable fix instructions. Verifies git version, config file, API tokens, tracker connectivity, shell integration, tab completions, and remote access.
parsec doctor [OPTIONS]
| Option | Description |
|---|---|
--json | Output results as JSON ({"checks":[...],"all_ok":bool}). |
--ai | Include AI-powered diagnostic suggestions for failed checks. |
Creates a new ticket on GitHub Issues or Jira and optionally starts a worktree for it immediately. Auto-detects the tracker from your config.
parsec create [OPTIONS]
| Option | Description |
|---|---|
--title <TEXT> required | Issue title. |
--body <TEXT> | Issue body / description. |
--label <A,B> | Comma-separated labels to apply. |
-p, --project <KEY> | Jira project key (auto-detected from config if omitted). |
--start | Start a worktree for the new issue immediately after creation. |
Extended issue creation with multi-label support and Jira issue type control. Auto-detects GitHub or Jira from config.
parsec new-issue [OPTIONS]
| Option | Description |
|---|---|
--title <TEXT> required | Issue title. |
--body <TEXT> | Issue body / description. |
--label <LABEL> | Label (can be specified multiple times). |
-p, --project <KEY> | Jira project key (auto-detected from config if omitted). |
--issue-type <TYPE> | Jira issue type (default: Task). |
--start | Auto-start a worktree for the new issue. |
Reassigns an existing worktree to a different ticket ID. Updates the branch name, directory symlink, and internal state — useful when a ticket is split, renumbered, or moved between trackers.
parsec rename <OLD-TICKET> <NEW-TICKET> [OPTIONS]
| Argument | Description |
|---|---|
<OLD-TICKET> required | The current ticket ID of the workspace to rename. |
<NEW-TICKET> required | The new ticket ID to assign to the workspace. |
| Option | Description |
|---|---|
--dry-run | Preview what would be renamed without making changes. |
Merges the develop branch into the release branch (default: main), creates a version tag, and creates a GitHub Release with auto-generated changelog from commit messages since the last tag.
parsec release <VERSION> [OPTIONS]
| Argument | Description |
|---|---|
<VERSION> required | Version string (e.g., 0.3.0). |
| Option | Description |
|---|---|
--from <BRANCH> | Source branch to release from (default: develop). |
--no-github-release | Skip creating a GitHub Release. |
--dry-run | Show what would happen without making changes. |
Error Codes
All parsec commands exit with a structured exit code. Use these in scripts to handle failures precisely. JSON output (--json) also includes an "error_code" field on failure.
| Exit Code | Name | Description |
|---|---|---|
0 | Success | Command completed successfully. |
1 | GeneralError | Unspecified error — check stderr for details. |
2 | ConfigError | Missing or invalid configuration (run parsec config init). |
3 | TrackerError | Could not reach or authenticate with the issue tracker. |
4 | GitError | Git operation failed (merge conflict, missing remote, etc.). |
5 | WorktreeError | Worktree already exists, is missing, or is in a bad state. |
6 | NotFound | Ticket or workspace not found. |
7 | AuthError | API token missing or insufficient permissions. |
8 | PolicyViolation | Operation blocked by an active policy rule. |
Policy Config
The [policy] table in ~/.config/parsec/config.toml lets teams enforce guardrails on parsec operations. Violations exit with code 8 (PolicyViolation) and print an actionable message.
| Key | Type | Description |
|---|---|---|
require_ticket_prefix | String | All ticket IDs must match this prefix (e.g., "PROJ-"). Prevents freeform branch names. |
max_open_workspaces | u32 | Block parsec start when open workspace count reaches this limit. |
protected_branches | [String] | Branches that parsec ship and parsec merge will refuse to target (e.g., ["main", "production"]). |
require_pr_review | bool | When true, parsec ship checks that at least one review is approved before merging. |
allow_force_push | bool | When false (default), parsec ship refuses to push with --force. |