
# NexusOS
**A local-first AI assistant platform.** Runs entirely on your machine — a
Python/FastAPI backend, an Ollama-compatible endpoint for inference, a
persistent memory service, and a React frontend. Ollama is local by default;
Termux and container installs can explicitly point at a separately managed
endpoint.
---
## What it is
NexusOS ("Nexus") is a self-hosted assistant you actually own. All inference
runs through **Ollama** on `localhost` by default; conversations, facts, and
settings live in local SQLite. It ships with desktop branding (XFCE theme,
icons, boot splash) so it can be run as a full assistant environment on Linux,
not just a web app. A remote Ollama-compatible URL is an explicit configuration
option for lightweight clients; NexusOS never starts or stops that remote
process.
Chat with vision and voice, persistent memory, tool-using playbooks, document
RAG scoped to Projects, gated action tools, and full model management — see
**Flagship features** below for what each of those actually does. Rounding it
out: full conversation history (persist, search, edit, export) and a browser
tail of the service logs.
## Flagship features
### Chat, vision & voice
- **Streaming replies** over SSE, with stop/regenerate/edit-and-resend so a
bad reply doesn't mean retyping the whole message
- **Vision** — attach images and route them to a multimodal Ollama model
- **Voice** — dictate with local Whisper STT instead of typing, and have
replies read back aloud
- **Extended thinking** — a per-message toggle lets a reasoning model show
its work without a round-trip to Settings
### Persistent memory
A dedicated microservice reads every exchange and decides, via its own Ollama
prompt, whether it contains a durable fact worth keeping — a preference, a
name, a standing instruction. Saved facts get layered back into the system
prompt on every future chat, so Nexus remembers you across conversations
without you re-explaining yourself.
### Playbooks
Ordered YAML system-prompt records instead of one static prompt. The first
playbook is the active persona; the rest are automatically routed in as
reference context when relevant. Each playbook can pin its own chat model and
its own tool allowlist, so "coding assistant" and "creative writing partner"
can be genuinely different setups, not just different wording.
### Documents & RAG
Upload PDF, DOCX, TXT, or Markdown; NexusOS chunks and embeds it into a
sqlite-vec index and cites the matching passages back into chat answers.
**Projects** scope this per workspace — switch projects and the model only
draws on that project's documents (or none, in the unscoped "All" view).
### Action tools with an approval gate
- **Read-only, run automatically** — search memory/history/documents, list
models, get the time
- **Gated, need approval** — search the web, fetch a URL, save a fact.
Each one prompts in the chat UI before it runs, so nothing reaches out to
the network or writes to memory without you seeing the request first
### Model management
List, pull, and delete Ollama models from the UI or `ncp`, with hardware-aware
recommendations (GPU detection via Vulkan) so a small-VRAM box isn't offered a
model it can't run.
### Modules
Feature areas beyond the core assistant live as self-contained plugins
instead of being wired into the core app:
- **Mail** — IMAP/SMTP, multiple accounts
- **Network** — connection status, WireGuard toggle, ping targets
A backend module is a folder under `modules/` with a `router.py`; a frontend
module is a folder under `interface/web/src/modules/` with a `module.jsx`
exporting a manifest and a component. Both sides are auto-discovered at
startup/build — dropping in a new module folder is enough to have it mounted
and show up in the UI, no registry file to edit.
## Quick start
NexusOS runs **single-process**: the backend on `:8000` serves the built web UI
itself, so there's no separate frontend server at runtime. Ollama is started
manually from the app (**Start AI** in the sidebar), not at boot.
### Python package and portable CLI
The portable package installs `nexus`, `ncp`, and `nexusos` as equivalent
commands. From a checkout today:
```bash
cd interface/web && npm ci && npm run build && cd ../.. # compile the UI
python -m pip install -e ".[standard]"
nexus init
nexus doctor
nexus serve
```
After a package release, the install becomes `python -m pip install
"nexusos-ai[standard]"`. The wheel includes the compiled web UI and default
playbooks; it keeps writable state outside `site-packages`. See
[the CLI reference](docs/CLI.md) for commands, configuration, and dependency
profiles.
Termux uses the base package with a remote Ollama-compatible provider. Its
bootstrap and the current Android native-wheel gate are documented in
[the Termux guide](docs/TERMUX.md).
### Linux
Nexus was built using an Apple T2 computer running Linux Mint XFCE. The desktop
branding (theme, icons, boot splash) could hypothetically be adapted to any
Linux distro, but I only support the Ubuntu/Linux Mint package base.
```bash
# 1. Build everything: venv (auto-selects AMD/NVIDIA/CPU), web UI, memory DB,
# system packages, Ollama binary and the XFCE desktop wiring.
./install.sh
# 2. Launch (backend :8000 — it also serves the built UI)
# The install symlinks ncp into /usr/local/bin (sudo); open a new shell first.
ncp web
```
Python deps are layered: `requirements-base.txt` (GPU-agnostic core) plus one
GPU overlay — `requirements-amd.txt` (ROCm) or `requirements-nvidia.txt` (CUDA).
`requirements-windows.txt` is the standalone CPU-only runtime (no base overlay).
`bin/sync.py` picks the right one for the host.
`./install.sh` is also the update path — re-run it any time to pull the latest
and rebuild. `--check` dry-runs it; `--no-desktop` skips the XFCE panel/theme
wiring (that stage is auto-skipped off XFCE anyway). It's a thin wrapper over
`bin/sync.py restore`, the same code the Windows box runs.
### Windows
```powershell
# 0. Allow scripts to run (PowerShell blocks unsigned scripts by default, which
# stops Nexus's CLI from working). Process scope covers only this window;
# LocalMachine makes it permanent so ncp works from every future shell (run
# PowerShell as Administrator for the LocalMachine line).
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Force
# 1. Install Git, then clone (public repo, no account/token needed):
winget install Git.Git
# open a NEW PowerShell window, then:
git clone https://git.enderofwings.com/enderofwings/NexusOS.git nexus-core
cd nexus-core
# 2. Native install — winget Python/Node/Ollama, venv, pip, web build, desktop icon
powershell -ExecutionPolicy Bypass -File .\install-windows.ps1
```
Then double-click the **NexusOS** desktop icon, or launch from a **new** shell
(PATH is read at process start, so already-open windows won't have `ncp` yet):
```powershell
ncp web
```
The app opens at `:8000`; click **Start AI** to launch Ollama. The installer
uses `requirements-windows.txt` (CPU-only, pure-Python — no ML stack, since Ollama
does all inference over HTTP).
### Individual services
```bash
# Linux
source Promethean/bin/activate
uvicorn synapse.main:sio_app --host 127.0.0.1 --port 8000 --reload # backend (serves the UI too)
# Frontend dev server (hot-reload) — only needed when editing the UI;
# production serves the built dist/ from the backend at :8000.
cd interface/web && npm run dev
```
```powershell
# Windows — needs the RemoteSigned policy from the Quick start step above
Promethean\Scripts\Activate.ps1
uvicorn synapse.main:sio_app --host 127.0.0.1 --port 8000 --reload # backend (serves the UI too)
```
### Promethean
The name for the Python virtual environment all backend code runs in — keeps
Nexus's dependencies out of the system Python. To add a package, activate it
and `pip install` as usual:
```bash
# Linux
source Promethean/bin/activate
pip install