Skip to main content

CLI Commands

Global flags


partio enable

Enable partio in the current Git repository.
What it does:
  1. Verifies you’re inside a Git repository
  2. Ensures the .partio/ config directory exists
  3. Writes a default settings.json (existing config is preserved)
  4. Adds .partio/settings.local.json to .gitignore
  5. Installs Git hooks (pre-commit, post-commit, pre-push)
  6. Ensures the partio/checkpoints/v1 orphan branch exists
partio enable is idempotent — safe to re-run at any time to repair hooks or restore settings. Re-running preserves your existing configuration (it only flips enabled back to true if partio was disabled) and never overwrites custom values. --absolute-path: By default, hooks invoke partio by name and rely on PATH resolution at hook execution time. Use --absolute-path if partio is not on PATH in your hook execution environment — for example, when using nix, asdf, mise, or system-level git hooks.
This embeds the resolved absolute path of the partio binary into the installed hook scripts. Output:
External hook managers: If partio detects another Git hook manager — Husky, Lefthook, or Overcommitpartio enable prints a warning with integration instructions and continues (it does not abort). partio’s hooks must be invoked from within your hook manager’s configuration via partio _hook <hook-name> so both run:

partio disable

Disable partio in the current repository.
What it does:
  1. Removes partio-managed hooks from .git/hooks/
  2. Restores any backed-up original hooks
  3. If --remove-data: deletes .partio/ directory
Output (default):

partio status

Show partio status for the current repository. Also runs automatic stale session cleanup before displaying results.
Output (enabled):
Output (not enabled):

partio rewind

List or restore checkpoints.
--list output:
--list --branch output: Filters the list to checkpoints whose branch name exactly matches the given value:
This is the recommended way to find sessions for a branch that was squash-merged into main. --to output:
This creates a new branch named partio/rewind/<id> checked out at the checkpoint’s commit. If the original commit is no longer reachable (e.g. the branch was squash-merged and the original commits were garbage-collected), partio emits a warning and exits without creating a rewind branch — the session context is still shown:

partio resume

Resume a session from a checkpoint. Reads checkpoint data from the orphan branch and launches a new Claude Code session with the previous context.
Default behavior: Writes a context file to a temporary directory and launches Claude Code with instructions to read it and continue the previous work. If Claude Code is not found in PATH, the context is printed to stdout instead. With --branch-name: Finds all checkpoints for the named branch, selects the most recent one by creation time, and resumes it. This is the recommended approach for sessions whose branch was squash-merged into main:
Either a positional <checkpoint-id> or --branch-name is required; invoking resume with neither exits non-zero with a usage error. With --branch: Creates a new branch named partio/resume/<id> checked out at the checkpoint’s commit before launching.
With --print:
Prints the composed context prompt (including the original request, plan, diff, and session metadata) to stdout without launching Claude Code. With --copy: Copies the context prompt to the system clipboard (macOS and Linux).

partio doctor

Check partio installation health.
Checks performed:
  1. .partio/ directory exists
  2. pre-commit hook installed, readable, and managed by partio
  3. post-commit hook installed, readable, and managed by partio
  4. pre-push hook installed, readable, and managed by partio
  5. partio/checkpoints/v1 branch exists
  6. partio binary found in PATH
Output (healthy):
Output (issues found):

partio prune

Delete checkpoints older than a retention window from the partio/checkpoints/v1 branch.
The checkpoint linked to the current HEAD is never removed. partio rebuilds the orphan branch’s tree with git plumbing to drop the pruned entries. Dry-run output:
Real run output:
If nothing qualifies:

partio reset

Reset the checkpoint branch. This deletes all stored checkpoint data and recreates the branch.
Output:
This permanently deletes all checkpoint data. This cannot be undone.

partio clean

Remove orphaned checkpoint data.
Scans the checkpoint branch for data that no longer corresponds to any commit. Output:

partio cleanup

Manually clean up stale session files left behind by crashed or improperly terminated agent processes.
A session is considered stale when:
  • It is in ACTIVE or IDLE state, and
  • Its state file has not been updated within the configured threshold (default: 10 minutes), and
  • If a process ID is recorded, the agent process is no longer alive.
Output (stale session found):
Output (no stale sessions):
partio status also runs stale cleanup automatically before displaying results, so manual invocation is usually not necessary. Not to be confused with partio clean, which removes orphaned checkpoint data.

partio version

Print the partio version.
Output: