Skip to main content

Infinity Code

Infinity Code is an AI coding agent that runs locally on your machine. It reads your codebase, makes changes in isolated sandboxes, spawns parallel threads for complex tasks, and can run in the background while you do other work. Your working directory is never touched — you review and merge changes when you're ready.

  1. You ask — describe what you want in natural language.
  2. The agent works — it reads files, runs commands, and edits code in a sandboxed copy of your repo (a jj workspace, git worktree).
  3. You review — inspect the diff on the sandbox branch/bookmark and squash it in when you're happy.

The agent never modifies your working copy directly. Every change lives on a sandbox-{thread_id} branch that you control.

Quickstart

First install the prerequisites:

  • Rust (for building from source)
  • Ripgrepbrew install ripgrep
  • Jujutsu (optional, recommended) — brew install jj

Then install:


# Install the CLI (includes the desktop web UI; remove --features bundled-web if you don't have npm)
cargo install infinity-agent-cli --git https://github.com/hydro-project/infinity --features bundled-web

# Install a model provider — Bedrock invokes models with your AWS credentials
infinity provider install bedrock --git https://github.com/hydro-project/infinity --crate infinity-provider-bedrock

infinity rap install --user --git https://github.com/hydro-project/infinity --crate sandbox-local

Model providers run as separate processes managed by the daemon and are registered in ~/.infinity/providers.json; at least one must be installed. The Bedrock provider uses your ambient AWS configuration (e.g. AWS_PROFILE or environment credentials).

To update later:

infinity update

This updates the CLI binary, installed model providers, and any installed RAP servers.

First run

cd into any repository and start the agent:

cd ~/my-project
infinity

The sandbox auto-detects your repo type:

  • Jujutsu (.jj directory present) — creates isolated jj workspaces
  • Git (plain git repo) — creates git worktrees

Type a message and press Enter. The agent will read your code, make changes in a sandboxed workspace, and report back. Your working directory is never modified — changes appear on branches or bookmarks you can inspect and merge.

Desktop UI

There are two ways to run the desktop interface:

Bundled — if you installed with --features bundled-web, the daemon already serves the UI. Open http://localhost:8080 (or your INFINITY_WS_PORT) in a browser.

Standalone — run the Vite dev server separately:

cd infinity-web
npm ci
npm run dev

Then open the URL printed in your terminal (typically http://localhost:5173).

Both modes connect to the same daemon as the CLI, so you can use all three interchangeably.

Key Features

  • Sandboxed editing — changes happen in isolated workspaces. Supports Jujutsu (recommended) and Git.
  • Pluggable models — models come from model provider processes; install, mix, and switch between providers.
  • Parallel threads — the agent spawns child threads for independent sub-tasks. Each thread gets its own sandbox and reports back when done.
  • Background sessions — detach from a busy agent and reconnect later. Multiple sessions can run concurrently via the daemon.
  • Remote sessions — connect to agents running on other machines over SSH. See Configuring Remotes.
  • Extensible tools — add MCP servers and RAP servers to give the agent new capabilities.
  • Session persistence — conversation history is saved to disk. Quit, reboot, come back — your context is intact.

Terminal UI

The TUI runs anywhere you have a terminal. Start it with infinity in any repo.

CommandShortcutDescription
/helpCtrl+HShow help
/quitCtrl+CExit
/newCtrl+NStart a new session
/loadCtrl+LLoad an existing session
/modelCtrl+MSwitch model
/compactCtrl+KTrigger context compaction

Ghostty provides the best experience with the TUI.

Next steps