ruri

Readme

ruri

One desktop workspace for all your projects — each one lead you talk to, with a team of agents behind it.

A row per project on the left, a real agent session on the right.

From README.md on GitHub

ruri is a desktop app (Electron, for macOS and Linux) that hosts coding-agent sessions: Claude Code through @justin06lee/yagami's AgentSession (your installed, signed-in claude CLI — settings, CLAUDE.md, skills, hooks and login identical to your terminal), and through yagami's provider layer any other harness you have installed — Codex, OpenCode, Gemini, any ACP agent — picked per chat from the same model dropdown. Sessions stay warm while you switch projects; on macOS closing the window keeps them alive and ⌘Q quits and tears them down, on Linux closing the window is the quit.

Run it#

Requires macOS or Linux, bun, and a signed-in coding CLI (Claude Code, Codex, or an installed ACP agent).

make              # build → install → tidy → launch
make update       # stop the running app, rebuild, reinstall, tidy, relaunch
make build        # only the app, into dist-app/

macOS. make installs ruri.app to /Applications. The first make creates a local code-signing identity (ruri dev) in your login keychain, so macOS privacy grants survive rebuilds — see docs/permissions.md. The app is not notarized (no Apple developer account); it is installed by make, never downloaded.

Linux (built and used on Ubuntu 24.04 with GNOME, arm64; x64 builds the same way; Node.js 20+ is needed alongside bun for Electron's installer). make installs the app for your user alone — the build in ~/.local/opt/ruri, ruri.desktop in ~/.local/share/applications and the icon in ~/.local/share/icons — so it is in the app grid and the dock like anything else, and git pull && make updates it (a ruri that is running keeps going; the next launch is the new one). It asks for sudo only when something is missing: once, on Ubuntu 24.04 and later, to install the AppArmor profile Chromium's sandbox needs there (/etc/apparmor.d/ruri), and to apt-get install what terminals and the bridge use when they aren't there (expect, curl, xdotool, wmctrl, xprop, ImageMagick, python3-gi). Closing the window quits ruri, sessions and all — there is no dock icon to bring a windowless app back from. The bridge drives native apps on an X11 session (Ubuntu on Xorg) over the accessibility bus; on Wayland it keeps web pages and Electron apps. Settings → Permissions has nothing to ask for: Linux keeps no per-app grants.

For development:

bun install
bun run dev       # browser mode: server on :7777, UI at http://localhost:5173
bun run desktop   # the desktop app unpackaged (built UI + Electron)

On a Linux that restricts unprivileged user namespaces (Ubuntu 24.04 and later), an unpackaged Electron has no AppArmor profile, so its sandbox cannot start: run it as bun run desktop -- --no-sandbox (the installed app has its profile).

What it does#

The long form, one bullet per capability: docs/features.md.

Architecture#

ruri.app (Electron)
  ├─ main process: the window, the bridge, the shell's services
  │    └─ server process (utilityProcess)           ─┐
  │         startServer() — server/desktopServer.ts  ├─ one WebSocket + static UI
  │         └─ yagami AgentSession → Agent SDK       │  on one localhost port
  │            → your installed claude CLI           │  (shared/protocol.ts)
  └─ renderer: React + Vite + zustand (dist-web)    ─┘

The server runs in a process of its own, not in Electron's main process: that process's thread is the one every keystroke reaches the window through, and the server's work held them up. What the server needs of the shell — the bridge's windows, the folder picker, screenshots, macOS's grants, carrying the window — it asks for over the port between them (server/hostLink.ts, desktop/serverProcess.ts). A server that dies is started again; the window reconnects to it on the same port.

One HTTP server on 127.0.0.1 carries everything: the built UI, uploads, music, the bridge's HTTP face, and the WebSocket. shared/protocol.ts is the single wire contract; server/ is the backend (sessions, archive, compaction, the small-model layer, the Home agent, the bridge tools), web/src/ the React UI, desktop/ the Electron shell (window, permissions, hidden bridge windows, native apps — linuxApps.ts on Linux — screenshots). scripts/build-main.ts bundles the main process into one file and the server, yagami and the Agent SDK into another, so the packaged app ships no node_modules; the Claude engine is your installed claude binary, found on your login shell's PATH.

All state lives under ~/.config/ruri (RURI_CONFIG_DIR moves it); on Linux Chromium's own storage — the window's, and the bridge's per-project logins — sits in ~/.config/ruri/chromium, where macOS keeps it in ~/Library/Application Support/ruri. Each project gets a self-ignoring .ruri/ folder for its catch-up, its architecture (the index and a sheet per layer) and its component library — once there is something in it: a folder that is still blank is left blank, so create-next-app, bun create and git clone run in it as they would anywhere.

Testing#

bun run typecheck && bun run lint
bun test                 # unit tests, **/*.test.ts
bun run test:scripts     # the token-free integration scripts, one after another
bun run build            # the packaged app must still build

CI runs the same on every push to master and every pull request. The scripts that spend tokens (bun run smoke, the live agent tests, …) or need a display (bridge-test, chips-test) are run by hand; docs/testing.md lists each with its cost.

License#

MIT — see LICENSE.