mjaafar's profile picture
mjaafar

locus-linux

Public

Locus for Linux: your local AI from your phone: LM Studio, Ollama or an OpenAI-compatible server (llama.cpp, KoboldCpp, Jan), one per chat. Locus finds your llama.cpp and can start its own, with GGUF models the phone downloads. Starts with LM Studio; installs itself on first run.

9 Downloads

README

Locus for Linux

Locus lets you use the AI models of LM Studio on your Linux machine from your phone, for example a headless server running LM Studio's llmster. Your chats and files stay on that machine.

Status: preview. This version runs on the developer's own machines only. The public release, together with the Locus app for iPhone, is coming. Installing this plugin now will not set Locus up on your computer.

What it does

  • Starts Locus each time LM Studio's server (llmster) starts.
  • On the first run, installs Locus for your user, under your home folder. Nothing runs with sudo.

Pair a phone

In a terminal on the machine, run locus pair. A QR code appears: scan it with the Locus app. The code works once, for 5 minutes.

Locus also shows the QR by itself after locus start, and when you log in over SSH while no phone is paired yet. Once a phone is paired, the login shows one line instead: "Locus is running — run locus pair to pair another phone".

To pair a second phone, run locus pair again and scan the new QR with that phone. Each phone gets its own key, so you can sign one out without touching the others.

llama.cpp, started by Locus

Besides LM Studio, Locus can start llama.cpp's llama-server itself. New: when you start a llama-server yourself, Locus finds it running under your own account and registers it by itself; no command and no restart are needed. Or run locus manage llamacpp --exe followed by the full path of llama-server (it takes effect at once); locus manage llamacpp --off says no, --auto takes the no back. The phone then searches Hugging Face and downloads GGUF models into Locus's models folder (locus manage shows where), loads and unloads them; on the machine locus models lists them and locus models rm followed by a model's id removes one. locus restart waits for a running download first.

On the phone, "llama.cpp" is one row for a llama-server you started yourself and Locus's own copy together. While your own llama-server is in use, Get a model works there too; Load on one of those models asks once, then Locus starts its own copy with it for this chat and your own copy keeps running.

New: each chat has its own AI tool. In Models, Use for this chat under "AI tool for this chat" moves only that chat; two chats can answer from two tools at the same time. New chats get the machine's default: Make default (on a phone that may add or remove devices) or locus use. "Also in memory on this PC" lists what the other tools hold, with Unload; one model loads at a time on the whole machine, and the phone asks before a load unloads a model another chat used in the last 10 minutes. The list of AI tools shows at once, even while a tool is busy: a tool that is writing an answer keeps its row and says so, a tool that does not answer in time is listed as "Not answering yet", and locus ls and locus status do not wait on a busy tool.

Also new: after an update the page in the app reloads itself; and speak to type (a microphone button in the message box) comes with the next versions of the phone apps, with "Send when I stop speaking" (asked once; /speak send on or off in a chat). Answers read aloud by the computer work on Windows only for now: on Linux, locus voice get refuses and says why, and the phone shows no Listen.

Locus does not start KoboldCpp on Linux yet, and does not find Strata on Linux yet. None of this has been tried on a real Linux machine yet (finding a running llama-server was tested against stand-ins only).

Privacy

Your chats stay on your machine. The phone reaches it through an encrypted tunnel. Today that encryption ends on the relay server that forwards the traffic; end-to-end encryption is planned. Locus keeps its keys in files only your user can read; the machine's administrator (root) can read them too.

Requirements

Linux (x86-64 or ARM64), LM Studio's llmster with its lms command, and Python 3.10 or newer.

Windows

For Windows, see locus-win.