Setup

Three commands, and the installer does the rest

The installer walks through it and asks before anything that touches your system. Run it again any time to repair or update: it picks up where it left off and only does what's missing. The full story, down to every setting, is in the documentation.

1 Clone and install

Linux and macOS:

git clone https://github.com/fswolf/luna-local-agent.git ~/luna-ai
cd ~/luna-ai
./installer/install.sh

Windows, in PowerShell:

git clone https://github.com/fswolf/luna-local-agent.git $HOME\luna-ai
cd $HOME\luna-ai
powershell -ExecutionPolicy Bypass -File installer\install.ps1

The folder is ~/luna-ai, and every path in the docs assumes it (an older install in ~/ai-voice works the same). What the installer does, in order:

  1. Checks. Python 3.10 to 3.13 (it offers to install 3.12 if there's none), your GPU, disk space.
  2. System packages through your own package manager (dnf, apt, pacman, zypper, brew or winget): PortAudio for audio, espeak-ng for the voice, git. It shows the exact command first.
  3. Luna's Python environment. PyTorch comes as the small CPU build, since only voice detection uses it here.
  4. Her voice. It clones kokoro-reader next to this folder, in its own environment, with PyTorch for your GPU (NVIDIA, AMD with ROCm, Apple) or the CPU.
  5. Her brain. LM Studio (it tells you what to click), or llama.cpp built here for the research features.
  6. Extras, pick any: wake word, MCP, portrait tools, Live2D runtime, embedding model, chat plugins.
  7. Launchers. A luna command and an app-launcher entry on Linux, Luna.command on macOS, luna.cmd and a Start menu shortcut on Windows.
  8. A health check, then a summary of what's ready and what isn't.

Or skip the installer. In the folder you cloned, app/luna.sh (Linux and macOS), app/Luna.command (double-click on a Mac) or app/Luna.cmd (Windows) sets everything up by itself: it fetches a private Python into Luna's own folder, shows a setup window that ticks through the steps without asking anything, needs no admin password, and then starts her. Packages it can't install without one are listed there with the command to copy. Ready-made downloads are coming; the Windows and macOS launchers haven't been tested yet.

2 Start her

luna            # or ./start.sh, or luna.cmd on Windows
./start_web.sh  # her web UI in a window of its own instead (start_web.cmd on Windows)

The launcher starts her voice server too if the installer set one up, and llama.cpp if it's built and no model server is answering, and stops both again when she exits. It checks the model server and the voice on the way past and says if either is down: with no voice server she runs as a text chat without speech, and a launcher that won't launch is worse than one that tells you why it'll be quiet.

Plain luna is the full-screen terminal, the one for a server or an SSH session. With ./start_web.sh (or luna --web) there's no terminal: her chat opens in a window of its own, the terminal you started her from can close, and her icon sits in the system tray (chat, portrait, settings, her voice, push to talk, Quit). Closing her window leaves her running there; with no tray to show it in, closing it quits her. Run it again while she's up and it just opens her window.

Started this way with no model server answering, she doesn't quit: her window asks where one is. It keeps looking where your settings say and where LM Studio and llama.cpp usually are on this computer, explains how to get LM Studio going, and takes the address of a server on another computer, with its API key if it has one. She starts the moment one answers with a model loaded, and remembers it for next time.

3 Her brain: LM Studio or llama.cpp

LM Studio is the easy path: install it, download a model with a tool template (Qwen, Llama 3.1+, Mistral, Hermes), start its Local Server, and check it answers on http://localhost:1234. That's it.

She isn't tied to one model. The installer reads your graphics memory and offers the biggest Qwen3.5 that fits, with room for her context and her eyes and for what else shares the card: her voice, and the two small recall models, which run on the CPU instead when they'd cost her a size. Then it asks uncensored or standard, uncensored first: the same sizes with the refusals taken out, which is what most people run a companion on. Those are the models she's tested on every day, not the only ones that work; anything with tool calling on llama.cpp or LM Studio should do, and the wiki's Models page is honest about what's been tried and what hasn't.

llama.cpp serves the same GGUF file and opens up what LM Studio keeps inside: token probabilities (which is where her confidence colouring, calibration and adaptive thinking come from), control vectors for the introspection experiments, and the embedding and reranker servers for recall by meaning. Luna works with either and picks by herself at startup, llama-server first if both are up.

llama/install.sh          # Vulkan on Linux ("rocm" for ROCm/HIP), Metal on a Mac
./start.sh                # starts llama.cpp too, then Luna

With MODEL left empty it finds the GGUF in LM Studio's own model folders, so there's no second 10 GB copy. On a Mac it builds for Metal and reads a lighter settings file. The model can also live on another machine: point the URLs in config.json at it.

4 Her voice

Speech is synthesized by kokoro-reader rather than inside Luna, so one loaded model serves every app that asks and she starts in seconds. The installer sets it up; by hand it's:

git clone https://github.com/fswolf/kokoro-reader.git ~/kokoro-reader
source ~/luna-ai-venv/bin/activate
KOKORO_VOICE=af_bella python3 ~/kokoro-reader/server/kokoro_server.py

If the server isn't answering she says so and keeps working as a text chat. Any speech server that answers /tts, /health and /voices can stand in for it.

5 Check, update, undo

./start.sh --check        # what's missing and how to fix it, in plain words
./update.sh               # the latest version, keeping your config.json and your changes
python installer/uninstall.py    # removes what the installer added, never your memory or settings
Luna's check:
  ✓ Python packages
  ✗ no model server answering (llama.cpp :8080 or LM Studio :1234)
      → open LM Studio's Local Server, or build llama.cpp: bash llama/install.sh
  ✓ her voice server is installed - ./start.sh starts it

config.json is yours and isn't in git: the first start makes it from config.example.json, and updates never touch your copy. Every setting can be changed from inside the terminal: Tab three times opens the settings pane, which lists all of them grouped by section with a line saying what each does, or /set for the one you already know the name of. Saved immediately, most without a restart. There's a settings page in the browser too, served beside the live view: presets to start from (Assistant, Companion, Streamer, and Small, Medium or Large for your model, with the window your model server reports said beside them), a search, and a filter for the everyday settings, all of them, or only what you've changed. If you edit the file by hand and leave a typo, she says so and won't save over it until it's fixed.

6 Then switch on what you want

Luna's settings page in a browser: three presets, a search box, and the Voice and Speaking sections with sliders
The settings page. Pick a preset, search for a setting, or show only the ones you've changed.
WantDo
Her portrait/portrait. Her own VRM ships with the repo; drop a Live2D folder or another .vrm into portrait/models/ to switch
Hands free/mode open, or the wake word extra for "hey Jarvis" out of the box
Her eyesA vision model in LM Studio, or the model's mmproj file beside it for llama.cpp. The webcam is /camera on, and /presence on leaves it watching
Another roomThe stations extra, switch Relay stations on in the settings page, scan the QR code with an old phone or tablet
Who's whoThe voices extra, then /people enroll voice Shannon; faces need the camera extra and /people enroll face Shannon
Recall by meaningDownload Qwen3-Embedding-0.6B into llama/models; start.sh runs it beside the chat server
Your smart homeHome Assistant on your network with its MCP server integration added, a token in ~/.config/ai-voice/, then /home on
Your inboxAn app password in ~/.config/ai-voice/email.json; sending stays off until /set email.send true
From your phoneA Discord bot token and your owner id, then /discord on
Stream chat/twitch on, /youtube on or /irc on, with the channel in config.json
Games/adventure on works out of the box with frotz installed: Zork and five more text adventures come with her. Minecraft needs its MCP server and a LAN world
ToysLovense Remote in Game Mode, or Intiface Central, then /lovense on or /buttplug on

7 Platforms, honestly

Linux is where Luna lives and is tested. On macOS and Windows she installs and runs as a voice and text companion, and the macOS side has its own tester. The Linux-only parts (the global hotkey through evdev, Hyprland window tools, grim screenshots) say "not available" instead of working. Reports are welcome.

Luna running in a terminal on Windows, checking a scheduled backup job and starting a chess game
Luna on Windows, in a plain terminal: a scheduled task checked, a chess game started.

Get the code Full install docs