hatchway
A narrow, logged opening through which an outside agent reaches your tools.
pip install hatchway
hatchway authorize "ssh-ed25519 AAAA... my-agent" --agent assistant # one confined key
hatchway check "crowsnest triage" # what the gate would do
An agent that lives somewhere else (a personal assistant on its own cloud VM, another machine's scheduler, a phone shortcut) gets one SSH key. That key can do exactly one thing: run hatchway gate, which reads the requested command line, checks it against a profile (an allowlist kept as a TOML file), logs the call, and runs the allowed command directly, never through a shell. Anything not in the profile is refused with a reason.
It is the "reach in" half of connecting an outside agent to the tools on your machine, with no new server, no open port and no new dependency: OpenSSH already has forced commands, and hatchway is the policy and the bookkeeping around one.
What you get
- An allowlist as data. A rule names the words the agent sends, the command that actually runs (with fixed arguments the agent cannot remove, such as
--no-verify), and exactly which flags and names it may add. Names are checked against a pattern and passed after--, so they can never be read as options. Shell characters are refused outright. - A confined key.
hatchway authorizewrites oneauthorized_keysline withcommand="hatchway gate --agent NAME",restrict(no shell, no port, agent or X11 forwarding, no pty), and by defaultfrom="100.64.0.0/10,fd7a:115c:a1e0::/48", so the key works only from a Tailscale tailnet even if sshd is reachable elsewhere. It keeps every other line, backs the file up first, and is idempotent.hatchway revoke --agent NAMEtakes it out. - A log of every call in
~/.local/share/hatchway/calls.jsonl: when, which agent, from where, what was asked, allowed or refused, exit status. Never the output.hatchway logshows the tail. - Gated classes. A rule can belong to a class that stays off until a flag file exists. The bundled profile's
dispatchclass (starting a Claude Code session) needs both~/.config/hatchway/allow-dispatchand a list of directories it may start sessions in. - A snapshot for pulling instead of waiting.
hatchway snapshotruns the profile's snapshot requests (through the same allowlist) and writes the answers atomically to~/.local/share/hatchway/out/, with anindex.json. The agent reads them through the gate (snapshot triage.md) without waiting for anything to run.hatchway schedule --every 300keeps them fresh with launchd (macOS) or a systemd user timer (Linux). - Skills for the agents that set it up.
hatchway install-skillslinks the bundled skills into one or more Claude Code homes.
The bundled profile: claude-fleet
For a machine running Claude Code sessions watched by crowsnest (live sessions) and openloops (what sessions left owed or blocked). hatchway help prints it, and it is what the agent gets when it sends help:
| Request | Runs |
|---|---|
crowsnest [--brief|--json] |
the roster across every configured Claude home |
crowsnest triage [-q] [--json] |
what needs you, what is safe to close, what is working |
crowsnest show|turns|recap|brief NAME |
one session (show and turns quote its transcript) |
crowsnest ledger [NAME...], groups, synopsis GROUP, questions, lineage, report |
the rest of crowsnest's read side |
ol, ol owed, ol blocked, ol dashboard |
openloops, always with --no-verify (verify predicates are commands taken from issue bodies, and a remote request never runs them) |
snapshot [FILE] |
list or print the snapshot files |
crowsnest spawn NAME --cwd DIR --prompt TEXT |
gated: starts a session on sonnet, in a directory under the dispatch roots |
Nothing in it kills, reaps, messages or writes into a running session.
To change it for one machine, copy hatchway/data/profiles/claude-fleet.toml to ~/.config/hatchway/profiles/<name>.toml, edit it, and set profile = "<name>" in ~/.config/hatchway/config.toml (or pass --profile <name> to authorize, which puts it in that key's forced command).
The second transport: MCP
The same profile can be served as MCP tools, for an agent that speaks MCP but cannot open SSH (a claude.ai custom connector, so also the Claude app's voice mode; Claude Desktop; another machine's MCP client). One tool per rule: its tool name, its flags and names as typed parameters, its help as the description. Every call is turned back into the request words and goes through the gate, so it is decided, logged and locked exactly as an SSH call is.
pip install 'hatchway[mcp]'
hatchway mcp --profile claude-ai --list # the tools, with their signatures
hatchway mcp --profile claude-ai --http 8799 # serve on 127.0.0.1:8799/mcp
hatchway mcp --profile claude-ai --ssh me@laptop --identity key # each call through that machine's gate
from hatchway.mcp import fan_out, mk_server, routed_runner, ssh_runner, with_fallback
server = ssh_runner("root@127.0.0.1", identity="key") # this machine, as another user
laptop = ssh_runner(
"me@127.0.0.1", identity="key", ssh=("ssh", "-T", "-p", "2222")
) # through a tunnel
runner = routed_runner(server, {"crowsnest": with_fallback(laptop, server)})
# or ask every machine at once and merge, each row tagged [laptop] / [server]:
runner = routed_runner(server, {"crowsnest": fan_out({"laptop": laptop, "server": server})})
app = mk_server("claude-ai", runner=runner, auth=..., classes=("read", "handoff")).http_app()
The runner is the seam: local_runner runs the gate on this machine; ssh_runner sends the request to a key whose forced command is the gate, so a server process running as its own account reaches tools it holds no credentials for. routed_runner sends a request to the runner of the longest leading words it matches ("crowsnest", "crowsnest intent"); with_fallback asks a second machine only when the first cannot be reached; fan_out asks several machines in parallel and merges their answers, each line tagged with its machine, and names on its own line any machine that did not answer, so a partial list never reads as a whole one. Use it for reads only: a request that changes something goes to one runner. A rule's reply (a template over {out}, the command's output) shapes a successful answer for these transports, as post_handoff does to return a line to paste into Claude Code. Authentication is the job of whoever serves it on a network (auth= goes to FastMCP). Only the classes you name are offered (default: read). Long answers are paged: every tool takes offset, and the answer says where to resume.
The bundled claude-ai profile is shaped for a conversation, typed or spoken: Claude Code sessions (session_triage, session_roster, session_recap, session_turns, session_ledger), open loops (owed_by_owner, blocked_work), GitHub read-only (list_repos, repo_overview, read_repo_file, list_issues, read_issue; a repository whose name contains secret is refused), and a handoff inbox shared with Claude Code through annals (read_handoffs, read_document and document_info, which take an annals link as handed, on any annals the machine's annals config can read, and post_handoff in the handoff class, whose text goes to the command's standard input, never its arguments). A machine adds what only it has in a private profile that starts with extends = "claude-ai".
Configuration
~/.config/hatchway/config.toml, every key optional:
profile = "claude-fleet"
path = ["~/.local/bin"] # where the commands live (sshd's PATH is minimal)
timeout = 120
[roots] # extra directories file rules may serve, by name
[dispatch]
roots = ["~/projects"] # where a gated spawn may start a session
[snapshot]
to = "" # optional private copy: a local dir or host:path
The security model, in one paragraph
What the key can do is the profile, so read it before you authorise a key. Read commands still send what they read to wherever the agent runs: crowsnest show quotes your sessions' transcripts, so authorise only an agent you would show them to. Keep the from= restriction. If the agent joins your Tailscale tailnet, give it a policy that allows only TCP port 22 to the machines it serves and no Tailscale SSH rule: Tailscale SSH authenticates by tailnet identity and never reads authorized_keys, so it would bypass the gate entirely. 100.64.0.0/10 is also ordinary carrier-grade NAT space, so once you know the agent's own tailnet address, narrow --from to it (--from 100.x.y.z/32). Leave dispatch off until you have watched the log for a while: a session it starts runs code as you. The bundled rule pins --model sonnet and --permission-mode default (the session asks before acting), refuses a prompt that starts with -, and starts sessions only under the directories you list.
Also built in: the commands run with an allowlisted environment (nothing the connecting client can set reaches them beyond LANG), in their own process group so a timeout stops their children too, one call at a time per agent (a concurrent call is refused with exit 75), and every allowed call is logged before it runs, so a dropped connection still leaves its line.
Agents
hatchwayskill: install and verify a connection for an outside agent on this machine (the steps, the checks, the Tailscale policy).hatchway-museskill: when a task would be better handed to a personal Muse agent (Meta), which integration pattern fits, and the exact prompt to give it.
Metadata
Release files for hatchway 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hatchway-0.0.10.tar.gz | 49.4 kB | Without provenance | Details for hatchway-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hatchway-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for hatchway-0.0.10-py3-none-any.whl |
Total release size: 96.7 kB
Release files / hatchway-0.0.10.tar.gz
| Download URL | hatchway-0.0.10.tar.gz |
|---|---|
| Size | 49.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
585ef7dfc62ee87505842f80b3bce4659de8c9906cd452aa754fc93915762e53
|
|
BLAKE2b-256 checksum How to use checksums |
01f8ba13db8ed29d49717d069da1c74174a7eb70b2a833d49bb91b01b34baee5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / hatchway-0.0.10-py3-none-any.whl
| Download URL | hatchway-0.0.10-py3-none-any.whl |
|---|---|
| Size | 47.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00c01b7feece6f0123816771408184681df955ff37efc5dbd0ddba087b4f206d
|
|
BLAKE2b-256 checksum How to use checksums |
535690ecd665bb717409fabdb99acd0b0f88e860973460de3dc100a4b232b6f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for hatchway 0.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.