Getting started
Install Xi, run it in a project, and open the same chat in your browser.
What you need
- Bun 1.3 or newer. Xi runs on Bun, not Node. Install it from bun.sh.
- A provider. Use your favorite AI provider with Xi, by subscription or API. See Providers.
Install
bun install -g xi-agentThe package installs one command, xi. Verify it works via:
xi helpTo run from a checkout instead, see From source below.
First run
Go to a project and start Xi:
cd ~/code/my-app
xiThis gives you standalone Xi: a full-screen chat in your terminal, running on its own and not connected to any server. Tell it what you want done and it reads the project, calls tools (reading files, editing, running commands) and asks for your approval when a call needs it.
The browser
To use Xi in the browser only:
xi startThis starts a server in the background and opens http://localhost:1414, already signed in. It keeps running after you close the terminal.
Xi can also run as a server with a terminal client attached, and then the terminal and the browser share the same chats:
xi serverThis opens the terminal client as before and also serves the web client at http://localhost:1414. Open it on the same machine and you see the chat you just started, still streaming. Reply from either side; the other follows.
To use it from your phone or another computer, the server has to be reachable on your network, and the new device has to pair once. Both are covered in The web client and Server mode.
AGENTS.md auto loading
If the project has an AGENTS.md (or CLAUDE.md) file, Xi reads it into the system prompt at the start of every chat. That is where you tell the agent how the project is built and tested, what to avoid, and where things are. Files in parent directories load too, so a ~/code/AGENTS.md applies to every project below it. Other AGENTS.md files inside the repository are listed for the agent to read when it works near them. See Project instructions.
Where things live
| Path | What it is |
|---|---|
~/.config/xi/config.edn | Your configuration. Optional; see Configuration. |
~/.config/xi/rules.edn | Your permission rules. Optional; see Permissions and rules. |
~/.config/xi/extensions/ | Your extensions. See Extensions. |
~/.config/xi/sessions/ | Chat metadata. The transcripts themselves are kept by the Claude CLI under ~/.claude/projects/. |
The agent can never write to config.edn or rules.edn: every tool refuses to touch ~/.config/xi. What you put there is yours.
From source
git clone https://github.com/floscr/xi
cd xi
npm install
bb providers:fetch # the bundled model providers, at the pinned commit
bb build # the terminal client and server
bb web:build # the web client
bin/xiYou need Babashka for the bb tasks. bb tasks lists the rest.
Next
How Xi works explains the few ideas the rest of the guide builds on. If you would rather start doing things, go straight to Projects or Extensions.