A daemon-driven AI assistant with a clean client/server architecture.
Don't read the rest of this file. You only need to know the three following things:
- The easiest way to install Exocortex is to tell your AI agent:
Please install https://github.com/Yeyito777/Exocortex.git
-
Exocortex is fully vim-keyed, the easiest way to learn how to use it is to point your agent at the code and ask it how it works.
-
Chances are you won't like Exocortex out-of-the-box, and there may be things that straight up don't work for you. This is because I built it for me. The easiest way to fix this, is to ask AI to do it for you. There are many systems I've built into it that makes this process particularly easy, have fun discovering them.
Exocortex is installed from its canonical source repository on every platform. Keep the clone after installation: the Linux commands are symlinked into it, and macOS runs directly from it.
Install Git and Make:
sudo pacman -S --needed git makeInstall Bun:
curl -fsSL https://bun.sh/install | bashOpen a new shell, or source the shell profile printed by Bun's installer, before continuing. Arch already includes the systemd user-service support used by Exocortex.
git clone https://github.com/Yeyito777/Exocortex.git
cd Exocortex
make installmake install:
- Installs the locked Bun dependencies.
- Symlinks
exocortexdandexocortexinto~/.local/bin. - Adds the Exocortex and Bun binary directories to the login shell's startup
file (
~/.zshenvfor zsh or~/.bashrcfor bash). This also makesexocortexd proxyavailable to non-interactive SSH commands. - Installs, enables, and starts
exocortex-daemon.serviceas a systemd user service.
Open a new shell after installation so the updated PATH is loaded.
exocortexd login
exocortexBrowser OAuth is the default. On a remote or headless machine, use OpenAI's code flow:
exocortexd login openai codeCheck or restart the daemon with:
exocortexd status
exocortexd restartInside the TUI, /ssh <alias> connects directly to that host's Exocortex
daemon through exocortexd proxy; /ssh cancel returns to the local daemon.
The selected route belongs to that TUI process, so other TUIs can remain local
or connect to different aliases at the same time.
Hold-to-talk transcription on an SSH route prefers the local daemon, falling back to the remote daemon if local transcription is unavailable. Prompt editing, pending-message recall, and optimistic queuing still work normally; final text goes to the selected conversation daemon. Voice jobs survive SSH reconnects.
While a TUI is connected over /ssh, the model's client_bash tool runs
commands on the machine that TUI runs on, rather than on the daemon's host.
The TUI runs them in their own process group and stops them on timeout,
interrupt, or when its SSH connection ends. Conversations get a short notice
when that machine connects or disconnects.
To select the SSH route as soon as the TUI launches, pass the same alias on the command line:
exocortex --ssh <alias>/proxy <openai|anthropic> <alias> is narrower: conversations, tools and files
stay on this machine, and only that provider's model requests go through the
other machine's daemon, which adds its own login. See
docs/provider-proxy.md.
cd Exocortex
git pull --ff-only
bun install --frozen-lockfile
exocortexd restartcd Exocortex
make uninstallThis stops and removes the systemd user service and removes the two command symlinks. It does not delete the source clone or user data.
The current macOS path runs the daemon and TUI directly from the source clone.
The Linux make install target is intentionally not used because it installs a
systemd service.
Install Apple's command-line tools, which provide Git:
xcode-select --installInstall Bun:
curl -fsSL https://bun.sh/install | bashOpen a new shell, or source the shell profile printed by Bun's installer. Voice input additionally requires FFmpeg; with Homebrew:
brew install ffmpegText and image clipboard integration uses macOS's built-in pbcopy, pbpaste,
and osascript commands.
HEIC/HEIF photos are converted locally to JPEG before being sent to a model.
This requires ImageMagick with HEIC/libheif support (brew install imagemagick libheif
on macOS). Native HEIC clipboard data and single copied HEIC files from Finder
or Linux file managers are preferred over PNG file icons. Terminal/SSH clipboard
pasting supports HEIC when the terminal offers the actual HEIC image bytes;
a PNG containing only a file icon cannot be recovered into the original photo.
git clone https://github.com/Yeyito777/Exocortex.git
cd Exocortex
bun install --frozen-lockfileFrom the source clone:
cd daemon
bun run src/main.ts loginFor code-based OpenAI login on a headless Mac or remote shell:
bun run src/main.ts login openai codeKeep the daemon running in one terminal:
cd Exocortex/daemon
bun run src/main.tsLaunch the TUI from a second terminal:
cd Exocortex/tui
bun run src/main.tsPress Ctrl+C in the daemon terminal to stop it.
To keep the daemon running across logins, run it as the com.exocortex.daemon
LaunchAgent through the signed launcher app:
cd Exocortex
scripts/macos/build-launcher.sh # build, sign, install the app; write/update the LaunchAgent
scripts/macos/build-launcher.sh --reload # same, then (re)load the LaunchAgent nowThen manage it with exocortexd start|stop|restart|status (link it with
ln -s "$PWD/bin/exocortexd" ~/.local/bin/exocortexd).
Why a launcher. macOS attributes privacy access (files of other apps,
Desktop, Documents, …) to the responsible process: the program launchd
started. If that is bin/exocortexd, it is Homebrew's bash, which is ad-hoc
signed and changes on every brew upgrade, so macOS keeps asking “bash would
like to access data from other apps”. ~/Applications/Exocortex Daemon.app
(dev.yeyito.exocortex.daemon) is a tiny native launcher signed with your
Apple Development identity. It stays the daemon's parent, so every process the
daemon spawns is attributed to it, and its identity survives rebuilds and
Homebrew/Bun upgrades. It resolves Bun each time it starts, forwards
stop/restart signals, and exits with the daemon's status, so exocortexd and
launchd's restart behaviour are unchanged.
One-time consent. The first time a prompt names “Exocortex Daemon”, choose
Allow; it now sticks. To never be asked, add the app under System
Settings › Privacy & Security › Full Disk Access (+, then
~/Applications/Exocortex Daemon.app); do this before the first reload if the
clone lives in Desktop or Documents.
Rebuild after pulling launcher changes, or to re-sign with a new
certificate, by re-running scripts/macos/build-launcher.sh --reload. It is
idempotent and keeps your LaunchAgent's other settings (a backup of the previous
plist goes to config/runtime/launchd/backups/). Homebrew or Bun upgrades need
no rebuild. Without an Apple Development or Developer ID certificate it signs
ad-hoc and warns: prompts will then return after each rebuild.
Stop the foreground daemon, then update the source and dependencies:
cd Exocortex
git pull --ff-only
bun install --frozen-lockfileStart the daemon and TUI again using the commands above.
The Windows installer builds Exocortex from the canonical source repository. It does not download prebuilt Exocortex release artifacts.
Install Git from git-scm.com, or with
winget:
winget install Git.GitThe Exocortex installer installs Bun from Bun's official installer when Bun is not already available.
Clone the repository, then double-click
scripts\windows\exocortex-install.cmd. To run
the same installer from a terminal:
git clone https://github.com/Yeyito777/Exocortex.git
cd Exocortex
.\scripts\windows\exocortex-install.cmdThe installer builds the daemon, TUI, and external exo CLI into dist\,
copies exocortexd.exe, exocortex.exe, exo.exe, and exocortex.bat to
%USERPROFILE%\.local\bin, and adds that directory to the user PATH. Open a
new terminal after the first install.
To install elsewhere or leave PATH unchanged:
.\scripts\windows\exocortex-install.cmd -InstallDir C:\Exocortex -NoPathUpdateexocortexd login
exocortex.batFor code-based OpenAI login:
exocortexd login openai codeexocortex.bat starts the daemon in the background, opens the TUI, and stops
the daemon when the TUI closes. No Windows service is installed.
cd Exocortex
git pull --ff-only
.\scripts\windows\exocortex-install.cmdgit clone https://github.com/Yeyito777/Exocortex.git
cd Exocortex
bun install --frozen-lockfile
make windowsBoth native and cross-build methods produce standalone Windows executables in
dist/:
exocortexd.exe— the daemonexocortex.exe— the TUI clientexo.exe— the external debugging and automation CLIexocortex.bat— the launcher
AI metadata shows the model, average output tokens/s, and elapsed work time.
Each API round is sampled separately: provider-reported output tokens divided
by that request's time (time-to-first-token + generation). Tool execution,
compaction, retry backoff, and gaps between rounds are excluded. Retried rounds
are not sampled. These APIs do not expose reliable server-side generation-only
timing, so this is request throughput, not a raw decoding benchmark.
Each assistant message starts at 0.0 tokens/s with an empty sample history.
The display uses normalized exponential weights (alpha = 2/11) over that
message's latest ten measured rounds, with a hard cutoff at ten. Previous
messages never contribute. Reconnecting preserves the current message's
samples, and during tools the rate stays fixed. Historical messages without
measured rates show — tokens/s; message/work elapsed time is never a fallback.
/diagnostics toggles raw output-token counts alongside this metadata.
/diagnostics on and /diagnostics off set it explicitly. This TUI-only
preference defaults to off and persists locally as tui.diagnostics in
config/config.json. Token accounting and /tokens remain unchanged.
The daemon provides a native exo tool for current-instance conversation and
subagent orchestration. The separate exo executable is an external debugging
and automation client, especially useful for targeting other daemon instances.
The Windows installer includes exo.exe; the Arch make install target and the
manual macOS steps do not install the separate CLI.