Global Options — available on every command

--json machine-readable output
-q / --quiet suppress non-essential output
--repo <PATH> target repository path
--dry-run preview changes without executing

Core Workflow

start Create a new worktree for a ticket #

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.

Usage parsec start <TICKET> [OPTIONS]
ArgumentDescription
<TICKET> required Ticket ID to create a worktree for (e.g. PROJ-123, 42).
OptionDescription
--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.
parsec start
# Create workspace from a Jira ticket $ parsec start PROJ-123 Created worktree for PROJ-123 Title: Add user authentication flow Branch: feature/PROJ-123 Path: ../myrepo.PROJ-123   # Stack on another ticket (for dependent PRs) $ parsec start PROJ-124 --on PROJ-123 Created worktree, base: feature/PROJ-123   # Offline — override title manually $ parsec start PROJ-125 --title "Fix login redirect"
list List all active worktrees #

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.

Usage parsec list [--full] [--no-pr]
OptionDescription
--fullShow extended metadata: unpushed commits, ahead/behind divergence, last commit message and age.
--no-prSkip fetching PR status from GitHub/GitLab (faster output, works offline).
parsec list
$ parsec list TICKET BRANCH STATUS PATH ───────────────────────────────────────────────────────────── PROJ-123 feature/PROJ-123 open PR ../myrepo.PROJ-123 PROJ-125 feature/PROJ-125 no PR ../myrepo.PROJ-125 PROJ-130 feature/PROJ-130 merged ../myrepo.PROJ-130   # Extended metadata per worktree $ parsec list --full TICKET BRANCH STATUS AHEAD/BEHIND UNPUSHED LAST COMMIT AGE ────────────────────────────────────────────────────────────────────────────────────── PROJ-123 feature/PROJ-123 open PR +3 / -0 1 Add rate limiting 2h ago PROJ-125 feature/PROJ-125 no PR +1 / -2 0 Fix auth redirect 30m ago
switch Print workspace path (auto-cd with shell integration) #

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.

Usage parsec switch [TICKET] [OPTIONS]
ArgumentDescription
[TICKET] Ticket ID to switch to. If omitted, shows an interactive picker.
parsec switch
# With shell integration — auto-cd into the worktree $ parsec switch PROJ-123 ~/projects/myrepo.PROJ-123 # shell: cd ~/projects/myrepo.PROJ-123   # Without shell integration — use in a subshell $ cd $(parsec switch PROJ-123)
ship Push, create PR/MR, and clean up #

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.

Usage parsec ship <TICKET> [OPTIONS]
ArgumentDescription
<TICKET> requiredTicket ID of the worktree to ship.
OptionDescription
--draftOpen the PR as a draft (GitHub only).
--no-prPush the branch but skip creating a PR/MR.
--base <BRANCH>Override the target base branch for the PR.
--skip-hooksSkip pre-ship hooks defined in [hooks] config.
parsec ship
$ parsec ship PROJ-123 Pushed feature/PROJ-123 (7 commits) PR #42 created: github.com/org/myrepo/pull/42 Worktree cleaned up   # Open as draft PR $ parsec ship PROJ-125 --draft Draft PR created: github.com/org/myrepo/pull/43
merge Merge PR on GitHub and clean up #

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.

Usage parsec merge [TICKET] [OPTIONS]
OptionDescription
--rebaseUse rebase strategy instead of merge commit.
--no-waitTrigger the merge and return immediately without waiting.
--no-delete-branchKeep the remote branch after merging.
parsec merge
$ parsec merge PROJ-123 PR #42 merged into main Remote branch deleted Worktree removed
clean Remove merged or stale worktrees #

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.

Usage parsec clean [OPTIONS]
OptionDescription
--allRemove ALL parsec worktrees regardless of PR status.
--dry-runPreview what would be removed without deleting anything.
--orphansAlso remove worktrees not tracked by parsec.
parsec clean
# Preview first $ parsec clean --dry-run Would remove: ../myrepo.PROJ-123 (merged) Would remove: ../myrepo.PROJ-130 (merged)   $ parsec clean Removed 2 merged worktrees

Inspection

status Show detailed workspace status #

Shows the full status of a worktree: uncommitted changes, commits ahead of base, PR state, CI checks, and ticket metadata.

Usage parsec status [TICKET] [OPTIONS]
parsec status
$ parsec status PROJ-123 Ticket: PROJ-123 — Add user authentication flow Branch: feature/PROJ-123 Ahead: 3 commits ahead of main Changed: 2 files modified, 1 untracked PR: #42 open — 1 review approved CI: passing (3/3 checks)
ticket View ticket details from tracker #

Fetches and displays full ticket details from your configured issue tracker (Jira, GitHub Issues, or GitLab). Optionally shows comments.

Usage parsec ticket [TICKET] [OPTIONS]
OptionDescription
--commentInclude comments in the output.
parsec ticket
$ parsec ticket PROJ-123 [PROJ-123] Add user authentication flow Status: In Progress Priority: High Assignee: you ...
diff View changes vs base branch #

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.

Usage parsec diff [TICKET] [OPTIONS]
OptionDescription
--statShow diffstat summary (files changed, insertions, deletions).
--name-onlyShow only the names of changed files.
parsec diff
$ parsec diff PROJ-123 --stat src/auth/mod.rs | 84 ++++++++++++++++++++++ src/auth/session.rs | 42 +++++++++++ tests/auth_test.rs | 28 ++++++++ 3 files changed, 154 insertions(+)
conflicts Detect file conflicts across worktrees #

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.

Usage parsec conflicts [OPTIONS]
parsec conflicts
$ parsec conflicts Checking 4 active worktrees... ⚠ src/config.rs modified in PROJ-123 and PROJ-130 No other conflicts found
pr-status Check PR CI and review status #

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.

Usage parsec pr-status [TICKET] [OPTIONS]
parsec pr-status
$ parsec pr-status PROJ-123 PR #42 Add user authentication flow Reviews: 2 approved CI: all checks passing Mergeable: yes   # Machine-readable for agent scripts $ parsec pr-status PROJ-123 --json
ci Check CI/CD status #

Shows CI/CD pipeline status for a ticket's branch. With --watch it polls continuously until all checks complete or fail.

Usage parsec ci [TICKET] [OPTIONS]
OptionDescription
--watchPoll CI status until completion (useful in scripts).
--allShow CI status for all active worktrees.
parsec ci
$ parsec ci PROJ-123 --watch Watching CI for feature/PROJ-123... [ 5s] build running [ 32s] build passed [ 38s] test passed [ 41s] lint passed All CI checks passed

Advanced

sync Sync worktree with base branch #

Updates a worktree by fetching and merging (or rebasing) changes from its base branch. Keeps long-running feature branches current without manually switching contexts.

Usage parsec sync [TICKET] [OPTIONS]
OptionDescription
--allSync all active worktrees at once.
--strategy <merge|rebase>Integration strategy. Defaults to merge.
parsec sync
# Sync one worktree $ parsec sync PROJ-123 Synced feature/PROJ-123 with main (fast-forward)   # Sync all worktrees with rebase strategy $ parsec sync --all --strategy rebase Synced 3 worktrees
open Open PR or ticket in browser #

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.

Usage parsec open <TICKET> [OPTIONS]
OptionDescription
--prOpen the PR/MR page (default).
--ticket-pageOpen the issue tracker page instead.
parsec open
$ parsec open PROJ-123 # opens PR $ parsec open PROJ-123 --ticket-page # opens Jira
adopt Import existing branch into parsec #

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.

Usage parsec adopt <TICKET> [OPTIONS]
OptionDescription
--branch <NAME>Branch name to adopt (if different from the ticket-derived name).
--title <TEXT>Override ticket title for display.
parsec adopt
$ parsec adopt PROJ-123 --branch my-old-branch Adopted branch my-old-branch as PROJ-123
stack Show or manage stacked PR dependencies #

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.

Usage parsec stack [OPTIONS]
OptionDescription
--syncRe-target stacked PRs after an upstream PR was merged.
parsec stack
$ parsec stack main └── feature/PROJ-123 (PROJ-123) PR #42 open └── feature/PROJ-124 (PROJ-124) PR #43 open
inbox List assigned tickets without worktrees #

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.

Usage parsec inbox [OPTIONS]
OptionDescription
--pickInteractive mode: select a ticket to immediately start a worktree.
parsec inbox
$ parsec inbox PROJ-128 Fix pagination bug in search results PROJ-131 Upgrade dependency: serde 1.0.195 PROJ-135 Add dark mode toggle
board Sprint board Kanban view #

Renders a Kanban-style sprint board in the terminal, pulling data from your configured tracker. Shows ticket titles, statuses, and assignees.

Usage parsec board [OPTIONS]
OptionDescription
--board-id <ID>Target a specific board by ID.
--project <KEY>Filter by project key.
--assignee <USER>Filter tickets by assignee.
--allShow tickets for all assignees.
parsec board
$ parsec board TODO IN PROGRESS REVIEW DONE ───────────────────────────────────────────────────── PROJ-128 PROJ-123 PROJ-119 PROJ-111 PROJ-131 PROJ-125 PROJ-112

History

log Show operation history #

Displays a chronological log of all parsec operations: start, ship, merge, clean, undo, etc. Use --last N to limit output.

Usage parsec log [TICKET] [OPTIONS]
OptionDescription
--last <N>Show only the last N operations.
parsec log
$ parsec log --last 5 2024-01-15 14:32 merge PROJ-119 PR #38 merged 2024-01-15 11:20 ship PROJ-123 PR #42 created 2024-01-15 09:05 start PROJ-123 worktree created 2024-01-14 17:44 start PROJ-125 worktree created 2024-01-14 16:30 clean 3 worktrees removed
undo Undo last operation #

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.

Usage parsec undo [OPTIONS]
OptionDescription
--dry-runPreview what undo would do without making any changes.
parsec undo
$ parsec undo --dry-run Would undo: ship PROJ-123 - Close PR #42 - Restore worktree ../myrepo.PROJ-123   $ parsec undo Undid: ship PROJ-123

Setup

root Print main repo root path #

Prints the absolute path of the main (non-worktree) repository root. Useful in scripts to navigate back to the primary workspace from any worktree.

Usage parsec root [OPTIONS]
parsec root
$ parsec root /Users/you/projects/myrepo   # Navigate back from a worktree $ cd $(parsec root)
init Output or install shell integration #

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.

Usage parsec init [SHELL] [--install] [--yes]
Argument / OptionDescription
[SHELL]Shell to generate integration for. Supported: zsh, bash, fish. Defaults to zsh.
--installAuto-append eval "$(parsec init <shell>)" to your shell config file with a confirmation prompt.
-y, --yesSkip the confirmation prompt. Useful for scripted or non-interactive environments.
parsec init
# Preferred: auto-install into ~/.zshrc $ parsec init --install Add shell integration to /home/user/.zshrc? [Y/n] y Shell integration added. Run source ~/.zshrc or restart your shell.   # Non-interactive install (scripted setup) $ parsec init --install --yes   # Manual: print and eval yourself $ eval "$(parsec init zsh)"   # bash users $ eval "$(parsec init bash)"   # fish users $ parsec init fish | source
config Configure parsec #

Top-level configuration command with subcommands for initial setup, showing current config, generating shell completions, and reading the manual.

Usage parsec config <SUBCOMMAND> [OPTIONS]
SubcommandDescription
initRun interactive first-time setup (tracker URL, API tokens, default branch).
showDisplay current configuration (redacts sensitive tokens).
manOpen the parsec manual in your pager.
completions <SHELL>Generate shell completion script for zsh, bash, or fish.
shellDeprecated. Use parsec init <SHELL> instead.
parsec config
# First-time setup wizard $ parsec config init ? Tracker type: jira ? Jira base URL: https://myorg.atlassian.net ? Jira API token: *** Config saved to ~/.config/parsec/config.toml   # Install shell completions (zsh) $ parsec config completions zsh > ~/.zsh/completions/_parsec   # Show current config $ parsec config show
doctor Validate environment and configuration #

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.

Usage parsec doctor [OPTIONS]
OptionDescription
--jsonOutput results as JSON ({"checks":[...],"all_ok":bool}).
--aiInclude AI-powered diagnostic suggestions for failed checks.
parsec doctor
$ parsec doctor git version 2.43.0 (worktree support ok) config file found at ~/.config/parsec/config.toml GitHub token configured (github.com) via gh auth token shell integration not found in shell config Add to ~/.zshrc: eval "$(parsec init zsh)" tab completions not configured Add to ~/.zshrc: eval "$(parsec config completions zsh)" remote origin accessible   2 check(s) failed.   # Machine-readable output $ parsec doctor --json {"checks":[...],"all_ok":false}
create Create a new issue on the tracker #

Creates a new ticket on GitHub Issues or Jira and optionally starts a worktree for it immediately. Auto-detects the tracker from your config.

Usage parsec create [OPTIONS]
OptionDescription
--title <TEXT> requiredIssue 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).
--startStart a worktree for the new issue immediately after creation.
parsec create
$ parsec create --title "Fix login redirect" --label "bug" Created #145: Fix login redirect https://github.com/org/repo/issues/145   # Create and immediately start working $ parsec create --title "Add caching" --start Created #146: Add caching Created workspace at ~/myrepo.146
new-issue Create a new issue (extended) #

Extended issue creation with multi-label support and Jira issue type control. Auto-detects GitHub or Jira from config.

Usage parsec new-issue [OPTIONS]
OptionDescription
--title <TEXT> requiredIssue 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).
--startAuto-start a worktree for the new issue.
parsec new-issue
$ parsec new-issue --title "Implement caching" --issue-type Story --project CL Created CL-42: Implement caching https://jira.example.com/browse/CL-42   # Multiple labels on GitHub $ parsec new-issue --title "Fix auth" --label bug --label priority Created #147: Fix auth
rename Re-ticket an existing workspace #

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.

Usage parsec rename <OLD-TICKET> <NEW-TICKET> [OPTIONS]
ArgumentDescription
<OLD-TICKET> requiredThe current ticket ID of the workspace to rename.
<NEW-TICKET> requiredThe new ticket ID to assign to the workspace.
OptionDescription
--dry-runPreview what would be renamed without making changes.
parsec rename
$ parsec rename PROJ-123 PROJ-456 Branch renamed: feature/PROJ-123-fix-login → feature/PROJ-456-fix-login Workspace directory updated State updated for PROJ-456   # Preview changes first $ parsec rename OLD-99 NEW-100 --dry-run Would rename branch feature/OLD-99-… → feature/NEW-100-… Would update workspace directory and state file
release Create a versioned release #

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.

Usage parsec release <VERSION> [OPTIONS]
ArgumentDescription
<VERSION> requiredVersion string (e.g., 0.3.0).
OptionDescription
--from <BRANCH>Source branch to release from (default: develop).
--no-github-releaseSkip creating a GitHub Release.
--dry-runShow what would happen without making changes.
parsec release
$ parsec release 0.3.0 Merged develop → main Tagged v0.3.0 GitHub Release: github.com/org/repo/releases/tag/v0.3.0   # Preview first $ parsec release 0.4.0 --dry-run Would merge develop → main Would tag v0.4.0 Would create GitHub Release

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 CodeNameDescription
0SuccessCommand completed successfully.
1GeneralErrorUnspecified error — check stderr for details.
2ConfigErrorMissing or invalid configuration (run parsec config init).
3TrackerErrorCould not reach or authenticate with the issue tracker.
4GitErrorGit operation failed (merge conflict, missing remote, etc.).
5WorktreeErrorWorktree already exists, is missing, or is in a bad state.
6NotFoundTicket or workspace not found.
7AuthErrorAPI token missing or insufficient permissions.
8PolicyViolationOperation blocked by an active policy rule.
exit code in scripts
$ parsec ship PROJ-123 --json {"error_code":3,"message":"Could not reach Jira: connection refused"} $ echo $? 3

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.

KeyTypeDescription
require_ticket_prefixStringAll ticket IDs must match this prefix (e.g., "PROJ-"). Prevents freeform branch names.
max_open_workspacesu32Block 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_reviewboolWhen true, parsec ship checks that at least one review is approved before merging.
allow_force_pushboolWhen false (default), parsec ship refuses to push with --force.
~/.config/parsec/config.toml
[policy] require_ticket_prefix = "PROJ-" max_open_workspaces = 5 protected_branches = ["main", "production"] require_pr_review = true allow_force_push = false   # Policy violation example $ parsec start my-feature ✗ Policy violation: ticket ID must start with "PROJ-"