reins reference
The daemon is one binary with a handful of subcommands and flags. This is all of them.
Commands
| Command | What it does |
|---|---|
| reins serve | Run the daemon. Binds 127.0.0.1:7777 and listens on ~/.reins/hook.sock for the shims. |
| reins pair | Print a QR (and the same payload as text) containing every route to the host, the user, host-key fingerprints, the token and an ephemeral SSH key minted for this pairing. Never a password — but treat it like a key. |
| reins install-hooks | Merge the four Claude Code hooks into ~/.claude/settings.json. Idempotent; leaves your other hooks alone. |
| reins uninstall-hooks | Remove exactly what install-hooks added. |
| reins hook <event> | The shim Claude Code calls. You never run this yourself. |
| reins doctor | Print versions, listeners, hook status and phone connection — for bug reports. |
| reins version | Version and commit. |
Flags for serve
| Flag | What it does |
|---|---|
| --listen default 127.0.0.1:7777 | Address the daemon binds for the local shims. Leave it on loopback; the phone bootstraps over SSH and then dials the transport port the daemon grants it. |
| --timeout default 60s | How long a hook waits for the phone before giving up and letting Claude Code prompt at the desk. |
| --allow-chat-send default true | Whether a paired phone may type into your terminals. Set false for approvals-and-watch only. |
| --advertise default true | Announce the daemon over mDNS (_reins._tcp) so the app can find it on trusted Wi-Fi without a QR. On by default — pass --advertise=false to keep the host off the LAN entirely. |
| --transcripts default ~/.claude/projects | Where Claude Code writes transcripts. Change if you've moved it. |
| --log-level default info | debug prints every message on the socket — useful, noisy. |
Files it touches
| Path | What it is |
|---|---|
| ~/.reins/token | 48-char random token, mode 0600, generated on first run. Delete it to rotate; re-pair afterwards. |
| ~/.reins/hook.sock | Unix socket the shims use to talk to the daemon. Only your user can open it. |
| ~/.reins/hosts | Paired phone public keys. Revoking on the phone does not remove them here — delete the authorized_keys line on the machine. |
| ~/.claude/settings.json | Where install-hooks adds its entries. Nothing else is modified. |
| ~/.ssh/authorized_keys | Pairing appends the phone's key here — same weight as any other key you'd add. |
Claude Code hooks it installs
install-hooks merges these into ~/.claude/settings.json. Every one calls
the same shim; every shim exits silently when the daemon or phone isn't there.
| Hook | What it does |
|---|---|
| PreToolUse · Bash|Write|Edit | The one that pauses. Returns allow/deny from the phone, or nothing. |
| SessionStart | Tells the daemon a new session exists so it appears in Sessions immediately. |
| Stop | Marks the session idle and posts a 'finished' line to Inbox history. |
| Notification | Forwards Claude Code's own "needs input" and question events to the phone. |