Installation - Patchloom

Installation

From Homebrew (macOS and Linux)

brew install patchloom/tap/patchloom

This installs patchloom with all commands, including the MCP server.

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:

patchloom = { default-features = false, features = ["ast"] }

See the crate documentation for the full API surface and the introduction for a quick overview.

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