The AI coding agent you can undo.

alforria reads your repository, edits files and runs tools, asking first wherever your rules say to. In a Git repository every step is snapshotted, so a whole session can be put back.

curl -fsSL https://raw.githubusercontent.com/alforria-ai/alforria/main/packaging/install.sh | sh

One native Rust binaryMIT licensedv0.2.1Windows, binaries and source builds

Recorded session Fix the flaky retry test~/courier
The alforria web client after the recorded session: the agent found a timing-dependent retry test, edited it, ran cargo test with permission, and reported the fix.

Watch a scripted session run through alforria's real tools. When it asks to run the tests, you answer; when it is done, you can undo it.

How this was recorded

Recorded in a throwaway Git repository with a development build of alforria (commit 6ee2ad7, reporting 0.2.1). The binary ran the tools, the permission gate, the snapshot and the revert. A script supplied the model's replies, the title and the token counts, typed the prompt, pressed Enter on Allow once and called the revert API; idle pauses are trimmed. The terminal view replays the real TUI output; the web view shows screenshots of the embedded client.

You set the rules. It asks when they say to.

Every tool runs under a permission rule: allow, ask or deny, per tool and pattern. Out of the box almost everything is allowed. Anything you set to ask holds the session until someone answers, from the terminal UI, the web client or the API.

opencode.jsonproject config
{
  "permission": {
    "edit": "allow",
    "bash": "ask",
    "webfetch": "deny"
  }
}

The project in the recording sets only "bash": "ask". Out of the box, bash and edit are allowed.

  1. Allow once

    Runs this call. The next matching call asks again.

  2. Allow always

    Runs it and allows its pattern (for bash, the command prefix, like cargo test *) for this project until alforria restarts. Nothing is written to your config.

  3. Reject

    Refuses the call and any other pending request in the session. With a message, the model reads it as feedback and keeps going; without one, the turn stops.

Three identical tool calls in a row trip a doom-loop gate that asks before the agent goes round again.

Every step is snapshotted. Every session can be undone.

In a Git repository, alforria records the tree at each step in a snapshot store of its own. Revert restores the files a session changed and leaves your history alone.

The recorded session, step by step: each step's snapshot and the state of src/retry.rs
ChangeStepSnapshotsrc/retry.rs
read src/retry.rs62772eboriginal
grep "sleep" *.rs62772eboriginal
edit src/retry.rs62772eb → ee89b24+22 −12
bash cargo test allowed once, 2 passedee89b24+22 −12
Reply what changed and whyee89b24+22 −12
Revertee89b24 → 62772eboriginal
The recorded session above, with the snapshot IDs from the run.
  • Out of your history

    Snapshots live in a Git directory of their own, so your commits and branches stay exactly as they were.

  • Honors your ignores

    Snapshots follow .gitignore and info/exclude, and skip untracked files over 2 MiB.

  • Undo from anywhere

    Revert a session from the terminal UI, the web client or the HTTP API.

  • Yours to switch off

    Set snapshot: false and alforria stops recording them.

  • What it can't take back

    Revert restores the project files a session changed. What a command did elsewhere, like a push or a database write, stays done.

One session. Every client.

Run alforria serve, then attach the terminal UI, open the web client or script it over HTTP: they all watch the same session engine. In the recording, the permission request reached each of them at once.

Web clientlocalhost:4096
The alforria web client holding the session: the end of the retry.rs diff above a bash permission panel for cargo test, with allow once, always and deny.
Terminal UIalforria attach
The alforria terminal UI at the same moment: Permission required, shell command cargo test, with Allow once, Allow always and Reject.
Local serveralforria serve
$ curl -N -u alforria:$PASSWORD localhost:4096/global/event
# event payloads from the recording, trimmed
session.status        busy
message.part.updated  tool read src/retry.rs
file.edited           src/retry.rs
permission.asked      bash: cargo test
Terminal UI alforria
A keyboard-first ratatui interface with sessions, subagents, inline diffs, permission prompts, @ mentions for files and MCP resources, and 33 bundled themes.
Web client alforria web
Embedded in the binary and served by the local server: a multi-session queue, worktrees, review comments on diffs, and the same permission prompts.
Local server alforria serve
v1 and v2 HTTP APIs, an SSE event stream, PTY websockets and OpenAPI documents. serve generates a password unless you set one.

Install alforria.

One line installs the latest release and verifies its published checksum. Then connect a provider and start a session. No Node.js or other runtime.

Quickstart
  1. Install
    curl -fsSL https://raw.githubusercontent.com/alforria-ai/alforria/main/packaging/install.sh | sh
  2. Connect a provider
    alforria auth login
  3. List models
    alforria models
  4. Start a session
    alforria

Prefer the browser? Run alforria web. For one non-interactive task, alforria run "…".