drift CLI
A terminal UI that shows everything differing from the base branch as a pull request and sends selected code to an AI agent.
- 52 ★ on the repository
- Last commit
Extended access
Why this level
- The `gh` and `glab` commands give the program access to your PRs and MRs, including replies and comment deletion.
- Selected code is sent to an agent pane, and that agent may change files.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/tothalex-driftDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The `gh` and `glab` commands give the program access to your PRs and MRs, including replies and comment deletion.
- Selected code is sent to an agent pane, and that agent may change files.
This is third-party code. Review the repository files before installing.
What it does
`drift` compares the working tree against `git merge-base <base> HEAD`, so committed work, uncommitted edits and untracked files show up in one view. Changes appear inside the enclosing code block (function, class) resolved with tree-sitter. Files can be checked off as reviewed, and if an agent later edits such a file the check drops. The `s` key sends a line or a selection to an agent in a sibling pane: the instruction, a path with line numbers and the code land in the input. It works through herdr, tmux or cmux. The same interface opens GitHub PRs and GitLab MRs through `gh` and `glab`: reading discussions, replying and commenting on lines.
Who it is for. Developers who review an AI agent edits before committing and want to ask about lines without leaving the terminal.
Good fit when
- An agent finished work on a branch and you need every difference from `main` in one list, like a PR.
- You selected a disputed function and asked the agent through `s` to explain or rewrite it.
- Several agents work in separate worktrees and the review board `b` shows what each holds.
- You need to read and answer comments on an open PR from the terminal: `drift --pr 123`.
- Checked files must reset when an agent changes them again.
Not a fit when
- You need a graphical interface or an editor-integrated diff.
- You need stable behavior on Windows: support is marked experimental.
- You must run agent code or tests: `drift` only shows changes.
Example request
Open `drift` in the repository, find the function the agent changed on this branch and send it to the agent pane with the question of why it was rewritten.Limitations
PR features need the official CLIs, `gh` for GitHub or `glab` for GitLab, with `auth login` done. Sending code to an agent goes through herdr, tmux or cmux, and without them there is no agent pane to find. Windows support is experimental. On musl distributions (Alpine) install with cargo, since prebuilt binaries need glibc 2.17 or newer. The program checks for a new release once a day; turn it off with `check = false` under `[update]`.
How to disable. Delete the `drift` binary from `~/.local/bin` (or run `cargo uninstall drift-tui`). Remove the config and language plugins by hand from the settings directory.
FAQ
How do I install drift?
With `curl -fsSL https://tothalex.github.io/drift/install.sh | sh` on macOS and Linux, or `cargo install drift-tui`. Binaries land in `~/.local/bin`.
Which branch does it compare against?
The base branch is auto-detected: `origin/HEAD`, then `main`, then `master`. Pick another with `--base dev`.
How do I send code to an agent?
Press `s` on a line or selection, type an instruction and hit `Enter`. A sibling agent pane in herdr, tmux or cmux is required.
What does the review board show?
The `b` key lists every worktree and branch of the repo, what each holds, how long ago it moved and which agent works in it. Live agent status needs herdr.
Can I review a pull request?
Yes, `drift --pr 123` opens a PR right away. It needs `gh` or `glab` with `auth login` done; checking a file with `x` ticks it as viewed on GitHub.
Discussion
No questions or reviews yet.
Related
CLI toolsA herdr plugin: the agent's code diff in a terminal pane beside the chat, line comments and notes sent back to Claude Code, Codex or OpenCode
A CLI that opens a git diff in the browser for keyboard review and hands comments to an agent as a prompt or to GitHub.
A CLI that opens a local git diff in the browser like GitHub's Files changed tab; comments copy out as prompts for an agent
A terminal diff viewer: all files in one stream, and an agent with the hunk-review skill walks through the changes and leaves line comments
A CLI turns Git changes into a guided code walkthrough with questions and explanations written by your existing agent
A CLI opens diffs and documents in a terminal so a person can annotate lines and pass feedback to a coding agent
Comparison with similar tools
Cards that share the main search query, and how they differ.
README in short
The app gathers branch changes in one view with code blocks and PR browsing. A question about code goes to an agent in a neighboring terminal pane.