Skip to content

Reference

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.

sh
nocturn [command] [subcommand] [arguments] [flags]
  • Run every command from the folder that holds .env and nocturn-data/. In Docker, prefix it with docker compose exec nocturn (Docker).
  • Flags take one dash or two, before or after the arguments (voices and knowledge: before).
  • Exit codes: 0 success, 1 failed, 2 wrong use; -h exits 0.
  • Values are read from stdin, never from the command line, so they stay out of your shell history.
Common flagDefaultMeaning
-w, --workspacemainthe workspace
--addr:8080the running daemon to ask (on this machine, with nocturn-data/cli-bearer)
--reloadfalseperms 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).

sh
nocturn

While 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 commandAction
Enter / Tab, Shift+Tabsend, or open what the list points at / next, previous region
Ctrl+Ppalette: new chat, open chat, fire agent, workspace, logs, delete chat, quit
Ctrl+N / Ctrl+K / Ctrl+Lnew chat / what the workspace can do and what is broken / log pane
Ctrl+C / Ctrl+Qcancel the running turn (never quits) / quit
1–9, ↑ ↓ Enter, n Escin 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, /exitquit; 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.

sh
nocturn serve
nocturn serve --host 127.0.0.1          # this machine only
nocturn serve --port 8443 --no-web      # no browser UI
FlagDefaultMeaning
--host$NOCTURN_HOST, else all interfacesthe interface to listen on
--port$NOCTURN_PORT, else 8080the port
--no-webfalseno 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.

sh
nocturn health
nocturn health --addr :9090

nocturn version ​

Prints nocturn <version>; a build from source says dev.

sh
nocturn version
nocturn --version

nocturn 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.

sh
nocturn ls
nocturn ls -w main

Without -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.

sh
nocturn reload
nocturn reload -w work

Pairing 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.

sh
nocturn pair
nocturn pair --open                                  # open the link in this machine's browser
nocturn pair --addr https://nocturn.home.example     # a link with that address

It 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.

sh
nocturn mcp-client add claude-desktop
nocturn remote allow claude-desktop file_read http_read --reload

nocturn 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.

sh
nocturn remote allow claude-desktop file_read work_list --reload
nocturn remote allow claude-desktop mcp/acme/search
nocturn remote show claude-desktop

Permissions ​

nocturn perms ​

Shows and edits the permission tree in permissions.json.

sh
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 --reload
text
nocturn 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.

FlagDefaultMeaning
--holderchatshow: whose column
--nodeshow: one node or group across every holder
--allfalseshow: include places that are off by default
--lockfalseset: 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.

sh
nocturn agent show digest
nocturn agent accept digest
nocturn reload

A 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.

sh
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/grafana
text
nocturn 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>.

FlagDefaultMeaning
--refpoint the credential at a source item instead of storing a value
--hostvault/, repeatable: an exact host the value may be sent to
--header, --prefixAuthorization, Bearer vault/: the header the value rides in and the text before it
--ssh-uservault/: 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.

sh
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
FlagDefaultMeaning
--urlrequired: https:// (http:// to this machine only)
--collectionrequired: id or name
--organizationid or name, when the collection name is not unique; "" clears it on set
--namefrom the settings, e.g. vault-homelowercase, digits, -, at most 32; not vault or ext
--sync5mhow often to read it again; at least 30s
--replacefalseadd: 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.

sh
nocturn auth acme
nocturn auth acme --scope "read write"
printf %s "$SECRET" | nocturn auth acme --client-id my-client --client-secret-stdin
FlagDefaultMeaning
--scopespace- or comma-separated scopes; an MCP server with "auth": "oauth" only
--client-idyour own OAuth client, for a provider that ships none
--client-secret-stdinfalseread 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.

sh
nocturn config weather
nocturn config weather city=Berlin
nocturn config weather city=Berlin units=metric -w work

See 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.

sh
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
FlagDefaultMeaning
--userrequired: the login, usually the address
--from--userthe sender address
--imap, --smtpdiscoveredthe 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.

sh
nocturn ssh hosts
nocturn ssh forget fw.home.example
nocturn ssh forget nas.home.example:2222

See 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.

sh
nocturn voice
nocturn voice --port 9000 -w work

nocturn 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.

sh
nocturn enroll --device kitchen
nocturn enroll --device kitchen --seconds 30
FlagDefaultMeaning
--devicerequired: the satellite's name (any case), or its id when names repeat
--seconds601 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.

sh
nocturn voices ls
nocturn voices add --device satellite alice recordings/alice/
nocturn voices rm alice

See 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.

sh
nocturn knowledge index
nocturn knowledge status
nocturn knowledge ls -w work

See Knowledge.

nocturn is open source. Example hosts and people on these pages are made up.