Skip to main content

Operator & admin reference

These subcommands and settings operate the server side of Midnight Manual: registering and versioning sources, minting admin keys and users, running ingests, and tuning rate and token limits. They require an admin token and are hidden from mnm --help by default.

This page is the command and config surface. For the workflows behind it, see Users & access, Versions & rate limits, Running an ingest, and Cloud server & deploy.

Revealing the commands

Admin subcommands run when called by name regardless of visibility. To surface them in --help output, set either:

export MIDNIGHT_MANUAL_SHOW_ADMIN_CMDS=1 # environment variable
[cli]
show_admin_cmds = true # config file

Admin operations on shared commands

sources, versions, and models each expose anonymous reads (documented in the CLI reference) alongside admin operations. The admin operations require an admin token.

sources

SubcommandDescription
createRegister a new source (requires admin bearer).
updateUpdate an existing source.
retireRetire a source: soft-delete, not reversible via the CLI.
list-allList every source including retired ones.

versions

SubcommandDescription
promote <slug> --revision NPromote a historical version back to active.
rollback <slug>Roll back to the most recent prior active version, a convenience wrapper around promote.
retire <slug> --revision NRetire a single historical version. The active revision is rejected; promote another version first.

models

SubcommandDescription
statusList sources still on an older embedding model.
migrateRe-ingest every source not yet on the target embedding model.

Admin-only subcommands

keys

Ed25519 keypair management.

SubcommandDescription
generateGenerate a new keypair, persist the private half locally, print the public half in users.toml wire form.

login

Admin login via challenge-response.

users

Local user-store CRUD.

SubcommandDescription
listList users in the local user store.
show [id]Show one user by id.
addAdd a new user.
updateUpdate an existing user's role, public key, or note.
removeRemove a user from the local store.

admin

Admin tooling group: prompt-injection detector warmup and ad-hoc scoring.

ingest

Run an admin ingest from a manifest.

SubcommandDescription
planCompute the ingest plan locally without starting a server-side run.
runExecute an ingest against the cloud server.

ratelimits

Per-CIDR rate-limit override CRUD.

SubcommandDescription
addCreate a new per-CIDR override.
listList overrides still in effect.
extend [id]Extend an existing override's TTL.
remove [id]Remove an override.

tokenlimits

Per-CIDR or per-user embedding token-limit override CRUD.

SubcommandDescription
addCreate a new per-CIDR or per-user override.
listList overrides still in effect.
extend [id]Extend an existing override's TTL.
remove [id]Remove an override.

Operator configuration

Settings that only matter when running your own server.

[cli]

KeyDefaultDescription
show_admin_cmdsfalseReveal admin subcommands in --help output. Equivalent to MIDNIGHT_MANUAL_SHOW_ADMIN_CMDS=1.

Server-side environment variables

VariableDescription
MIDNIGHT_MANUAL_SHOW_ADMIN_CMDSSet to 1 to reveal admin subcommands in --help.
MIDNIGHT_MANUAL_USER_STOREPath to the local user store.
MIDNIGHT_MANUAL_JWT_SECRETJWT signing secret.

Rate-limit and token-limit refill rates are configured with their own environment variables; see Versions & rate limits and Cloud server & deploy.