LOCUStechnical wiki

Command-line helper

The locus command on the computer

Locus has one command on the computer. Most commands talk to the running Locus through its admin port, which listens on 127.0.0.1 only and needs a token that only your user account can read; a few also work while Locus is stopped. Nothing here can be done from a phone, and a phone cannot run these commands.

Where the command is

ComputerCommandNotes
Windows"%LOCALAPPDATA%\Locus\run\locus.cmd"Not on your PATH: type the full path, with the quotes, in a Command Prompt.
macOS (preview)locusIn ~/.local/bin; the installer adds that folder to your PATH in your shell's profile. Open a new Terminal window after the install.
Linux (preview)locusIn ~/.local/bin.

Below, locus stands for the command of your computer. On Windows, for example:

"%LOCALAPPDATA%\Locus\run\locus.cmd" status

locus --help lists every command with one line each; locus <command> --help shows a command's options (some have a line of help, many have none: this page is the fuller reference).

Cheat sheet

CommandWhat it doesLocus must run
locus statusSettings, address, autostart, whether Locus runs, the AI tool for new chats, what is in use now, devices, the tunnel, the tools Locus startsfor the live part
locus lsThe AI tools Locus finds, their state and address; the models of the defaultyes
locus use <tool>Set the default AI tool, the one new chats get: lmstudio, ollama, llamacpp, koboldcpp, a name ls shows, or http://<address>:<port>. Open chats keep theirsyes
locus manageShow how llama.cpp and KoboldCpp are set up for Locus to start, and what Locus found by itselfno
locus manage <tool> --exe <path>Set up llama.cpp or KoboldCpp by hand (optional: Locus registers them by itself when it finds them running); a running Locus takes it in at onceno
locus manage <tool> --repinCheck and pin the program and its libraries again now (Locus also does it by itself at the next Load)no
locus manage <tool> --offLocus no longer starts it (the program is not touched), and does not register it again by itselfno
locus manage <tool> --autoTake an --off back: Locus registers the program running now, or once it finds itno
locus modelsThe models in Locus's own models folderyes
locus models rm <id>Remove one of them, with its filesyes
locus doctorRead-only checks of the installno
locus pairA one-time pairing code and QR for another phoneyes
locus devices listThe paired devicesyes
locus devices rename <id> <name>Rename a deviceyes
locus devices revoke <id>Sign a device outyes
locus devices manage <id> on|offLet a device add or remove devices, or notyes
locus name [<text> | --default]Show or set the name the apps show for this computerno
locus restart [--now]Restart Locus (when nothing is going on, unless --now)yes
locus stop [--now]Stop Locus, and keep it stopped until locus startno
locus startStart Locusno
locus autostart on|offStart Locus with LM Studio, or notno
locus reset-keysA new master key; every device signed outno
locus versionThe installed versionno
locus voiceWindows: whether the voice that reads answers aloud is installed, its voices, the voice runner's statefor the runner's state
locus voice get [--from <folder>]Windows: download and install the voice (about 403 MB), or take the same files from a folderno
locus voice rmWindows: remove the voiceno

Add --json for machine output (status, ls, models, manage, devices, voice and doctor print JSON). --settings <file> points a command at another settings file; you should not need it.

Exit codes and errors

CodeMeaning
0Done
1Locus is not running, or nothing to do. For doctor: warnings only
2Wrong words (usage), or a question was not confirmed
3A check failed: status when Locus runs but is not healthy, doctor when a check failed
4Failed, or Locus refused (the message says why)
5Refused by a safety check: a path, a port, or a settings file changed by hand

Errors go to the error output as locus <command>: <message>, or as <command> refused: <message> (HTTP <n>) when the running Locus refused.

locus status

The settings, the address, autostart and, when Locus runs, its state: the engine, the AI tool for new chats and what is in use now, the paired devices, the tunnel program (newt), the tools Locus starts, and the activation. It does not wait on a busy AI tool.

locus status [--json]
settings     C:\Users\you\AppData\Local\Locus\run\settings.json (version <version>)
address      <your Locus address>
autostart    on
state        running, pid 10432, up 5321 s
engine       127.0.0.1:8744 ok=True; LM Studio ok
AI tool for new chats: LM Studio
In use now: LM Studio (qwen/qwen3-8b loaded), Ollama (1 answer)
devices      2 paired, 0 pairing codes open
newt         running (pid 11208, 0 restarts)
llama.cpp    off: Locus starts it on 127.0.0.1:18080
activation   active; Locus id 3f9a0c12

locus ls

The AI tools Locus finds on this computer, their state and address, then the models of the default, the tool new chats get (like lms ls or ollama ls). It never waits on a busy tool.

locus ls [--json]
AI TOOL                       STATE                                                  ADDRESS
LM Studio                     default, 2 chats in the last 10 minutes                127.0.0.1:1234
Ollama                        running, answering now, 1 chat in the last 10 minutes  127.0.0.1:11434
llama.cpp server              not answering yet                                      127.0.0.1:8080
llama.cpp (started by Locus)  Locus starts it when a model is loaded                 127.0.0.1:18080

Models in LM Studio:
MODEL               SIZE    STATE
qwen/qwen3-8b       5.0 GB  loaded
google/gemma-3-12b  8.2 GB  not loaded
openai/gpt-oss-20b  12 GB   not loaded

locus use

Set the computer's default AI tool: the one new chats get, and apps through /v1. Chats that have an AI tool keep it: this moves no chat, waits for nothing and stops no tool. On a phone, Make default in Models does the same (a phone that may add or remove devices); any paired phone chooses the tool of its own chat with Use for this chat.

locus use lmstudio | ollama | llamacpp | koboldcpp | <name> | http://<address>:<port>
          [--kind ollama|openai] [--key | --no-key]
> locus use ollama
New chats use Ollama (127.0.0.1:11434) from now on. Chats that have an AI tool keep it.

> locus use llamacpp
New chats use llama.cpp (started by Locus, 127.0.0.1:18080) from now on. Chats that have an AI tool keep it.
It starts when a model is loaded: Load one in Models (on the phone, or on this PC's page).

> locus use jan --key
Access key for jan (not shown):
New chats use Jan (127.0.0.1:1337) from now on. Chats that have an AI tool keep it.

> locus use lmstudio
New chats use LM Studio (127.0.0.1:1234) from now on. Chats that have an AI tool keep it.

> locus use lmstudio
New chats already use LM Studio (127.0.0.1:1234).

Common refusals:

locus manage

Optional. When you start llama.cpp (its llama-server) or KoboldCpp yourself, Locus finds it running and registers it by itself (how). locus manage shows the setup, sets a tool up by hand, changes its options, or tells Locus not to take it. You install the tool yourself; Locus checks the program (it does not run it) and pins it. It starts nothing. A running Locus takes a new tool in at once, without a restart; a change to a tool Locus runs now, to its port or to the models folder waits for locus restart (the command says so).

locus manage                                   show how both tools are set up, and what Locus found
locus manage llamacpp  --exe <path of llama-server> [options]
locus manage koboldcpp --exe <path of koboldcpp> [options]
locus manage <tool> [options]                   change options of a tool set up already
locus manage <tool> --repin                     check and pin it again now
locus manage <tool> --off                       Locus no longer starts it, nor registers it by itself
locus manage <tool> --auto                      take an --off back
OptionValues
--exe <path>The program: llama-server; for KoboldCpp, on Windows koboldcpp.exe (Locus prepares it once) or an unpacked koboldcpp-launcher.exe, on a Mac koboldcpp-mac-arm64 as downloaded
--port NIts port on 127.0.0.1, 1024 to 65535. Default 18080 for llama.cpp, 15001 for KoboldCpp
--models <folder>The models folder both tools share (default: models in Locus's data folder)
--gpu-layers N|auto0 to 999 layers on the graphics card, or the tool's own choice
--threads N|auto1 to 256 processor threads, or the tool's own choice
--backend auto|cuda|vulkan|cpuKoboldCpp only; on a Mac only auto or cpu
--load-timeout S60 to 3600 seconds for a model to load. Default 900

Options already set are kept unless you give them again. Windows example:

> "%LOCALAPPDATA%\Locus\run\locus.cmd" manage llamacpp --exe "C:\Tools\llama\llama-server.exe"
llama.cpp  set up for Locus to start
  program  C:\Tools\llama\llama-server.exe
  pinned   sha256 7c1e5a0b9d3f42e6a8b0c4d2e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f3 (the program and the 14 libraries in its folder)
  address  127.0.0.1:18080 (this computer only)
  options  the tool's own choices
  loading  up to 900 s for a model to load
models     C:\Users\you\AppData\Local\Locus\data\models (both tools; the default)
Locus starts it itself when a model is loaded with it: locus use llamacpp (or Use under AI tool on this PC, in Models), then Load a model (Get a model in Models downloads one into Locus's models folder; locus models lists them)
The running Locus took it in: no restart needed.

KoboldCpp on Windows: Locus prepares it

Locus never runs KoboldCpp's one-file koboldcpp.exe itself: at every start that program unpacks about 1 GB into the temporary folder and runs as two processes that Locus cannot stop cleanly. Locus prepares it once instead, by itself when it finds your KoboldCpp running, or when you give koboldcpp.exe to locus manage koboldcpp --exe: it unpacks a private copy under %LOCALAPPDATA%\Programs\Locus (about a minute, no window), then registers its koboldcpp-launcher.exe. Your own KoboldCpp is not touched.

> "%LOCALAPPDATA%\Locus\run\locus.cmd" manage koboldcpp --exe "%USERPROFILE%\Downloads\koboldcpp.exe"
Locus is preparing KoboldCpp (once: about a minute and 1 GB on this PC)...
C:\Users\you\Downloads\koboldcpp.exe is KoboldCpp's one-file program: Locus prepared it once and registered its unpacked launcher
…

If koboldcpp.exe is in a folder other accounts may change, Locus takes it only while your own KoboldCpp runs from it. A failure says why and leaves nothing behind. You can still unpack it yourself and register its koboldcpp-launcher.exe.

macOS and Linux (previews)

locus manage llamacpp --exe "$(brew --prefix)/bin/llama-server"     # macOS, Homebrew's llama.cpp
locus manage koboldcpp --exe ~/Downloads/koboldcpp-mac-arm64        # macOS, KoboldCpp as downloaded
locus manage llamacpp --exe ~/llama.cpp/build/bin/llama-server      # Linux

On Linux, Locus does not start KoboldCpp yet.

Saying no, and taking it back

> locus manage llamacpp --off
llama.cpp: Locus no longer starts it (the program itself was not touched: C:\Tools\llama\llama-server.exe), and does not register it again by itself (locus manage llamacpp --auto lets it)

Locus remembers that program by its path, also after a restart or an update; a llama-server at another path is not concerned. --off also works while Locus runs: a model Locus runs with that tool is stopped. locus manage llamacpp --auto forgets the no and registers the program running now (else Locus does it once it finds it); --exe registers the one you name.

Updates and the pin

Locus keeps a SHA-256 fingerprint of the program and of the libraries beside it (the .dll, .dylib and .so files in its own folder). When you update the tool, Locus checks it again with every rule and pins it again by itself at the next Load (a line in main.log and a notification). If a check fails, the Load is refused in plain words. locus manage <tool> --repin does the same at once, and says why when a check fails:

> locus manage llamacpp --repin
llama.cpp: pinned again: C:\Tools\llama\llama-server.exe
  was      sha256 7c1e5a0b9d3f42e6a8b0c4d2e6f8a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f3
  now      sha256 0d4b8f2a6c1e9d3b7f5a0c8e2d6b4f9a1c3e5d7b9f0a2c4e6b8d0f1a3c5e7b9d (the program and the 15 libraries in its folder)

At most 256 libraries are pinned, 4 GB in all with the program, and only files in the program's own folder. A library that is a link to a file outside that folder is refused. Libraries in a sub-folder are not pinned (an unpacked KoboldCpp keeps most of its code in _internal).

Common refusals:

locus models

The models in Locus's own models folder, the one llama.cpp and KoboldCpp started by Locus share, and the removal of one. Only models Locus downloaded itself are listed: a GGUF file copied into the folder by hand is not.

locus models [--json]
locus models rm <id>
MODEL                                                                         SIZE    CONTEXT  STATE
Qwen/Qwen3-8B-GGUF/Qwen3-8B-Q4_K_M.gguf                                       5.0 GB  40960    complete, loaded in llama.cpp
unsloth/gemma-3-4b-it-GGUF/gemma-3-4b-it-Q4_K_M.gguf                          2.5 GB  131072   complete
bartowski/Mistral-7B-Instruct-v0.3-GGUF/Mistral-7B-Instruct-v0.3-Q4_K_M.gguf  4.4 GB  32768    downloading 41 %
3 models, 9.6 GB in Locus's models folder

locus doctor

Read-only checks of the install: Python, free disk space, the settings, the ports, the QR page, LM Studio, the rights on the secrets folder, the tools set up for Locus to start, the release files, the tunnel program. It changes nothing and works while Locus is stopped.

locus doctor [--json]
OK    python           Python 3.12 runs the CLI
OK    disk C:          412.3 GB free
OK    settings         C:\Users\you\AppData\Local\Locus\run\settings.json is valid (version <version>)
OK    engine port      127.0.0.1:8744 is held by Locus
OK    admin port       127.0.0.1:8745 is held by Locus
OK    QR page          http://127.0.0.1:8765/pair is served by Locus
INFO  LM Studio        LM Studio answers on 127.0.0.1:1234
OK    secrets rights   only the current user may open C:\Users\you\AppData\Local\Locus\secrets
OK    llama.cpp        set: C:\Tools\llama\llama-server.exe (pinned 7c1e5a0b, with the libraries beside it), 127.0.0.1:18080; Locus starts it when a model is loaded with it
OK    release manifest every file matches MANIFEST.sha256
...
doctor: all good

Each line is a level (OK, INFO, WARN, FAIL), a check and a message. The last line is doctor: all good (exit 0), doctor: warnings only (exit 1) or doctor: a check failed (exit 3; 5 when a path or port was refused). What the lines mean: Troubleshooting.

locus pair

A one-time pairing code and its QR for another phone. Each code works once, for 5 minutes. A code made on the computer lets the new phone add or remove devices, unless you say --no-manage.

locus pair [--manage | --no-manage] [--no-browser] [--plain]

On Windows, locus pair opens the QR page in your browser, as the "Locus - Pair a phone" shortcut does:

Locus: the QR page http://127.0.0.1:8765/pair opens in your browser (a new code each time it loads; scan it with the iPhone camera). In a console: locus pair --no-browser

With --no-browser (or --manage / --no-manage) it prints the QR in the console, then:

code      7XQ2-M9KD-4HTV
host      <your Locus address>
expires   <time> (UTC), works once; may manage devices: yes
view      <a one-time link that shows this QR on this computer>
browser   <a link with the code> (a browser on another computer; the QR is for the Locus app)

On macOS and Linux it prints the QR in the terminal (--plain: without colours), then Scan with the Locus app to pair your phone, the app link, and The code … works once, for 5 minutes (until HH:MM UTC); this phone may add or remove devices. Anyone who sees the code within those 5 minutes could pair: keep it to yourself.

locus devices

The paired devices: list them, rename one, sign one out, or give or take the right to add or remove devices.

locus devices list
locus devices rename <id> <name>
locus devices revoke <id>
locus devices manage <id> on|off
> locus devices list
dev_3f9a0c12ab34  ios                 manage=yes   last seen 2026-11-22T09:14:03Z  Sam's iPhone
dev_8b21e0f4c911  web                 manage=no    last seen never  Laptop browser
2 device(s)

> locus devices revoke dev_8b21e0f4c911
signed out dev_8b21e0f4c911: its key now gets 'revoked'
dev_3f9a0c12ab34  ios                 manage=yes   last seen 2026-11-22T09:14:03Z  Sam's iPhone
1 device(s)

> locus devices manage dev_3f9a0c12ab34 off
dev_3f9a0c12ab34 (Sam's iPhone) may no longer add or remove devices

A signed-out device is refused from then on, and an answer it is receiving stops within about a second; the others keep working. It can pair again with a new code. Wrong words: devices manage <id> on|off, devices rename <id> <name>, devices revoke <id> (exit 2).

locus name

The name the apps show for this computer. Without a value it shows the name; --default goes back to the computer's own name. A phone takes the name when it pairs.

> locus name "Studio PC"
name: Studio PC (a phone takes it when it pairs; to rename a paired phone's entry, pair it again)

locus restart, stop, start

locus restart [--now]
locus stop [--now]
locus start

locus autostart

> locus autostart off
start with LM Studio: off

On: the LM Studio plugin starts Locus each time LM Studio starts (the default). Off: you start it with locus start.

locus reset-keys

A new master key, every device signed out and every open pairing code made void. Use it when you think a key has leaked. It asks first (type reset); --yes skips the question.

> locus reset-keys
Give the main a new master key and sign out EVERY device? Type reset: reset
new master key made; 2 device(s) signed out; open pairing codes are void

locus version

Prints the installed version.

locus voice (Windows)

The voice that reads answers aloud on your phone is made on the computer. It is optional and not part of the install: until you run locus voice get, nothing of it shows on the phone. It works on Windows only for now; on macOS and Linux, locus voice get refuses and says why.

locus voice                      installed or not, its voices, the voice runner's state
locus voice get                  download and install it (about 403 MB)
locus voice get --from <folder>  take the same files from a folder of this computer: nothing is downloaded
locus voice rm                   remove it (the running voice is stopped first)
> "%LOCALAPPDATA%\Locus\run\locus.cmd" voice get
…
The voice is installed (<n> MB). On a phone, Listen under an answer reads it aloud.

> "%LOCALAPPDATA%\Locus\run\locus.cmd" voice
voice        installed (<n> MB, sherpa-onnx 1.13.8, Kokoro-82M v1.0) in C:\Users\you\AppData\Local\Locus\data\voice
voices       English: Heart (default), Bella, Emma, Michael; French: Siwis (default)
runner       not running (it starts at the first Listen, <n> threads)
About the voices: …

About the voices: Kokoro-82M by hexgrad, Apache License 2.0. The French voice was trained on the SIWIS French Speech Synthesis Database (University of Edinburgh), CC BY 4.0. Speech engine: sherpa-onnx (k2-fsa, Apache License 2.0), which includes eSpeak NG (GNU GPL v3), downloaded to your computer from their official sources. Locus's voice runner is open source (Apache-2.0). The voices are computer-generated.

Commands in a chat

On the phone, a message that starts with one of these words is a command for Locus: it runs at once and is never sent to the model. Type / in the message box to see the list.

CommandWhat it does
/newStart a new chat
/model <name>Choose a model
/think on|offLet the model think first (slower)
/web on|offLet the model use the web in this chat
/notes on|offProject notes in this chat
/tool <name>Choose the AI tool for this chat
/stopStop the answer being written
/againAsk the last message again
/speak send on|offSend by itself when you stop speaking (with speak to type), or not
/voiceWhat is set now for the voice that reads answers aloud
/voice on|offRead the answers to spoken messages aloud, or not (on at first)
/voice listThe voices: Heart, Bella, Emma, Michael (English) and Siwis (French)
/voice <name>Choose a voice by its name, for example /voice emma
/voice speed <n>From 0.7 (slower) to 1.3 (faster); 1 is normal
/helpShow the commands

Only on the macOS and Linux previews

locus pin [on|off] turns certificate mode on or off on an install of the developer's own: Locus then serves HTTPS with the computer's own certificate and the pairing QR carries its fingerprint. It is refused on Windows and on an activated install, which always serve their own certificate. See Security model.

Not documented here

These commands exist but are not for you to run: install (the plugin runs it), login-line and site-ready (used by the installers), setup-vps (not used), provision, provision-site, provision-remote, set-site and new-address (the developer's own way of giving an install its address; refused on an activated install, whose address comes from the activation), address (its fields are for that way too; status shows your address), import-chats (copies chats from the developer's older setup), and pair --review / pair --backup. To remove Locus, use the uninstall of your platform as its plugin page describes: uninstall.cmd in %LOCALAPPDATA%\Locus on Windows.