https://github.com/glmn-ai/neurosquad-cli
nsq — run several AI coding agents in your terminal and stop babysitting them. Open-source CLI by NeuroSquad.
https://github.com/glmn-ai/neurosquad-cli
ai-agents claude-code cli codex developer-tools neurosquad opencode terminal tui
Last synced: 9 days ago
JSON representation
nsq — run several AI coding agents in your terminal and stop babysitting them. Open-source CLI by NeuroSquad.
- Host: GitHub
- URL: https://github.com/glmn-ai/neurosquad-cli
- Owner: glmn-ai
- License: mit
- Created: 2026-10-08T20:22:28.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-10-26T07:37:54.000Z (about 1 month ago)
- Last Synced: 2026-10-30T13:34:41.564Z (about 1 month ago)
- Topics: ai-agents, claude-code, cli, codex, developer-tools, neurosquad, opencode, terminal, tui
- Language: TypeScript
- Homepage: https://neurosquad.ai
- Size: 15.3 MB
- Stars: 83
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-cli-coding-agents - nsq - `⭐ 30` — Runs Claude Code, Codex, OpenCode, or any command side by side in one terminal; status comes from each CLI's own hooks (working / needs you, with the question / finished), so a permission prompt can be answered y/a/n without opening the agent. A daemon keeps agents alive when the terminal closes; worktree per agent, exact cost per agent, OpenRouter and your own model servers (llama.cpp, Ollama, LM Studio, vLLM). No account, no telemetry. `npx neurosquad`. MIT. (Harnesses & orchestration / Session managers & parallel runners)
- awesome-ai-coding-tools - nsq - Open-source CLI that runs Claude Code, Codex, OpenCode, or any command side by side in one terminal, with status from each CLI's own hooks (working / needs you / finished), y/a/n answers without opening the agent, a worktree per agent, and per-agent cost. `npx neurosquad`, MIT. (CLI Tools)
README
# nsq — NeuroSquad in your terminal
[](https://github.com/glmn-ai/neurosquad-cli/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/neurosquad)
[](LICENSE)

Run several AI coding agents from one terminal.
`nsq` starts Claude Code, Codex, OpenCode or any command, keeps them running in a background
daemon, shows them as live terminals in one dashboard, and tells you when one of them is waiting for you,
including the question it is asking. You can answer from the dashboard.

> **0.1.0 is a preview.** Commands, keys and config may still change before 1.0. Please [report what breaks](https://github.com/glmn-ai/neurosquad-cli/issues).
## Install
Requires [Node.js](https://nodejs.org) 22.13 or newer. No compiler needed: native parts ship
prebuilt for Windows (x64, arm64), macOS (Apple silicon, Intel) and Linux (x64, arm64).
```sh
npm install -g neurosquad # then run: nsq
npx neurosquad # or try it without installing
```
More ways (Homebrew, Scoop, install scripts) and uninstalling:
[docs/guide/getting-started.md](docs/guide/getting-started.md). nsq then keeps itself up to date:
installed with npm, Homebrew or Scoop, it installs a new release in the background (other installs
show the command to run) and switches to it once nothing would be lost — no busy agent, no open
dashboard, every agent able to resume its session — or when you press **U** ([updates](docs/guide/updates.md); `nsq config set autoUpdate false` turns it
off).
## Quick start
```sh
cd ~/code/my-app
nsq run claude "fix the flaky checkout test" --worktree # an agent on its own branch
nsq run codex --name reviewer # a second agent
nsq run -- claude --effort high # or the CLI's own command line
nsq run -- npm run dev # any command, as an agent
nsq # the dashboard
```
In the dashboard, select an agent with the arrows, press **Enter** to work in it full screen, and
**Ctrl+]** to go back to the grid. When an agent asks a permission question, press **y**, **a** or
**n** without opening it. Press **q** to close the dashboard — the agents keep running.
## What it does
- **Agents that outlive the window.** A per-user daemon owns the terminals. Close the dashboard or
the terminal — the agents keep working. `nsq down` stops them; the next `nsq up` (or just `nsq`)
brings them back on their own sessions — after a reboot too.
- **One dashboard.** Workspaces and agents in a sidebar, the selected workspace as a grid of live
terminals; any agent opens full screen and goes back to the grid.
- **Exact status, with the question.** Working / **needs you** / finished comes from each CLI's own
hooks, not from guessing at the screen. "Needs you" carries the harness's own text, e.g.
_Claude wants to run: npm test_.
- **Quiet while working.** Some prompts come from tools that never fire a hook — git asking for a
password, an installer's `[y/N]`, `sudo`, ssh's host key — or a command just hangs. When a working
agent's screen has not changed for 5 minutes (`quietAfter`; a turning spinner does not count),
it shows as **quiet — check it**, with the prompt it seems to show, and calls you like "needs you".
- **Answer inline.** `y` / `a` / `n` (yes / always / no) on a permission prompt, `i` to interrupt,
`s` to send a prompt — or `S` to send it when the current turn ends.
- **An approvals log.** Every "needs you" question and how it ended, for all agents, in one file:
which agent asked, the exact question (tool, command / path / url), the answer, and who gave it
from where — the dashboard, `nsq answer`, the phone (this machine, the Wi-Fi or the internet,
and the device), the agent's own terminal, or the CLI itself. `nsq log approvals`.
- **Notifications and sound.** A native notification on Windows, macOS and Linux when an agent
needs you or finishes — one per agent, withdrawn when it works again. Over SSH or without a
desktop, the dashboard rings its own terminal instead (bell + OSC 9).
- **A git worktree per agent.** `--worktree` gives the agent its own checkout on branch
`nsq/`, so parallel agents don't trip over each other. `nsq diff ` shows its
uncommitted changes.
- **Cost per agent.** `nsq cost` reads tokens from each harness's own logs. A model without a known
price shows "no price", never $0.
- **Your config stays yours.** `~/.claude`, `~/.codex` and `opencode.json` are never written:
everything nsq needs lives in a per-agent layer (flags, environment, its own folder).
- **OpenRouter built in.** One key, any model, for Claude Code, Codex and OpenCode.
- **Your own model servers.** llama.cpp, Ollama, LM Studio, vLLM, SGLang, Unsloth Studio or any
OpenAI- / Anthropic-compatible API — tested, then offered to each CLI that can speak to it.
- **Voice dictation.** Local speech recognition; the text is pasted into the agent, never sent.
- **Phone (experimental).** Pair a phone with a QR code and answer your agents from it.
- **Terminal graphics.** CLI logos over kitty / iTerm2 / sixel graphics, light
animations that switch off over SSH and on request, ASCII fallbacks.
Supported: **Claude Code**, **Codex**, **OpenCode** (1.x and 2.x), and **any command**
(`nsq run -- `; it has no hooks, so it shows working / finished, never "needs you").
Agents that support the [herdr](https://herdr.dev) status protocol (Crush, Kiro CLI, Command Code
and others) work in nsq out of the box with `nsq run -- `: they report working, needs you
and finished themselves, and nsq resumes their session when they report how to
([how](docs/guide/agents.md#agents-that-speak-the-herdr-status-protocol)).
Want another CLI? [Request it](https://github.com/glmn-ai/neurosquad-cli/issues/new?template=harness_request.yml).
## Keys
| Key | In the dashboard |
| ---------------------- | ------------------------------------------------------------------------------------- |
| ↑ ↓ ← → / h j k l, Tab | select an agent (Tab walks all workspaces) |
| Enter, double-click | open the agent full screen — every key goes to it; **Ctrl+]** back |
| y / a / n | answer a permission prompt: yes / always / no |
| s / S | send a prompt / send it when the current turn is done |
| c | start an agent (harness, name, prompt, folder, worktree, model…) |
| i · x · X | interrupt · stop · remove |
| r · R · d | restart (resumes the session) · rename · dangerous mode on/off |
| m | pick a model on OpenRouter (switches the agent to it), "default", or its own server's |
| P | providers: your own model servers (add, test, models, remove) |
| v | dictate into the agent (also a global hotkey) — pasted, never sent |
| p | phones: who is connected |
| O | online on/off (Cloudflare tunnel, asks first) |
| Q | phone panel: the pairing QR, online / LAN, a new token, phone notifications (ntfy) |
| U | update: install it now, or restart onto an installed one |
| [ ] · b · ? · q | page of tiles · sidebar · help · quit (agents keep running) |
The mouse works too: click selects, double-click opens, the wheel scrolls an agent's output back
(over a tile or full screen; Shift+PgUp too) and, over the sidebar, moves the selection. Drag over
an agent's text to copy it, click a link to open it in your browser: the dashboard holds the mouse,
so it does what your terminal would.
## Commands
```text
nsq the dashboard (starts the daemon)
nsq run [prompt]
[--name n] [--worktree] [--model id] [--provider name|openrouter]
[--dangerous] [--attach]
nsq run [--name n] -- any command
nsq ls [--json] agents and their status
nsq attach full-screen terminal (Ctrl+] to detach)
nsq send "prompt" [--when-done]
nsq answer yes|always|no answer a permission prompt
nsq interrupt|stop|start|restart
nsq rm [--worktree] remove (and delete its worktree)
nsq set [--dangerous on|off] [--model id|none]
[--provider name|openrouter|none] [--quiet-after min|default]
nsq diff uncommitted changes (git diff HEAD) in its folder
nsq peek [-n 20] the last lines of its screen
nsq cost [--since 7d] [--json] what each agent spent
nsq log approvals [--agent x] [--since 2h] [--json]
every "needs you" question, its answer and who gave it
nsq openrouter set-key|clear-key|models [query]|status
nsq openrouter test [--harness claude|codex|opencode]
nsq provider add --url [--key-stdin|--ask-key]
your own server: llama.cpp, Ollama, LM Studio,
vLLM, SGLang, Unsloth Studio, any compatible API
nsq provider test|models|remove · nsq provider list
nsq phone on [--lan] [--port n]|off|pair|rotate|status
answer agents from a phone
nsq phone on --online [--expire 12h] … from anywhere, through a Cloudflare tunnel (https)
nsq phone push ntfy [--url] [--token]|off|test|show|status
push "needs you" to the phone
nsq login | logout | whoami the optional NeuroSquad account
nsq dictation setup|status|test [--model id]
nsq up | down start / stop the daemon (and its agents)
nsq update [--check] install the newest release now (or only check)
nsq config [get|set|unset [value]] settings, e.g. autoUpdate true|notify|false
nsq doctor check harnesses, hooks, terminal, updates
```
Everything you can do in the dashboard you can also script: `nsq ls --json`, `nsq send`,
`nsq answer`.
## OpenRouter
```sh
nsq openrouter set-key # stored in the OS keyring (or set OPENROUTER_API_KEY)
nsq run claude --provider openrouter --model anthropic/claude-sonnet-4.5
nsq openrouter models qwen # search the catalogue
```
The key only ever goes into the agent's environment — never argv, logs or files. Requests carry
NeuroSquad's OpenRouter app attribution headers. Without a key, an agent runs on its CLI's own
login. **m** in the dashboard picks a model and switches the agent to OpenRouter (restarted on the
same session, the conversation kept); "default" goes back. Details:
[docs/guide/openrouter.md](docs/guide/openrouter.md).
## Your own model servers
```sh
nsq provider add lmstudio --url http://localhost:1234 # tests it: models, which APIs it speaks
nsq run claude --provider lmstudio --model qwen/qwen3-coder-30b
nsq provider models lmstudio
```
Local (llama.cpp, Ollama, LM Studio, vLLM, SGLang, Unsloth Studio) or remote, OpenAI- or
Anthropic-compatible. Claude Code uses the server's Anthropic endpoint, Codex its Responses endpoint
(or chat completions through a local gateway), OpenCode either. The key (optional) is asked for
without echo and kept in the OS keyring; requests show "no price". Details and a table of servers:
[docs/guide/providers.md](docs/guide/providers.md).
## Phone (experimental)
```sh
nsq phone on --lan # off by default; without --lan it listens on this machine only
nsq phone pair # prints the link and a QR code — scan it with the phone (or Q in the dashboard)
nsq phone on --online # from anywhere: an https link through a Cloudflare quick tunnel
nsq phone push ntfy # optional: a push via ntfy when an agent needs you
```
From the phone you can see the agents and their screens, send a prompt, answer a permission
prompt and interrupt. A phone cannot start agents, change settings or type arbitrary keys. The
link carries the pairing token — treat it like a password; `nsq phone rotate` signs every phone
out. Pushes through [ntfy](https://ntfy.sh) carry only the agent's name and its question, plus,
when phone access is on with `--lan`, a link to the phone page (your local network address, no
token); your own topic URL and token are asked for (or piped in), never put on the command line.
`--online` is opt-in every time and prints a warning: anyone with that link and token can control
your agents. The address changes on every start (pair again), wrong tokens from the internet lock
an address out, and `nsq phone off` (or `nsq phone on` without `--online`) closes it. cloudflared
is used from `PATH` or downloaded once into `~/.neurosquad-cli/bin`, sha256-checked.
This part is the newest and most likely to change: [docs/guide/phone.md](docs/guide/phone.md).
## Voice dictation
Press **v** in the dashboard (or the global hotkey, `Ctrl+Shift+Space` / `Cmd+Shift+Space` by
default) and speak: the text is recognised **on your machine** and pasted into the agent's input.
It is never submitted — you press Enter. The speech model (~670 MB, checked by SHA-256) is
downloaded once — with `nsq dictation setup`, or when you first press **v**. Not available on
Windows arm64.
[docs/guide/dictation.md](docs/guide/dictation.md).
## Privacy
- **No account required.** Everything works without signing in.
- **No telemetry.** nsq does not report usage anywhere.
- Data lives in `~/.neurosquad-cli` (move it with `NSQ_HOME`). Secrets (the OpenRouter key, the
ntfy topic and token, the optional account session) live in the OS keyring.
- Network access is what you ask for: your agents' own traffic, OpenRouter if you use it, the
one-time dictation model download, ntfy if you turn it on, and the NeuroSquad account if you
sign in. Plus the update check: every 6 hours one request to the npm registry for nsq's public
package metadata, with nothing about you in it (`NSQ_NO_UPDATE=1` or
`nsq config set autoUpdate false` turns it off — [updates](docs/guide/updates.md)).
- The approvals log (`logs/approvals.jsonl`) keeps the questions and answers on your machine only:
no environment, tokens or prompts, secret-looking parts of commands masked
(`nsq config set approvalsLog false` turns it off — [agents](docs/guide/agents.md#the-approvals-log)).
## Platforms
Windows 10/11 (x64, arm64), macOS (Apple silicon, Intel), Linux (x64, arm64), each checked in CI
from the packed npm package on Node 22 and 24. Works over SSH: the daemon runs wherever you run
`nsq`, and notifications fall back to the terminal.
## Documentation
[Getting started](docs/guide/getting-started.md) ·
[Dashboard and keys](docs/guide/dashboard.md) ·
[Agents and harnesses](docs/guide/agents.md) ·
[OpenRouter](docs/guide/openrouter.md) ·
[Worktrees](docs/guide/worktrees.md) ·
[Notifications](docs/guide/notifications.md) ·
[Phone](docs/guide/phone.md) ·
[Dictation](docs/guide/dictation.md) ·
[Configuration](docs/guide/configuration.md) ·
[Updates](docs/guide/updates.md) ·
[Troubleshooting](docs/guide/troubleshooting.md) ·
[Uninstall](docs/guide/uninstall.md)
How it works inside: [harness integrations](docs/harnesses.md), [agent status](docs/status.md).
## nsq and the NeuroSquad desktop app
nsq is the open-source, terminal sibling of [NeuroSquad](https://neurosquad.ai), a desktop app where
agents are cards with live terminals on a canvas: 20+ CLIs, agents that talk to each other by
arrows, browser/notes/plugin cards, recording. Both share the same open-source integration core,
[`@neurosquad/core`](packages/core). Use nsq when you live in the terminal, work over SSH or on
Linux servers, or want something small and open; use the desktop app when you want the canvas.
## Contributing
Contributions are welcome — every change goes through a pull request. Read
[CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md). Security issues:
[SECURITY.md](SECURITY.md). Questions and ideas:
[Discussions](https://github.com/glmn-ai/neurosquad-cli/discussions) or our
[Discord](https://discord.gg/DyKn8cGTc). Releases: [RELEASING.md](RELEASING.md).
## Trademarks
Claude Code, Codex and OpenCode are trademarks of their respective owners. nsq uses their names
only to describe which CLI an agent runs; this does not imply any partnership with, endorsement of,
or affiliation with NeuroSquad. Claude Code is shown as a `CC` monogram on Claude's orange, at
Anthropic's request — nsq ships no Claude Code logo. The other CLIs' icons only identify them; we remove one if its owner asks.
Prefer no third-party icons or brand colours? Set `NSQ_LOGOS=none`: each CLI then gets its
two-letter monogram on a neutral chip.
## License
[MIT](LICENSE) © 2026 Stanislav Gelman and NeuroSquad contributors