Skip to main content

Command reference

All commands accept -h/--help. Global flags (--no-color, --no-input, --verbose, --version) apply to every command and must come before the subcommand name.


Quick reference

CommandWhat it does
arc setupVerify environment, configure git
arc initInitialize a stack
arc newCreate a branch and add it to the stack
arc addAdopt an existing branch into the stack
arc statusShow the stack
arc syncFetch + cascade rebase
arc rebaseCascade-rebase all or part of the stack
arc restackRestack one branch without a full sync
arc pushForce-push all branches
arc submitCreate or update PRs
arc landLand a merged PR, restack above
arc editAmend a branch's commit and cascade the change up
arc amendAppend PR link to commit message
arc dropRemove a branch, restack above
arc checkoutSwitch to a branch by name or index
arc up / arc downMove through the stack
arc top / arc bottomJump to stack ends
arc tipCreate/update arc-tip branch at the stack's top
arc stack analyzeCritical path, safe-to-land branches, blockers
arc stack snapshotFull stack snapshot: status + PR health + analysis
arc doctorCheck environment and stack validity
arc dashboardInteractive TUI for PR status
arc configRead and write arc configuration
arc reportFile a bug or feedback issue
arc schemaPrint JSON Schema for a command's --json output
arc upgradeUpgrade arc to the latest version
arc completionsPrint shell completion script

arc setup

arc setup [-q]

Checks that git and gh are on PATH, that gh is authenticated, and that git rerere is enabled. Enables rerere if it isn't. Does not modify any repo state.

Run this on every new machine before using arc.


arc init

arc init [--base <branch>] [--prefix <prefix>] [-q]

Initializes a stack in the current repo.

FlagDefaultDescription
--baserepo default branchTrunk branch the stack is rooted on
--prefix(none)Prepended to branch names created by arc new
-qfalseSuppress output

Creates .arc/state.json (git-ignored), adds it to .gitignore, and scaffolds .arc/hooks/ with sample files. Safe to re-run — updates base/prefix in place.


arc new

arc new <branch> [-q]

Creates a new git branch from the current HEAD, adds it to the top of the stack, and checks it out. If a prefix is set, arc new auth creates feat/auth.


arc add

arc add <branch> [-q]

Adopts an existing local branch into the stack at the current position (above the current branch). The branch must already exist; arc add does not create it.


arc status

arc status [--json | --plain] [-q]

Shows the current stack: branch names, positions, commit counts, PR numbers and states, and which branch is current.

FlagDescription
--jsonStructured JSON output (see JSON output)
--plainBranch names only, one per line
-qSuppress extra output

arc sync

arc sync [-n] [-q] [--json] [--skip-hooks]

Fetches from remote, then cascade-rebases the stack bottom-up. Fires pre-sync and post-sync hooks.

FlagDescription
-nDry run: show the rebase plan without executing
-qQuiet
--jsonStructured output
--skip-hooksSkip pre-sync/post-sync hooks

If a conflict occurs, arc exits with code 3. Resolve the conflict, then run arc rebase --continue. See Syncing.


arc rebase

arc rebase [--upstack | --downstack | <branch>] [--continue | --abort] [-n] [-q]

Cascade-rebases all or part of the stack (without fetching from remote).

FlagDescription
(no flag)Rebase the entire stack
--upstackCurrent branch and everything above it
--downstackCurrent branch and everything below it
--continueResume after a conflict
--abortRoll back all branches to their pre-rebase state
-nDry run
-qQuiet

arc restack

arc restack [<branch>] [-n] [-q]

Rebases one branch onto its parent in the stack without touching the branches above it. Faster than a full arc rebase when only one branch needs updating.


arc push

arc push [-n] [-q] [--json] [--skip-hooks]

Force-pushes all stack branches to remote in order (bottom to top). Increments each branch's revision counter. Fires pre-push and post-push hooks.

FlagDescription
-nDry run
-qQuiet
--jsonStructured output
--skip-hooksSkip pre-push/post-push hooks

arc submit

arc submit [--draft | --open] [--skip-hooks] [-n] [-q] [--json]

Creates or updates PRs for each branch in the stack. Each PR targets the branch below it (or the base for the bottommost). Injects a stack map into every PR description. Once 2+ PRs exist, also registers the chain as a native GitHub stack (see Configuration). Fires pre-submit and post-submit hooks.

FlagDescription
--draftForce all PRs to draft mode
--openMark all draft PRs as ready for review
--skip-hooksSkip pre-submit/post-submit hooks
-nDry run
-qQuiet
--jsonStructured output

arc land

arc land [<branch>] [-f] [-n] [-q] [--json] [--skip-hooks] [--keep-branch]

Lands a merged PR: verifies the merge, detects squash-merge vs regular merge, rebases branches above onto the base, removes the branch from the stack, and deletes the local branch. Fires pre-land and post-land hooks.

FlagDefaultDescription
<branch>current branchBranch to land
-ffalseSkip confirmation prompt
--keep-branchfalseDelete from stack but keep the local git branch
-nfalseDry run
-qfalseQuiet
--jsonfalseStructured output
--skip-hooksfalseSkip hooks

If restacking hits a conflict, arc pauses. Resolve it, run arc rebase --continue, then re-run arc land -f to finish.


arc edit

arc edit [<branch>] [-m <message>] [--interactive] [--no-push]
[--continue | --abort] [--skip-hooks] [--dry-run] [-q] [--json]

Amends a branch's HEAD commit and cascade-rebases all branches above it. Same pause-and-resume conflict safety as arc sync.

FlagDescription
<branch>Branch to amend (defaults to current branch)
-mNew commit message (omit to keep current message)
--interactiveInteractive rebase within the branch before amending
--no-pushSkip the force-push after restack
--continueResume after a conflict
--abortUndo the edit and restore the original state
--skip-hooksSkip pre-edit/post-edit hooks
--dry-runPreview what would happen
-qQuiet
--jsonStructured output

Example:

git add src/auth.py
arc edit feat/auth # amend feat/auth, restack api and ui
arc edit feat/auth -m "fix: improve error handling" # change message too

arc amend

arc amend [-q]

Appends the PR link and stack position to the HEAD commit message. Run after arc submit to make git log on landed commits trace back to the PR.


arc drop

arc drop <branch> [-f] [-n] [-q] [--json]

Removes a branch from the stack and restacks the branches above it. Deletes the local branch. Does not check GitHub — use arc land if the PR is merged.

FlagDescription
<branch>Branch to remove
-fSkip confirmation
-nDry run
-qQuiet
--jsonStructured output

arc checkout

arc checkout <name | index>

Switches to a stack branch by name or 1-based index. arc checkout 1 checks out the bottommost branch. arc checkout feat/api works exactly like git checkout feat/api but limited to stack branches.


arc up arc down

arc up [n]
arc down [n]

Moves n branches toward the top (up) or toward the base (down). n defaults to 1.


arc top arc bottom

arc top
arc bottom

Jumps to the topmost or bottommost branch in the stack.


arc tip

arc tip

Creates (or updates) an arc-tip branch pointing at the topmost branch in the stack, and checks it out. Once arc-tip exists, arc keeps it current whenever the stack changes shape.


arc stack analyze

arc stack analyze [--json]

Shows the critical path (longest chain of unmerged PRs), which branches are safe to land now, and which are blocked. Useful for planning the order of reviews.


arc stack snapshot

arc stack snapshot [--json]

Full snapshot: arc status + PR health (CI status, review decisions, draft state) + analysis output in one call. Designed for dashboards and scripts.


arc doctor

arc doctor

Checks git, gh, authentication, stack validity, and any paused rebase or edit state. Prints a pass/fail for each check and hints for what to fix.


arc dashboard

arc dashboard

Launches an interactive TUI showing all PRs in the stack with their CI status, review decisions, and draft state. Use arrow keys to navigate. Press q to quit.


arc config

arc config list
arc config get <key>
arc config set <key> <value>

Reads and writes .arc/config.json (committed, shared with your team). See Configuration for the full schema.


arc report

arc report [--bug | --feedback] [--message <text>] [-n] [-q]

Files a GitHub issue in arc's own repo (yash-srivastava19/arc-stack), not in your current repo. Opens an interactive prompt if --message is omitted.

FlagDescription
--bugLabel as a bug report
--feedbackLabel as a feature request / feedback
--messageIssue body (skips interactive prompt)
-nDry run: print what would be filed without creating the issue

arc schema

arc schema {status | submit | analyze}

Prints the JSON Schema for a command's --json output. Use to validate arc output in typed pipelines.


arc upgrade

arc upgrade

Upgrades arc using the package manager that installed it (Homebrew, pipx, or uv tool).


arc completions

arc completions {bash | zsh | fish}

Prints the shell completion script for the given shell. See Install for setup instructions.