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
- 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
├─ cloud/ # TanStack Start web/PWA cloud session surface
├─ 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)cloud/: browser/PWA surface for remote sessions, deployed tocloud.xeroshell.comlanding/: separate website, run on port3001in root dev workflowserver/: Phoenix 1.8 service, local Postgres, GitHub auth callback/session support, Oban jobs
- 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
- TanStack Start, React 19, TypeScript, Tailwind CSS, PWA assets
- Phoenix 1.8, Elixir, LiveView, Ecto/PostgreSQL, Oban, Hammer rate limiting
Main shell views:
- Workflow — the agent-canvas surface, where you author and inspect agents.
- Agent
- Editor
Inside an agent canvas you can add Stages: gated phases that the agent moves through during a single run. Each stage decides which tools the agent may call, and the agent can only leave a stage once the gates you configure pass. Stages restrict one agent over time; the future "Workflow" pipeline (composing multiple agents end-to-end) is reserved but not yet implemented — don't conflate the two.
Sidebar tools:
- In-app browser
- iOS emulator sidebar (macOS only)
- Android emulator sidebar
- Solana workbench sidebar
Onboarding flow covers:
- Provider profile setup
- Project import
- 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 a pnpm workspace, and the root dev preflight also 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/,cloud/, 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 cloud install
pnpm --dir landing install
cd server && mix setuppnpm run dev # Preflight, Postgres logs, Phoenix server, Tauri desktop, landing site, and cloud app
pnpm run stop:all # Stop Xero dev servers and the local Postgres container
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:tui # Real Xero agent TUI terminal client + required relay/Cloud dev services
pnpm run dev:landing # Landing site on port 3001
pnpm run dev:cloud # Cloud app on port 3002dev uses concurrently to start:
pnpm run dev:db:logspnpm run dev:serverpnpm run dev:tauripnpm run dev:landingpnpm run dev:cloud
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 lintpnpm --dir cloud dev
pnpm --dir cloud build
pnpm --dir cloud check
pnpm --dir cloud testXero supports provider profiles for:
openai_codex(OAuth flow)openrouteranthropicdeepseekgithub_modelsxai(xAI / Grok; OAuth, device code, or API key)openai_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).
For xAI / Grok OAuth, Xero uses xAI's shared public OAuth client for local Grok agents; ordinary X Developer Portal OAuth client ids are for X API auth and are not accepted by auth.x.ai. End users should only need to sign in, use device code, or paste an API key.
OpenAI-compatible setup recipes cover LiteLLM, LM Studio, Mistral, Groq, Together AI, 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 and native xAI/Grok setup.
Xero supports session transcript search, Markdown/JSON export, context visualization, manual compact, opt-in auto-compact, branch, rewind, selective code undo, and session rollback workflows. Reviewed memory and project records live in the shared OS app-data project_store/Lance backend; dev:tui renders the review queue through a desktop-backed adapter rather than a copied terminal store. See docs/session-memory-and-context.md for shipped behavior, 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.
pnpm run dev:tui launches the real terminal-native Xero agent client (xero). It also ensures the local Phoenix relay and Cloud app are available for TUI cloud-session development, starting missing local services after preflight. It is for owned-agent development workflows: selecting an app-data project, selecting or creating sessions, sending prompts through the shared headless runtime, inspecting runtime events/tool calls, and reaching project/git/provider/context command surfaces without opening a Tauri window. The development command runs the desktop-backed xero binary so project records, memory review, and agent-definition authoring reuse existing desktop Rust services.
Terminal file actions are wrappers over the shared owned-agent Tool Registry V2 where available (xero file list|read|write|patch|delete|move|replace|tools), so policy, sandboxing, rollback metadata, and path protections stay aligned with real agent tool calls.
Inside dev:tui, the : command palette also exposes desktop-backed code-history recovery: code-history list|selective-undo|session-rollback and conversation rewind call the existing project_store rollback/session-lineage services. File-changing undo/rollback commands require explicit --apply.
Project process surfaces use the same app-data start_targets contract as the desktop project runner: xero process targets|add-target|remove-target|start|list|status|tail|stop. The dev:tui palette also exposes the shared desktop project-runner PTY registry with terminal open|list|read|write|resize|close, including a retained output buffer for terminal-native reads.
Provider and settings surfaces use the same app-data contracts as the desktop/backend paths: xero provider list|login|remove|doctor|preflight, xero mcp list|add|login|remove|status|serve, xero environment status|profile|user-tools|save-tool|remove-tool, xero skills list|enable|disable|remove|plugins, xero plugins list|enable|disable|remove, and xero settings agent-tooling|browser-control|soul. The dev:tui palette routes skill-sources list|upsert-local-root|remove-local-root|github|project|reload, plugin-sources list|upsert-root|remove-root|reload, and environment start|refresh|resolve-permissions|verify-tool|save-tool-verified|remove-tool-verified through the shared desktop settings/discovery/environment services.
Agent definitions are exposed through the shared app-data contract with xero agent-definition list|show|versions|diff|archive. Inside dev:tui, the : command palette also routes agent-definition draft|validate|preview|save|update|clone|attachable-skills --project-id ID --definition-file FILE through the shared autonomous definition service, including validation, effective runtime preview, write approval review, skill attachment catalog, and JSON-file Stage snapshots.
Terminal-compatible Solana workbench operations are exposed in dev:tui through the existing desktop Solana module: solana catalog|cluster-list|scenario-list|persona-roles|pda-scan|pda-derive|secrets-scan|doc-catalog|doc-snippets|wallet-scaffold-list|token-extension-matrix.
Maintenance usage totals are exposed with xero usage summary, reading the existing project agent_usage table.
Project-state maintenance is exposed with xero project-state list|backup|restore|repair and gated destructive cleanup through xero wipe project|all. These commands operate under OS app-data and require explicit confirmations for restore/wipe paths.
Fast development launch:
pnpm run dev:tuiReleased TUI install:
curl -fsSL https://xeroshell.com/install.sh | shWindows PowerShell:
irm https://xeroshell.com/install.ps1 | iexThe install scripts download from the Fly-hosted landing app at
/downloads/tui/latest/, verify the archive checksum, and install xero
locally. Set XERO_INSTALL_DIR to choose a different install directory.
Once installed, xero update check reports whether a newer TUI is available
and xero update install downloads, verifies, and applies it.
Headless launch verification:
pnpm run dev:tui -- --smoke
pnpm run dev:tui -- --smoke-runDirect Cargo form:
cd client/src-tauri
cargo run --package xero-desktop --bin xero
cargo run --package xero-desktop --bin xero -- --smoke
cargo run --package xero-cli --bin xero-core -- tui --smoke # CLI-core smokeThe desktop developer tool harness remains available separately through the tool-harness binary. It is a developer/debug harness for cataloging and replaying individual backend tools; it is not the product TUI and does not own the dev:tui script.
Direct Cargo form:
cd client/src-tauri
cargo run --bin tool-harness -- fixture
cargo run --bin tool-harness -- catalog
cargo run --bin tool-harness -- dry-run read --input-json '{"path":"README.md"}'
cargo run --bin tool-harness -- run read --input-json '{"path":"README.md"}'
cargo run --bin tool-harness -- sequence listUse --json on batch commands for scriptable output, and --app-data-dir PATH for isolated harness smoke tests. The terminal harness stores fixture and sequence state under OS app-data only; do not point it at repo-local .xero state.
The agent TUI parity matrix lives in docs/agent-tui-parity.md. Desktop-only browser viewport, emulator live panes, graphical canvas gestures, window chrome, and microphone dictation remain explicit exclusions; renderer-independent workflows are exposed through terminal-native panes or CLI commands.
Scoped verification for harness work:
cargo test --manifest-path client/src-tauri/Cargo.toml developer_tool_harness --lib --bins
pnpm --dir client vitest run components/xero/settings-dialog/development-section/tool-harness/index.test.tsxRun one Cargo command at a time so the shared build lock does not stall parallel agents.
Agent-system rollout uses explicit gates for custom-agent fidelity, context, handoff, storage, security, diagnostics, documentation, and deferred UI. See docs/agent-system-release-checklist.md for the release checklist and reset/fail-closed policy for unsupported custom-agent definitions.
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
- 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 and GitHub auth sessions.
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.