Docs · [VERSION]

Documentation

How the daemon, the relay and your devices fit together — and how to make agents ask before they act.

Press ⌘K or / to search. Results filter the sections below as you type.

Jump to /install /policies /cli
Start here

Nothing to a held command, on your phone.

From a fresh host to a command you can deny from anywhere: one command to install, one to pair.

01

Install the daemon

One command per host. It installs the binary, adds it to your PATH, starts the daemon as a user service and wires Claude Code's hooks if Claude Code is there. No root.

curl -fsSL https://get.neku.sh/install.sh | sh

What the installer does, step by step →

02

Pair a device

One code from the host, shown as a QR, a link and text. Scan it, paste it or type it into Neku on the iPhone, iPad, Mac or app.neku.sh, signed in to your account; or type it into the host's web UI over your SSH tunnel. The code never leaves the device: your account carries only a proof made from it. Keys are pinned on the host; revoke any device later with neku unpair.

neku pair · neku web-tunnel <host> --open

03

Your first approval

Read the command verbatim, check the span chain, hold to approve, or let it time out. The daemon owns the clock: 30 minutes by default; extend adds five minutes, at most three times; under 40% of the window left the sheet warns DENYING SOON; at zero the call is denied. The blocking gate is opt-in: neku install --gate.

neku install --gate

Browse

Browse by section

Concepts first, then the knobs, then the reference.

Concepts

Sessions and states

/concepts/sessions

Spans and subagents

/concepts/spans

Approvals and timeouts

/concepts/approvals

Policies

/concepts/policies

Guides

Budgets and windows

/guides/budgets

The circuit breaker

/guides/breaker

Offline behaviour

/guides/offline

Running multiple hosts

/guides/hosts

Reference

CLI

/reference/cli

Agent support tiers

/reference/agents

Protocol and wire schema

/reference/protocol

Keyboard map

/reference/keys

Troubleshooting

Daemon will not link

/fix/link

Agent not detected

/fix/detect

Push never arrives

/fix/push

Approval timed out

/fix/timeout

Reference

The CLI

What you type on a host. neku help lists the same for the version you have.

First run

curl -fsSL https://get.neku.sh/install.sh | sh

Verifies the release signature, then installs neku to ~/.local/bin, adds a tagged PATH line to your shell rc if needed (bash, zsh, fish), runs neku service install, and runs neku install when Claude Code is present. Prints one next step.

neku pair

Opens a 120-second pairing window and prints the code and this host's id. Starts the daemon first if it is not running — the installed service, or a background neku serve on a host without one.

neku pair --code  ·  neku pair --json

--code prints only the code, for scripts; progress goes to stderr. --json adds the lifetime in seconds and the host id.

neku web-tunnel <host> --open

From another machine: opens an SSH tunnel to the host's loopback gateway and your browser on the web UI, token included. --local-port N, --remote-port N, --no-token.

neku status  ·  neku status --json

Daemon, gateway, state and uplink health: running, stopped, wrong port, or not installed. Then one line each for update (shown when a newer release is out, from the cached check), tunnel (each tunnel held by neku connect: transport, healthy or reconnecting), logs (the daemon log's path, size, age and rotated count) and disk (free space in the state directory; low means the daemon is shedding outbox and audit writes while approvals keep working), plus any write-failure warnings.

neku update  ·  neku update --check

Self-update: verifies the signed release against the key built into the binary, refuses an older version, swaps the binary atomically and restarts the service. --check reports only.

Day to day

neku service install | start | stop | status | uninstall

The daemon as a launchd user agent (macOS) or systemd user service (Linux, WSL2). install is re-runnable and restarts on the current binary.

neku serve [--port N] [--replace]  ·  neku stop

Run the daemon in the foreground (--replace takes over from a running one), or stop whichever daemon is running.

neku logs [-f] [--since 1h] [--level warn]

Print the daemon log, newest last: JSON lines in a 0600 file under the state directory, rotated daily and at 20 MB, kept 7 days. -f follows across rotations, --since reads back through rotated files, --level is debug, info, warn or error; -n N limits the tail (100 by default), --json prints the raw lines.

neku diagnose [--stdout] [--out DIR]

Write a redacted support bundle, a 0600 tar.gz in the current directory (--out picks another, --stdout prints it as text): status, versions, hook drift, gateway and uplink reachability, disk, policy and audit counts, and the last 200 log lines (--lines N). Never transcript content, commands, tokens or keys; home paths, usernames, hostnames and git remotes are replaced. Nothing is uploaded — review it, then send it yourself.

neku install [--check] [--gate]

Write the hook entries for Claude Code (which Grok also runs) and, for each that is on the host, GitHub Copilot CLI's, Codex's and Gemini CLI's hooks and OpenCode's plugin, merging with your own and keeping a backup. --check reports drift, and a Codex hook Codex has not trusted yet. --gate also installs the blocking approval gate.

neku login [--url U]  ·  neku logout

Optional: save the cloud uplink token from app.neku.sh (read from stdin or $NEKU_UPLINK_TOKEN) so held calls reach your devices as push when no tunnel is open. --url points at a different uplink.

neku open <neku://…>  ·  neku connect <host>…

open opens a session from a deep link over a reused tunnel (or --host / --session); --register / --unregister the neku:// scheme on Linux and macOS. connect keeps tunnels warm so open is instant.

neku uninstall  ·  neku uninstall --all --yes

Stop the daemon and remove Neku's hook entries, restoring your settings. --all --yes also removes the service, device tunnel keys, state, config, the installer's PATH line and the binary. Without --yes it prints the plan and stops.

Devices and pairing

neku devices

List paired devices with their key fingerprints — four hex groups, a1b2-c3d4-e5f6-7890 style — last seen, and how each was enrolled.

neku unpair <id|name>  ·  neku unpair --all-except <id>

Revoke a device at once: its pinned keys are dropped, in-flight decisions it signed are rejected, nothing is sealed to it again. --all-except is the panic button.

neku token

Print the gateway bearer token, for bootstrapping a client over SSH by hand.

Policies

neku policy list  ·  neku policy log

Policies by id, mode and decision; recent decisions from the audit log (--session, --policy, --limit N).

neku policy simulate <id> [--since 7d]

Replay one policy against recorded history and see what it would have allowed, asked or denied — before you enable it.

neku policy lint

Static checks over ~/.config/neku/policies.toml; non-zero on findings. Flags an exact-match command that the metacharacter backstop will always downgrade to ask (a chain only when one of its parts never auto-approves).

neku policy forget --session <id>

Drop a session's ask_once grants.

neku policy accept [--yes]

Load a policy file you edited by hand. Until you do, the daemon keeps the last copy it wrote or you accepted, and says why.

neku version  ·  neku help

Authoring a policy, and clearing the circuit breaker, are signed device actions done from a paired device, not from the shell. neku hook and neku replay are internal: the hook shim, and a recorded hook stream fed through the pipeline.

Sessions and settings

neku run [agent [args]]  ·  neku say <id> <text…>

Start an agent (Claude Code by default) inside tmux so your devices can message it, and type a message into its pane from the shell.

neku sessions [--all]  ·  neku sessions pause|resume|interrupt|end <id>

This host's sessions, newest first, and the controls a device has. neku sessions full-auto <id> on|off [--for 1h|4h|8h] lets one session's calls through without asking, except the backstop, pipes into a shell and your deny and ask rules.

neku diff <session>  ·  neku ports [session]

The session's working-tree diff, and the ports its agent is serving, with preview URLs.

neku set <key> <value>

Daemon settings, read live. Among them: away on|off (held calls wait longer on a bad link, and still deny), full-auto off-permanently, usage-probe on, telemetry on (off by default), legacy-forms off (refuse older apps' unbound approvals once every device is updated). neku help lists every key.

neku usage  ·  neku flight-report

Rate-limit windows and the busiest sessions; a content-free summary of links and held calls from the local log, safe to paste.

Enclaves and other hosts

neku connect github|gitlab

Connect this host to GitHub or GitLab for enclaves. The token stays on the host.

neku enclave start <template.yaml> | --repo <provider>:<repo> | --issue <provider>:<repo>#<n>

Start an agent in a container on this host. enclave list, log, stop, resume, rebuild, delete; enclave push <id> --title <t> opens the MR or PR; checkpoint and restore roll its workspace back; enclave egress shows and limits what it contacts.

neku enclave lint|plan <file>

Validate a template, and see what starting it would build and allow, before you run it.

neku capabilities  ·  neku links  ·  neku link revoke <id>

What this host can do for another, and the host links you made from a paired device.

neku delegate --needs <cap> -- <cmd…>

Run a command on a linked host that has the capability, and get its output, exit status and artifacts back (--detach, --attach <id>, neku jobs).