Xero is a Tauri desktop app for agentic development workflows, with a React/Vite frontend and a Rust backend command surface.
It combines:
- Project/repository import + file editing/search operations
- Runtime/session orchestration for AI providers
- Autonomous run + operator approval loop support
- In-app browser automation
- iOS/Android emulator sidebars + automation hooks
- Solana workbench tooling (clusters, personas, tx pipeline, deploy helpers)
- Skill/plugin discovery and execution support
- Session memory, transcript search, compaction, branch, and rewind workflows
- MCP server registry management
- Notification routing (Telegram, Discord)
- Phoenix/Postgres sidecar services for web callbacks and shared backend features
Important: this is a desktop-first Tauri app. For end-to-end behavior, run via Tauri (
tauri dev), not as a plain browser app.
.
├─ client/ # Main desktop app (React + Vite + Tauri + Rust)
│ ├─ src/ # App entry + feature hooks
│ ├─ components/ # ShadCN UI + Xero shell/views
│ ├─ src-tauri/ # Rust backend, commands, state, tests
│ └─ package.json
├─ landing/ # Separate Next.js marketing site
├─ server/ # Phoenix service + Postgres-backed features
├─ docs/ # Provider, memory, skills/plugin docs
├─ STANDALONE_AGENTS_ASK_PLAN.md # Plan for Ask agent + future standalone agents
└─ package.json # Root convenience scripts
client/: production desktop app (productName: Xero,identifier: dev.sn0w.xero)landing/: separate website, run on port3001in root dev workflowserver/: Phoenix 1.8 service, local Postgres, GitHub auth callback/session support, game stats, Oban jobs
.tmp-gsd2-ref/: reference snapshot directory (ignored by build workflows).xero/: legacy repo-local state. New app/project state belongs under the OS app-data directory.
- Frontend: React 19, TypeScript, Vite, Vitest, ShadCN/Radix UI, Tailwind CSS
- Desktop host: Tauri v2
- Backend: Rust (command surface + orchestration + persistence)
- Storage: SQLite and LanceDB-backed project stores under the OS app-data directory
- Next.js 16, TypeScript, Tailwind CSS
- Phoenix 1.8, Elixir, LiveView, Ecto/PostgreSQL, Oban, Hammer rate limiting
Main shell views:
- Workflow
- Agent
- Editor
Sidebar tools:
- In-app browser
- Games sidebar
- iOS emulator sidebar (macOS only)
- Android emulator sidebar
- Solana workbench sidebar
Onboarding flow covers:
- Provider profile setup
- Project import
- Notification route setup
- Node.js (modern LTS recommended; Node 20+ is safest for current deps)
pnpm- Rust toolchain + Cargo
protocon PATH. LanceDB-backed memory pullslance-* crates whose build scripts compile vendored.protofiles. On macOS:brew install protobuf.- Tauri OS prerequisites for your platform (WebView/runtime dependencies)
- Docker Desktop, Docker Engine, or a compatible Docker daemon, for the local Postgres service
- Docker Compose v2 (
docker compose) or legacydocker-compose; root scripts use whichever is available - Elixir/Mix for the Phoenix server
- Android SDK tooling (
adb,emulator) and at least one AVD - If missing, Xero can provision a managed SDK in app data via backend provisioning flow
- Xcode + iOS Simulator tooling (
xcrun,simctl) - Accessibility permission (required for some simulator input paths)
Detected/used CLIs include:
solana(minimum required for localnet workflows)anchorcargo-build-sbfsurfpooltridentcodamasolana-verify- plus
nodeandpnpm
If tools are missing, workbench surfaces degraded/missing-toolchain states rather than crashing.
- Postgres is provided by
server/docker-compose.ymlin local development. - Server env defaults are documented in
server/.env.example; local secrets belong inserver/.env.
This repo is not a pnpm workspace, but the root dev preflight installs each package in place. After cloning and completing the prerequisite toolchain/env setup above, the happy path is:
pnpm run devThe root pnpm run dev command runs an idempotent preflight that:
- installs root,
client/, andlanding/pnpm dependencies from their lockfiles - verifies required local commands (
pnpm,git,mix,cargo,protoc) - installs Hex/Rebar if missing, fetches Mix deps, and installs Phoenix asset tools
- starts Docker/Postgres where the OS allows it, creates the database, and applies migrations
Manual setup commands still work if you need to isolate a failing step:
pnpm install
pnpm --dir client install
pnpm --dir landing install
cd server && mix setuppnpm run dev # Preflight, Postgres logs, Phoenix server, Tauri desktop, and landing site
pnpm run dev:preflight
pnpm run db:up
pnpm run db:down
pnpm run db:reset
pnpm run server:setup
pnpm run dev:server # Phoenix server on localhost:4000
pnpm run dev:tauri # Desktop app only (Tauri dev)
pnpm run dev:landing # Landing site on port 3001dev uses concurrently to start:
pnpm run dev:db:logspnpm run dev:serverpnpm run dev:tauripnpm run dev:landing
pnpm --dir client dev # Vite dev server on :3000 (frontend only)
pnpm --dir client build # Frontend production build
pnpm --dir client preview # Preview built frontend on :3000
pnpm --dir client test # Vitest run
pnpm --dir client test:watch # Vitest watch mode
pnpm --dir client lint # ESLintpnpm --dir client run tauri:dev
pnpm --dir client run tauri:dev:ios-grpc
pnpm --dir client exec tauri build
pnpm --dir client exec tauri build --debug
# enable live emulator H.264 decode support
pnpm --dir client run tauri:dev -- --features emulator-livecargo check --manifest-path client/src-tauri/Cargo.toml
cargo test --manifest-path client/src-tauri/Cargo.tomlTarget a specific integration suite:
cargo test --manifest-path client/src-tauri/Cargo.toml --test runtime_supervisor
cargo test --manifest-path client/src-tauri/Cargo.toml --test solana_workbenchPrefer scoped Cargo checks/tests while iterating, and run only one Cargo command at a time so the target directory lock does not become the bottleneck.
Root helpers wrap the same policy:
pnpm run rust:test
pnpm run rust:target:prune:dry-run
pnpm run rust:target:prunecd server
mix setup
mix phx.server
mix test
mix precommitpnpm --dir landing dev
pnpm --dir landing build
pnpm --dir landing start
pnpm --dir landing lintXero supports provider profiles for:
openai_codex(OAuth flow)openrouteranthropicgithub_modelsopenai_api(OpenAI-compatible)ollama(local OpenAI-compatible)azure_openaigemini_ai_studiobedrock(ambient AWS creds)vertex(ambient GCP creds)
Credentials/config are managed via app state and provider profile stores (not via checked-in env files).
OpenAI-compatible setup recipes cover LiteLLM, LM Studio, Mistral, Groq, Together AI, DeepSeek, NVIDIA NIM, MiniMax, Azure AI Foundry, Atomic Chat local, and custom /v1 gateways. See docs/provider-setup-and-diagnostics.md for the setup and diagnostics workflow, including the current GitHub Models token-based onboarding decision.
Xero supports session transcript search, Markdown/JSON export, context visualization, manual compact, opt-in auto-compact, reviewed memory, branch, and rewind workflows. See docs/session-memory-and-context.md for the user workflow, privacy guarantees, and support triage guidance.
Xero's owned-agent harness should be compared with fixed-model, sandboxed benchmark runs rather than informal leaderboard screenshots. See docs/agent-harness-benchmarking.md for the research summary, benchmark choices, and implementation plan.
Xero discovers static and dynamic project skills/plugins and stores trusted project artifacts in app data, not inside the imported repository. See docs/skills-and-plugins.md for authoring, trust, and runtime notes.
Backend commands are registered in client/src-tauri/src/lib.rs and grouped under modules in client/src-tauri/src/commands/.
Major groups:
- Project/repo: import/list/remove projects, snapshot, git status/diff, file operations, search/replace
- Runtime: auth/session, start/stop runtime runs, stream subscription, operator action resolution
- MCP: list/upsert/remove/import MCP servers, refresh connection status
- Notifications: route management, credentials, dispatch records, reply submission
- Browser: tabbed in-app browser automation (navigate/click/type/query/cookies/storage/screenshot/diagnostics/state), plus configurable native browser fallback for owned agents
- Emulator: SDK status, device lifecycle/input, screenshots, UI tree/find/tap/swipe/type, app lifecycle helpers
- Solana: cluster lifecycle, snapshots, personas, scenario runs, tx build/sim/send/explain, ALT/IDL/PDA/program deploy flows
default = []emulator-live(enablesopenh264decoding for live emulator frame decode)emulator-synthetic(synthetic frame generator/testing path)ios-grpc(compiles vendoredidb.protogRPC client)
Default dev builds keep emulator/iOS gRPC dependencies out of the hot path. If emulator-live is not enabled, H.264 decode path reports decoder unavailable.
On build, Xero can:
- Build and stage
xero-cookie-importerhelper binary - Fetch and verify checksum for
scrcpy-server-v2.7.jar - On macOS, fetch and verify
idb-companionuniversal bundle - Compile
proto/idb.protowhenios-grpcis enabled - Compile the macOS dictation Swift shim when the host SDK supports it
XERO_SKIP_SIDECAR_FETCH=1
XERO_BUILD_COOKIE_IMPORTER=1
XERO_SKIP_COOKIE_IMPORTER=1
XERO_SKIP_DICTATION_SHIM=1XERO_SKIP_SIDECAR_FETCH=1skips scrcpy/idb download steps.XERO_BUILD_COOKIE_IMPORTER=1builds the cookie helper from its separate crate.XERO_SKIP_COOKIE_IMPORTER=1skips helper staging.XERO_SKIP_DICTATION_SHIM=1skips the macOS native dictation shim.
These are optional and only needed for specific runtime integrations:
# Custom web-search provider used by autonomous web tools
XERO_AUTONOMOUS_WEB_SEARCH_URL=https://...
XERO_AUTONOMOUS_WEB_SEARCH_BEARER_TOKEN=...
# Solana workbench resource overrides
XERO_SOLANA_RESOURCE_ROOT=/path/to/resources
XERO_SOLANA_TOOLCHAIN_ROOT=/path/to/toolchainXero stores application and project state under the OS app-data directory:
xero.dbfor global stateprojects/<project-id>/state.dbfor per-project state
New imports do not create <repo>/.xero/. That directory is legacy.
Project skill artifacts also live in app data, under projects/<project-id>/skills and projects/<project-id>/dynamic-skills.
Agent memory also uses the OS app-data project store. The LanceDB-backed record/memory store is part of the Rust backend, which is why protoc is a build prerequisite.
Xero also stores UI/runtime-adjacent JSON files like:
window-state.json
Solana stores also use OS data dirs under xero/solana/... for personas/snapshots.
The Phoenix service uses the local Postgres database from server/docker-compose.yml (xero_dev by default). Current migrations cover Oban jobs, GitHub auth sessions, and arcade game stats.
The in-app browser supports tabbed automation, storage/cookie operations, screenshots, console/network diagnostics, accessibility snapshots, and state save/restore. Owned agents default to the in-app browser first and can fall back to native device-browser control when the browser-control preference allows it.
Cookie import helper supports detection/import from common browsers, including:
- Chrome/Chromium/Brave/Edge
- Opera/Opera GX/Vivaldi/Arc
- Firefox/LibreWolf/Zen
- Safari (macOS)
- Ensure
pnpm --dir client installcompleted - Ensure
protocis installed and visible on PATH - Ensure Tauri OS prerequisites are installed
- Ensure port
3000is free (Vite dev server is strict on this port)
- Ensure Docker Desktop, Docker Engine, or a compatible Docker daemon is installed and running, or let the preflight start it where your OS allows
- Ensure Elixir/Mix is installed for the Phoenix server
- Inspect Postgres with
docker logs xero-postgres - Run
pnpm run dev:preflightto isolate setup failures
- For iOS, confirm Xcode/simctl are installed (macOS only)
- For Android, confirm
adb/emulatoravailability or run provisioning flow - If decoder unavailable errors appear, build/run with
emulator-livefeature
- Use
XERO_SKIP_SIDECAR_FETCH=1with pre-populated resources - Or allow network access during first build so
build.rscan fetch pinned artifacts
- Verify
solana(andsurfpoolfor fork mode) are on PATH - Check toolchain status from Solana sidebar; missing tools are surfaced explicitly
If you’re new to this repo, start here:
client/src/App.tsx(top-level app orchestration)client/components/xero/shell.tsx(window shell + sidebar buttons)client/src/features/xero/use-xero-desktop-state.ts(state orchestration)client/src/lib/xero-desktop.ts(frontend adapter + invoke/event contract)client/src-tauri/src/lib.rs(backend command registration)client/src-tauri/src/commands/(backend command namespaces)server/lib/xero_web/router.ex(Phoenix routes)server/lib/xero_web/controllers/(server callback/API controllers)
This repository is actively structured around a Tauri desktop runtime with broad command surfaces for runtime orchestration, browser automation, mobile emulator control, Solana workflows, skills/plugins, and session memory. The server/ Phoenix app and local Postgres service support web callback/shared backend features. The landing/ app is a separate Next.js site used alongside (not instead of) the desktop host.