Skip to Content
Terminal CLI (nsq)Phone (experimental)

Phone (experimental)

Experimental. Phone access works, but the phone page, its looks and the push setup may change between releases.

nsq can serve a small page for your phone: your agents with their status and pending question, each agent’s screen, a box to send the next prompt, buttons to answer a permission prompt and to interrupt. The phone is a window onto your computer — the agents keep running there.

Pair a phone

nsq phone on --lan # listen on your local network (port 8766) nsq phone pair # show a QR code and the link (or Q in the dashboard)

Scan the QR code with the phone on the same Wi-Fi. nsq phone status shows whether phone access is on and which phones are connected; nsq phone off switches it off.

Without --lan nsq listens on this computer only, which a phone cannot reach. Use --port <n> for another port.

The pairing link carries the pairing token — treat it like a password, and don’t share it or a screenshot of the QR code. nsq phone rotate replaces the token and signs every paired phone out.

In the dashboard: the phone panel (Q)

You don’t need a second terminal for the QR code: press Q in the dashboard. The Pairing tab draws the pairing QR right in the terminal — black on white whatever your colour theme, so the phone camera reads it off the monitor — with the link, the mode (this computer only, local network, or ONLINE through a tunnel), when the pairing token expires and which phones are connected. With several network addresses (Wi-Fi, Ethernet, a VPN), ← → switch the QR between them; the online link comes first.

KeyIn the panel
oGo online / offline (asks first)
lLocal network on / off
rA new pairing token — every paired phone is signed out (asks first); the QR follows it
TabThe Notifications tab (below)
EscClose

Going online from the panel shows the cloudflared download and the tunnel starting, and any error; O in the dashboard opens the panel once the tunnel is up. The QR needs a terminal of about 45 × 23 cells — in a smaller window the panel shows the link and asks for more room. The link is shown only in this panel, never in the main view or the log.

The agent’s screen on the phone

Tap an agent and you see its screen as a real terminal, read only: the same colours (16, 256 and truecolor, in nsq’s dark palette), bold, italic, underline, dim, inverse and strikethrough, the cursor, box drawing and wide characters (CJK, emoji), with a few hundred lines to scroll back. The newest lines sit at the bottom and the view follows them.

  • Readable (the default) keeps the text at a size you can read on a phone and scrolls sideways when the agent is wider, keeping the cursor in view.
  • Fit width shows the whole width at once, small.

The phone remembers your choice. Pinch to zoom in either mode, double-tap to go back. The screen refreshes about once a second while the page is open; agent output is only ever shown as text, never as HTML.

What a phone can and cannot do

A paired phone canA paired phone cannot
see agents, their status and the pending questionstart agents or run commands
read an agent’s screentype arbitrary keys into a terminal
send a prompt (a busy agent gets it when its turn ends)stop or remove agents, delete worktrees
answer a permission prompt: yes / always / nochange dangerous mode, the model or the CLI
interrupt the current turnread or download files

Every answer and interrupt sent from a phone goes into the approvals log with where it came from — local (this machine), lan (the Wi-Fi) or internet (the online tunnel) — and the device label (iPhone · Safari). Never the token or the address. nsq log approvals shows it.

Notifications on the phone

While the page is open, the phone shows an alert (and vibrates, where the browser allows it) when an agent needs you. To hear about it with the page closed, nsq can push through ntfy  — the public ntfy.sh server or one you host yourself. Push is off by default and works whether or not phone access is on.

Set it up from the dashboard

Press Q, then Tab to Notifications. s creates a new random topic on ntfy.sh (kept in the OS keyring) and shows a QR code that subscribes the phone:

  • Android (the default QR): scanning it with the camera opens the ntfy app on the topic and subscribes it — the QR is an ntfy:// link. Install ntfy from Google Play or F-Droid first.
  • iPhone (i switches the QR): the ntfy iOS app can’t be opened by a link, so the QR is the topic’s https address (it opens the ntfy web app) and the panel shows the topic name. In the iOS app, tap + and enter that name.

Then t sends a test; the panel shows whether push is on, which server, and the result of the last push. n makes a new topic (subscribe again), x turns push off. Your own ntfy server or an access token are set from the command line.

From the command line

nsq phone push ntfy # a new random topic on ntfy.sh nsq phone push ntfy --url # your own server or topic: nsq asks for the URL nsq phone push ntfy --url --token # … and an access token nsq phone push test # send a test notification nsq phone push show # print the topic URL nsq phone push status # on or off, which server nsq phone push off

Subscribe to the topic URL in the ntfy app. Anyone who knows the topic URL can read it, so treat it like a password: the URL and the token never go on the command line — --url and --token take no value, nsq asks for them without echoing what you type, or reads them from stdin, one per line. They are kept in the OS keyring (where there is none, set NSQ_NTFY_URL and NSQ_NTFY_TOKEN where the daemon starts). The URL must be https — plain http only on this computer or your local network — and a token is only sent over https.

A push carries the title “‹agent› needs you” and the agent’s question (up to 300 characters) — nothing else from the terminal. Pushes go out only when an agent needs you, not when it finishes, and the same question from the same agent at most once every 30 seconds. With phone access on and --lan, tapping the notification opens the phone page (the link does not carry the token).

A quiet agent (quiet while working) gets one push per episode: “‹agent› has been quiet for 7 min” and the last line of its screen — Looks like it’s asking: Password for … when it looks like a prompt — with secret-looking parts masked, up to 300 characters. That line is the only screen content a push ever carries; quietAfter 0 turns it off.

Away from home: online

nsq phone on --online # an https link through a Cloudflare quick tunnel, with its QR code nsq phone on --online --expire 12h # phones have to pair again after 12 hours

--online makes the phone page reachable from anywhere through a free Cloudflare quick tunnel: no account, nothing opened on your router, real HTTPS. nsq prints a warning, the link and its QR code.

Anyone with this link and token can control your agents. Going online is an explicit choice every time: the dashboard shows a red ONLINE badge while it is on, and phones that came in from the internet are marked (internet).

  • The address changes every time the tunnel starts. After nsq phone on --online again, a daemon restart or nsq down, pair the phone again (nsq phone pair shows the current QR code). A quick tunnel never comes back on its own, and an automatic update waits while one is on.
  • Turn it off with nsq phone off, or nsq phone on without --online (back to this computer or the Wi-Fi only). nsq down stops it too; in the dashboard, O switches online on and off.
  • cloudflared (Cloudflare’s connector) is used from your PATH if it is installed. Otherwise nsq downloads the official release once into ~/.neurosquad-cli/bin and checks it against its published sha256 checksum — nothing is installed system-wide, and a download that does not match is thrown away. Going online, nsq checks that copy against the latest release every 30 days and replaces it (verified the same way); --refresh checks right away.
  • Wrong tokens are locked out. Five wrong tokens from one internet address lock that address out for 15 minutes; plain http:// is refused, the token only travels over HTTPS. TLS ends at Cloudflare, so their network carries the traffic.
  • Your own hostname (a Cloudflare account): save the tunnel’s token with nsq phone tunnel-token set (kept in the OS keyring), then nsq phone on --online --tunnel-token --hostname nsq.example.com. That address stays the same, and a named tunnel comes back by itself when the daemon starts.

If you prefer, use a VPN you already have (for example Tailscale, or an SSH tunnel) rather than opening the port to the internet. Inside your own network the connection is plain HTTP, so use --lan on networks you trust.