| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Perch helps developers park AI coding sessions and resume them later from the CLI, menu bar, or Raycast. Run /perch inside a supported coding agent, and Perch saves the current session into ~/.config/perch/sessions.json.
AI coding sessions are valuable context, but every agent has a different way to resume work. Perch gives you one local, agent-agnostic parking lot for those sessions so you can:
Install the Perch CLI and supported agent /perch commands:
curl -fsSL https://raw.githubusercontent.com/ReScienceLab/Perch/main/install.sh | shThen:
perch doctorPerch stores sessions locally only; no service or account is required.
# 1. Save the current AI coding session from inside a supported agent
/perch Backend: finish OAuth callback
# 2. Later, list parked sessions from any terminal
perch list
# 3. Resume from the saved project directory
cd '/path/to/project' && claude --resume <session-id>
Prefer a launcher? Open Raycast's Search Sessions command or the Perch menu bar icon, choose a parked session, and Perch copies the right project-aware resume command for you.
| Agent | /perch install | Resume command |
|---|---|---|
| Claude Code | Automatic | claude --resume <id> |
| Codex | Automatic | codex resume <id> |
| Pi | Automatic | pi --session <id> |
| Droid | Automatic | droid --resume <id> |
| OpenCode | Automatic | opencode session resume <id> |
| Hermes | Automatic | hermes --resume <id> |
| Goose | Manual CLI add | goose session -r --name <id> |
| Kiro | Manual CLI add | kiro-cli chat --resume-id <id> |
| Windsurf | Manual CLI add | windsurf <working-dir> |
| Cursor | Manual CLI add | cursor <working-dir> |
| Trae | Manual CLI add | trae <working-dir> |
| Amp | Manual CLI add | amp threads continue <id> |
Automatic means install.sh detects the agent binary and installs /perch into that agent's command/skill directory. Manual CLI add means Perch supports the resume command, but there is no installed slash-command path yet.
Recommended remote install:
curl -fsSL https://raw.githubusercontent.com/ReScienceLab/Perch/main/install.sh | shYou can also download prebuilt release assets from the latest GitHub Release.
Local repo install for contributors:
git clone https://github.com/ReScienceLab/Perch.git
cd Perch
./install.shThe installer is idempotent. It:
Installer environment flags:
PERCH_INSTALL_APP=0 # skip native menu bar app installation
PERCH_INSTALL_APP=1 # force native menu bar app installation on macOS
PERCH_APP_INSTALL_DIR=... # override app install directory; default ~/.local/share/perch
PERCH_OPEN_APP=0 # install but do not open PerchApp after installMake sure ~/.local/bin is in your shell PATH and is also visible inside your coding agents. Run perch doctor after installation for actionable diagnostics.
| Agent | Installed file |
|---|---|
| Claude Code | ~/.claude/commands/perch.md |
| Codex | ~/.codex/skills/perch/SKILL.md |
| Pi | ~/.pi/agent/skills/perch/SKILL.md |
| Droid | ~/.factory/skills/perch/SKILL.md |
| OpenCode | ~/.config/opencode/commands/perch.md |
| Hermes | ~/.hermes/skills/perch/SKILL.md |
On macOS, the one-line installer installs and opens the native menu bar app by default:
curl -fsSL https://raw.githubusercontent.com/ReScienceLab/Perch/main/install.sh | shThe app is installed to ~/.local/share/perch/PerchApp unless PERCH_APP_INSTALL_DIR is set. The Perch icon appears in the menu bar. Open it to view active and completed sessions.
Control the app from the CLI:
perch menubar start [--app-path <path>]
perch menubar stop
perch menubar status
perch menubar login enable [--app-path <path>]
perch menubar login disable
perch menubar login statusperch menubar login enable writes ~/Library/LaunchAgents/com.resciencelab.perch.plist and uses launchctl bootstrap/enable for the current GUI user. The LaunchAgent runs with your user privileges and only launches the configured PerchApp binary. The installer opens the app after install but does not enable launch-at-login automatically.
If launch-at-login fails with permission errors, check that your terminal has the required macOS privacy permissions for writing ~/Library/LaunchAgents and running launchctl in your GUI session.
Local development still requires macOS 13+ and a Swift toolchain:
cd App
swift build
.build/debug/PerchAppPerch also includes a Raycast extension for searching, resuming, and managing parked sessions from Raycast.
cd raycast-extension
npm install
npm run devAvailable commands:
Run npm run lint and npm run build in raycast-extension/ before publishing or submitting changes.
Inside a supported agent:
/perch [optional title]
Examples:
/perch
/perch Backend: add auth endpoint
If you omit the title, the agent generates a short Project: action title.
Inside a supported agent:
/perch done
Or from a terminal:
perch done <perch-id-or-prefix>
perch done --session-id <agent-session-id>Open the Perch menu bar item, open a session's submenu, and choose Delete Session. This removes the saved Perch entry only; it does not delete the underlying agent history from Claude/Codex/Pi/etc.
Open the Perch menu bar item and click a session. Perch copies a project-aware shell command to your clipboard:
cd '/absolute/path/to/project' && claude --resume <id>
cd '/absolute/path/to/project' && pi --session <id>
cd '/absolute/path/to/project' && opencode session resume <id>Paste it into any terminal to resume from the correct working directory.
Use this for agents that do not yet have an installed /perch command:
perch add \
--title "MyApp: fix login" \
--agent claude \
--session-id <id> \
--working-dir "$PWD"For workspace-based agents such as Cursor/Windsurf/Trae, Perch stores the working directory and creates the appropriate resume command:
perch add --title "Site: continue CSS" --agent cursor --session-id unused --working-dir "$PWD"perch add --title "..." --agent <agent> --session-id <id> [--working-dir <dir>] [--note "..."] # create or update
perch list
perch list --all
perch list --all --json
perch done <perch-id-or-prefix>
perch done --session-id <agent-session-id>
perch reopen <perch-id-or-prefix>
perch reopen --session-id <agent-session-id>
perch menubar start [--app-path <path>]
perch menubar stop
perch menubar status
perch menubar login enable [--app-path <path>]
perch menubar login disable
perch menubar login status
perch doctor
perch doctor --jsonperch add is an upsert keyed by agent + session_id:
Perch uses one shared command file. The agent identifies itself (claude, codex, pi, droid, opencode, or hermes) and runs only its own session detector.
Current fast paths and fallbacks:
The command is intentionally strict: it should not try another agent's detector just because that binary exists on your machine.
flowchart LR
Agent[AI coding agent] -->|/perch title| Command[Shared /perch command]
Command --> CLI[perch CLI]
Terminal[Terminal] --> CLI
Raycast[Raycast extension] --> Store[(sessions.json)]
MenuBar[macOS menu bar app] --> Store
CLI --> Store
Store --> Resume[Project-aware resume command]
Resume --> Agent
Perch keeps the core simple: supported agents call the same installed command, the CLI writes local session records, and UI surfaces read the same sessions.json file.
Sessions are stored locally at:
~/.config/perch/sessions.json
Each entry looks like:
{
"id": "perch-entry-uuid",
"agent": "claude",
"session_id": "agent-native-session-id",
"working_dir": "/path/to/project",
"title": "Project: action",
"note": "",
"priority": "medium",
"status": "pending",
"created_at": "2026-05-18T10:00:00Z",
"updated_at": "2026-05-18T10:30:00Z",
"resume_cmd": "claude --resume agent-native-session-id"
}The schema is documented in schema/session.json.
Open config from the menu bar (Open Config) or edit:
~/.config/perch/config
Default file:
# Perch configuration
terminal = ghostty
sort-by = date
max-sessions = 20
auto-start = true
show-badge = trueshow-badge controls whether the menu bar icon shows the pending session count. Other keys are kept for app behavior and future UI options.
Run the full test suite:
./scripts/test.shRun individual suites:
cargo test --manifest-path cli/Cargo.toml
cd App && swift test
./tests/install.sh
python3 tests/schema.pyBuild release artifacts locally:
cargo build --release --manifest-path cli/Cargo.toml
cd App && swift build -c releaseQuick checks:
perch doctor
perch doctor --json
perch list --allMost setup issues come from one of these causes:
Add ~/.local/bin to your PATH, then restart the agent so it inherits the updated environment.
Update the relevant agent and reinstall Perch:
./install.shFor Claude Code, newer versions expose CLAUDE_CODE_SESSION_ID to Bash tools, which is the fastest path.
Check what the CLI sees:
perch list --allAlso verify that ~/.config/perch/sessions.json exists and contains valid JSON.
Check app status:
perch menubar statusRe-run the installer with app installation enabled:
PERCH_INSTALL_APP=1 ./install.shIf a checksum mismatch is reported, the artifact was not installed. Retry later or install from a known-good release asset.
Inspect and reset the LaunchAgent:
perch menubar login status
perch menubar login disable
perch menubar login enablePerch is released under the MIT License. See LICENSE.
| Back | FazBrowse Home | New Git URL |