Installation
From Homebrew (macOS and Linux)
brew install patchloom/tap/patchloom
This installs patchloom with all commands, including the MCP server.
From npm / npx
# One-shot (downloads the platform binary on first run)
npx patchloom --version
# Global install
npm install -g patchloom
The unscoped package is on npmjs.com/package/patchloom. It is generated by cargo-dist and downloads the matching prebuilt binary from GitHub Releases (not a Node rewrite of the CLI). Release CI publishes each new version via npm Trusted Publishing (OIDC from GitHub Actions; no long-lived write token required).
From Scoop (Windows)
scoop bucket add patchloom https://github.com/patchloom/scoop-bucket
scoop install patchloom/patchloom
Each GitHub Release updates bucket/patchloom.json in
patchloom/scoop-bucket with the
new version and SHA256 hashes (same idea as the Homebrew tap). Then:
scoop update
scoop update patchloom
From Chocolatey (Windows)
choco install patchloom
The package downloads the portable Windows zip from GitHub Releases and
shims patchloom.exe. Each product release packs and pushes a new nupkg
when CHOCOLATEY_API_KEY is configured. The first listing is subject
to community.chocolatey.org
moderation. Version 0.13.0 is approved on the public feed; newer pushes
may lag until moderators clear them. If choco install reports the package
is not found yet (or only an older version installs),
use Scoop or the GitHub Release
zip meanwhile.
From crates.io
cargo install patchloom
From GitHub Releases
Pre-built binaries for Linux (x64, ARM64, musl), macOS (x64, ARM64), and
Windows (x64, ARM64) are available on the
Releases page.
Download the archive for your platform, extract, and place patchloom on
your PATH.
Shell and PowerShell installer scripts are also available:
# Unix (Linux/macOS)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/patchloom/patchloom/releases/latest/download/patchloom-installer.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://github.com/patchloom/patchloom/releases/latest/download/patchloom-installer.ps1 | iex"
Pre-built binaries include all commands, including the MCP server.
From source
Install from source (requires Rust 1.95+):
git clone https://github.com/patchloom/patchloom.git
cd patchloom
cargo install --path .
This builds with all features by default (CLI + MCP server + AST operations). To build a smaller binary without optional features (CLI is always included for the binary):
# CLI + AST only (no MCP server, no tokio/async)
cargo install --path . --no-default-features --features "cli,ast"
# CLI + MCP only (no AST grammars)
cargo install --path . --no-default-features --features "cli,mcp"
# CLI only (no MCP, no AST)
cargo install --path . --no-default-features --features cli
If you're contributing from a source checkout, use make check-fast
while iterating and make check before committing.
As a Rust library
Add patchloom as a dependency to embed structured file editing in your own Rust tools. Disable default features to omit CLI (clap), MCP server, and AST:
[dependencies]
patchloom = { default-features = false }
To add AST support without CLI/MCP (LLM agent embedders typically use
ast + files for plan execution and AST file mutators):
patchloom = { default-features = false, features = ["ast", "files"] }
See the crate documentation for the full API
surface (require_change, command_position, ast_rename_batch,
find_files_with_symbol, classify_error, restore_path_from_session,
run_post_write_validation, match_mode) and the
introduction for a quick overview.
Embedder tables live under Library API
in the reference.
Shell completions
After installing, generate shell completions:
# bash (system-wide; may require sudo and /etc/bash_completion.d in your setup)
patchloom completions bash > /etc/bash_completion.d/patchloom
# zsh (ensure ~/.zfunc is in $fpath, e.g. via oh-my-zsh custom or compinit)
patchloom completions zsh > ~/.zfunc/_patchloom
# fish
patchloom completions fish > ~/.config/fish/completions/patchloom.fish
# elvish
patchloom completions elvish > ~/.config/elvish/rc.elv
# PowerShell
patchloom completions powershell >> $PROFILE
Verify
patchloom --version
patchloom --help