Skip to main content

High-leverage commands

These are the commands most likely to change how you work day to day.

System health: ,doctorโ€‹

  • Source: home/exact_bin/executable_,doctor
  • Checks: chezmoi state, Homebrew, shell, tmux+TPM, git+signing, SSH agent, pass/GPG, editors, AI tools, key CLIs, ~/bin wrapper integrity, and worktrees. Missing AI configs are reported only when their actual consumer command is installed.
  • Pi runtime: ~/lib/,doctor/pi_runtime.py reads the pi pnpm shim's cmd-shim-target, warns when that install directory was pruned by a later pnpm add -g (the state that makes every pi-subagents background launch fail with "does not provide @earendil-works/pi-agent-core โ€ฆ"), and warns when the live install lacks a peer that pi-subagents aliases. The hint is the reinstall command plus a restart of running Pi sessions.
  • AI effective state: ,doctor ai traces each generated AI config from source declaration and transforms through owned target projection, runtime consumer, and an optional local liveness probe.
,doctor
,doctor --quiet
,doctor --verbose
,doctor ai
,doctor ai --json
,doctor ai --live --verbose

,doctor ai is static by default and never applies configs, refreshes tokens, or contacts remote services. --live runs each distinct local harness --version probe once, even when several artifacts share that consumer.

Worktrees: ,wโ€‹

,w add feat/my-change main
,w prs 12345
,w issue 12345
,w switch
,w doctor

For the full workflow, see Git worktrees.

GitHub lookup and bootstrapโ€‹

CommandPurpose
,gh-prwResolve/open the current branch's PR; can print number or URL
,gh-issuewResolve/open the issue from branch suffix, worktree metadata, or PR body
,gh-worktreeCreate or reuse local PR/issue worktrees from GitHub context
,gh-tforkFork/clone a repo and create a tmux session

Sources live under home/exact_bin/.

,gh-prw --url
,gh-issuew --number
,gh-tfork owner/repo

,gh-tfork clones to ~/code/<repo>/<default-branch>.

Patch, file, and clipboard transfer: ,whโ€‹

  • Source: home/exact_bin/executable_,wh (thin launcher) โ†’ home/exact_lib/exact_,wh/main.sh
  • ,wh send writes the current staged diff to /tmp/staged.patch and sends it with Magic Wormhole.
  • ,wh send <path> sends a single file or archives a directory first.
  • ,wh send --clip sends the clipboard: text is sent as text, images are sent as PNG.
  • cmd | ,wh send - sends piped stdin.
  • ,wh recv receives and auto-detects: apply patch, load a clipboard envelope, extract archive, or save file/dir. Patches first use direct git apply, preserving the existing unstaged behavior when it succeeds. If direct application fails, ,wh attempts git apply --3way; Git stages a clean three-way result. A conflict leaves standard conflict markers and unmerged index entries for later resolution, and the command exits non-zero. A received clipboard envelope is loaded into the clipboard (text is also echoed to stdout, PNG restores the image); add --save to write the payload to -o/CWD instead.
  • Fish and Zsh completions cover send, recv, --clip, path arguments, --save, and -o/--output.
,wh send # send staged diff
,wh send ./src # send a directory
,wh send notes.md # send a single file
,wh send --clip # send the clipboard (text or image)
cmd | ,wh send - # send piped stdin
,wh recv # receive (prompts for code), auto-handle
,wh recv -o ~/inbox # save received file/dir into ~/inbox

Multi-PR patching: ,add-patch-to-prsโ€‹

,add-patch-to-prs ./fix.patch 12345 12346
,add-patch-to-prs ./fix.patch --search "is:open author:@me"
,add-patch-to-prs ./fix.patch --message "Apply follow-up fix"

Telegram TUI launcher: ,tgโ€‹

  • Source: home/exact_bin/executable_,tg
  • Runs tele from Homebrew and forwards all args except a leading -h/--help.
  • When pass entries telegram/apps/tuilegram/app_id and telegram/apps/tuilegram/api_hash exist, first sets telegram.api_id and telegram.api_hash with yq in the config tele will read: the -config/--config value, or ~/.config/tele/config.yml.
  • Keeps other settings and comments in that file. A missing file gets tele's default config first (tele -config <path> -theme-check).
,tg
,tg -e
,tg --version
,tg -config ~/.config/tele/work.yml
,tg --help

Package and icon reconverge helpersโ€‹

CommandPurpose
,pull-rebaseResolve branch upstream and run git pull --rebase behind a confirmation prompt
,install-pnpm-pkgsReconcile global pnpm packages against ~/.default-pnpm-pkgs; name@x.y.z entries pin an exact version (upgrades skip pinned packages); reports pnpm errors and refreshes ~/.local/share/pnpm-global-links even after a partial sync
,apply-app-iconsApply app icon mappings from home/app_icons/readonly_icon_mapping.yaml, refreshing Dock/Finder by signaling only the current user's own numeric PIDs (no killall/pkill)

tmux helpersโ€‹

CommandPurpose
,tmux-run-allRun one command across matching tmux sessions
,tmux-lowfiStart/control lowfi in a dedicated tmux session
,tmux-run-all "work-*" "git status"
,tmux-run-all --all "work-*" "pnpm run test -- --watch=false"
,tmux-lowfi p
,tmux-lowfi nt
,tmux-lowfi q