CLI
nocturn is one binary: the daemon, a terminal chat and every command to manage them. nocturn help prints the short list, nocturn <command> -h one command's usage.
nocturn [command] [subcommand] [arguments] [flags]- Run every command from the folder that holds
.envandnocturn-data/. In Docker, prefix it withdocker compose exec nocturn(Docker). - Flags take one dash or two, before or after the arguments (
voicesandknowledge: before). - Exit codes:
0success,1failed,2wrong use;-hexits0. - Values are read from stdin, never from the command line, so they stay out of your shell history.
| Common flag | Default | Meaning |
|---|---|---|
-w, --workspace | main | the workspace |
--addr | :8080 | the running daemon to ask (on this machine, with nocturn-data/cli-bearer) |
--reload | false | perms set, perms clear, remote allow: tell the running daemon at once |
Some commands need more than the folders: endpoint means OPENAI_BASE_URL or OPENAI_API_KEY, vault means NOCTURN_MASTER_PASSPHRASE, daemon means a daemon running on this machine. Variables: Configuration.
Run
nocturn
Opens the full-screen terminal chat in main; Ctrl+P switches the workspace. Needs: endpoint, a real terminal (piped, it exits 2).
nocturnWhile it is open, it runs every workspace's scheduled agents and asks approvals in the terminal, with no timeout. Its log goes to nocturn-data/nocturn.log.
| Key or command | Action |
|---|---|
Enter / Tab, Shift+Tab | send, or open what the list points at / next, previous region |
Ctrl+P | palette: new chat, open chat, fire agent, workspace, logs, delete chat, quit |
Ctrl+N / Ctrl+K / Ctrl+L | new chat / what the workspace can do and what is broken / log pane |
Ctrl+C / Ctrl+Q | cancel the running turn (never quits) / quit |
1–9, ↑ ↓ Enter, n Esc | in an approval: choose an answer (1 is once), pick one, deny |
/new, /chats, /help, /open <id> | new chat, conversation list, palette, open a chat or agent run |
/agents, /fire <name> [task] | the palette on fireable agents; run an agent now |
/quit, /exit | quit; any other /text goes to the model |
nocturn serve
Runs the daemon: workspaces, agents, the app's connection, /mcp, /healthz, /metrics and the browser UI. Needs: endpoint.
nocturn serve
nocturn serve --host 127.0.0.1 # this machine only
nocturn serve --port 8443 --no-web # no browser UI| Flag | Default | Meaning |
|---|---|---|
--host | $NOCTURN_HOST, else all interfaces | the interface to listen on |
--port | $NOCTURN_PORT, else 8080 | the port |
--no-web | false | no browser UI; the app's protocol is unaffected |
While no phone or browser is paired, it logs a pairing code at start. See Getting started.
nocturn health
Exits 0 when the daemon answers GET /healthz, 1 when it does not. The container's health check.
nocturn health
nocturn health --addr :9090nocturn version
Prints nocturn <version>; a build from source says dev.
nocturn version
nocturn --versionnocturn ls
Lists the workspaces, or one workspace's plugins (with the tools they give), MCP servers, agents and skills. What is skipped goes to stderr with the reason.
nocturn ls
nocturn ls -w mainWithout -w there is no default: it lists workspaces.
nocturn reload
Makes the running daemon read a workspace again: agents, skills, plugins, MCP servers and permissions.json. There is no file watcher. It prints what the workspace holds and waits up to three minutes for MCP servers. Needs: daemon.
nocturn reload
nocturn reload -w workPairing and devices
nocturn pair
Mints a new pairing code on the running daemon: six digits, five minutes, five attempts, one device. It replaces any earlier code. Needs: daemon.
nocturn pair
nocturn pair --open # open the link in this machine's browser
nocturn pair --addr https://nocturn.home.example # a link with that addressIt prints the code and a browser link (<address>/#c=<code>). See Remote access.
nocturn mcp-client add
Enrols an MCP client (Claude Desktop, an IDE) as a device of class agent and prints its bearer token once, for /mcp (/mcp/<workspace> for another workspace). It has no tools until you allow them. Needs: daemon.
nocturn mcp-client add claude-desktop
nocturn remote allow claude-desktop file_read http_read --reloadnocturn remote
Gives a paired device tools (built-in by name, others by node), each with the cell an unwatched caller gets; a tool of an MCP server or a plugin gets ask. show prints the device's name, class and column.
nocturn remote allow claude-desktop file_read work_list --reload
nocturn remote allow claude-desktop mcp/acme/search
nocturn remote show claude-desktopPermissions
nocturn perms
Shows and edits the permission tree in permissions.json.
nocturn perms show
nocturn perms show --holder agent:digest
nocturn perms show --node http_read
nocturn perms set agent:digest http_read '*.home.example' allow --reload
nocturn perms set chat http_write ask --lock --reloadnocturn perms show [--holder <holder>] [--node <node>] [--all] [-w <workspace>]
nocturn perms set <holder> <node> [target] allow|ask|off [--lock] [--reload] [-w <workspace>]
nocturn perms clear <holder> <node> [target] [--reload] [-w <workspace>]Holders: chat, voice, agent:<name>, remote:<device id or name>, ext:<name>. Nodes: a built-in tool, mcp/<server>/<tool>, plugin/<name>/<tool>, or a group (mcp/<server>). A target is a host, path, address or SSH pattern; allow "*" for every target.
| Flag | Default | Meaning |
|---|---|---|
--holder | chat | show: whose column |
--node | show: one node or group across every holder | |
--all | false | show: include places that are off by default |
--lock | false | set: answers can no longer keep an allow here or below |
See Permission reference.
nocturn agent
show lists what an agent's tools: asks for beside its column. accept gives each of those tools the cell its kind gives an unwatched run, replacing what was there.
nocturn agent show digest
nocturn agent accept digest
nocturn reloadA running daemon sees the change at its next reload. See Allow a tool for an agent.
Secrets and extensions
nocturn secret
Stores, points and removes secrets; values come from stdin. Needs: vault.
printf %s "$TOKEN" | nocturn secret set acme
printf %s "$TOKEN" | nocturn secret set vault/grafana --host grafana.home.example
nocturn secret set vault/fw-admin --ssh-user admin --host fw.home.example < ~/.ssh/nocturn_fw
nocturn secret ls
nocturn secret rm vault/grafananocturn secret set <target> [-w <workspace>] (value on stdin)
nocturn secret set <extension>/<credential> --ref <source>:<item> [-w <workspace>]
nocturn secret set vault/<name> --host <host>... [--header <h>] [--prefix <p>] (value on stdin)
nocturn secret set vault/<name> --ssh-user <user> --host <host>... (private key on stdin)
nocturn secret rm <target> | ls [-w <workspace>]Targets: <extension>/<credential>, <extension>, mail/imap, mail/smtp, vault/<name>.
| Flag | Default | Meaning |
|---|---|---|
--ref | point the credential at a source item instead of storing a value | |
--host | vault/, repeatable: an exact host the value may be sent to | |
--header, --prefix | Authorization, Bearer | vault/: the header the value rides in and the text before it |
--ssh-user | vault/: the value is an SSH private key for this user at each --host |
See Manage secrets from the terminal.
nocturn secret source
Mirrors a password store's items as secret/<alias>, without copying values. The one type is bitwarden (Vaultwarden or Bitwarden). add reads the API key client ID, client secret, account email and master password from stdin, one per line. Needs: vault.
printf '%s\n' "$CLIENT_ID" "$CLIENT_SECRET" nocturn@home.example "$MASTER_PASSWORD" | \
nocturn secret source add bitwarden --name vault-home --url https://vault.home.example --collection nocturn
nocturn secret source show
nocturn secret source set vault-home --sync 15m
nocturn secret source remove vault-home
nocturn secret source help| Flag | Default | Meaning |
|---|---|---|
--url | required: https:// (http:// to this machine only) | |
--collection | required: id or name | |
--organization | id or name, when the collection name is not unique; "" clears it on set | |
--name | from the settings, e.g. vault-home | lowercase, digits, -, at most 32; not vault or ext |
--sync | 5m | how often to read it again; at least 30s |
--replace | false | add: replace that source's settings and credentials; aliases and rules stay |
See Connect Vaultwarden.
nocturn auth
Connects an OAuth account for a plugin or an MCP server: prints a consent URL, catches the redirect on this machine, stores the token and asks the daemon at NOCTURN_PORT to reload. Needs: vault.
nocturn auth acme
nocturn auth acme --scope "read write"
printf %s "$SECRET" | nocturn auth acme --client-id my-client --client-secret-stdin| Flag | Default | Meaning |
|---|---|---|
--scope | space- or comma-separated scopes; an MCP server with "auth": "oauth" only | |
--client-id | your own OAuth client, for a provider that ships none | |
--client-secret-stdin | false | read that client's secret from stdin |
For a server whose authorization server registers no clients, it prints the oauth block to put into extensions/<server>/mcp.json. See MCP servers.
nocturn config
Shows an installed extension's declared settings and values, or sets some: it merges, checks the whole set and writes extensions/<extension>/config.json.
nocturn config weather
nocturn config weather city=Berlin
nocturn config weather city=Berlin units=metric -w workSee Plugins.
Mail and SSH
nocturn mail
setup logs in to both servers, then writes mail/mail.json and the password (run again to replace); check reports what it sees. Needs: vault.
printf %s "$PASSWORD" | nocturn mail setup --user alice@home.example
printf %s "$PASSWORD" | nocturn mail setup --user alice@home.example \
--imap mail.home.example:993 --smtp mail.home.example:587
nocturn mail check
nocturn reload| Flag | Default | Meaning |
|---|---|---|
--user | required: the login, usually the address | |
--from | --user | the sender address |
--imap, --smtp | discovered | the IMAP and submission servers, host:port |
To remove the mailbox, delete the workspace's mail/ folder. See Mail.
nocturn ssh
hosts (ls) lists the host keys ssh_exec trusts, with fingerprint and who approved them when. forget (rm) removes one; the next command there asks again.
nocturn ssh hosts
nocturn ssh forget fw.home.example
nocturn ssh forget nas.home.example:2222See Host keys.
Voice and knowledge
nocturn voice
A test harness for spoken sessions at http://127.0.0.1:<port>/voice: loopback only, no pairing and no authentication. Approvals follow NOCTURN_VOICE_APPROVE. Needs: GEMINI_API_KEY, GEMINI_LIVE_MODEL.
nocturn voice
nocturn voice --port 9000 -w worknocturn enroll
Has a voice satellite record its microphone, written as WAV to NOCTURN_VOICE_CAPTURE. It fails, and records nothing, when no device or several have that name, or the device is not connected. Needs: daemon.
nocturn enroll --device kitchen
nocturn enroll --device kitchen --seconds 30| Flag | Default | Meaning |
|---|---|---|
--device | required: the satellite's name (any case), or its id when names repeat | |
--seconds | 60 | 1 to 120 |
nocturn voices
Edits voices.json, the voices a workspace recognises (a daemon reads it at start). add enrols from 16 kHz mono 16-bit WAV files or a folder of them; it needs NOCTURN_SPEAKER_MODEL.
nocturn voices ls
nocturn voices add --device satellite alice recordings/alice/
nocturn voices rm aliceSee Voice.
nocturn knowledge
Works on the workspace's mnt/knowledge/ folder. index sends changed documents to the embedding endpoint and names each file it could not index; a daemon does it every minute. Needs: NOCTURN_EMBED_BASE_URL or OPENAI_BASE_URL.
nocturn knowledge index
nocturn knowledge status
nocturn knowledge ls -w workSee Knowledge.