# blazy
[](https://github.com/Yash-K-Jagani/blazy/actions/workflows/ci.yml)
[](https://crates.io/crates/blazy)
[](https://github.com/Yash-K-Jagani/blazy/releases)
[](LICENSE)
[](#installation)
Install `ripgrep` on any machine without guessing whether to use `scoop`, `winget`, `apt`, or `brew`; run ephemeral tools once (`blazy run ruff -- --version`) or cache them (`--keep`); audit cross-manager duplicates and `PATH` conflicts; and let AI agents manage packages safely via `--json`, `--ndjson`, or `blazy mcp`.
> Built in a day, actively maintained — view the [commit history](https://github.com/Yash-K-Jagani/blazy/commits/main).

### Quick Terminal Demo
```text
$ blazy doctor
PROVIDER STATUS VERSION EXECUTABLE
scoop available v0.5.2 C:\Users\gamer\scoop\shims\scoop.cmd
winget available v1.29.380 ...\winget.exe
uv available uv 0.13.10 C:\Users\gamer\scoop\shims\uv.exe
cargo available cargo 1.100.1 ...\cargo.exe
$ blazy --json plan install rg
{ "ok": true, "data": { "provider": "scoop", "target": "ripgrep", "requires_elevation": false } }
$ blazy which cargo --fix
PATH resolution for 'cargo':
[active ] (scoop) C:\Users\gamer\scoop\persist\rustup-gnu\.cargo\bin\cargo.exe
[shadowed] (cargo) C:\Users\gamer\.cargo\bin\cargo.exe
```
---
## Key Workflows
### 1. Ephemeral & Cached Tools (`blazy run` / `blazy tool`)
Run CLI tools across `uvx`, `bunx`, `pnpm dlx`, `npx`, `deno`, and `go run` without polluting your global system—or cache your favorites with `--keep`:
```powershell
blazy run ruff -- --version # Run ephemerally via uvx
blazy run --keep ruff ruff -- --version
blazy tool ruff -- check . # Instant reuse from cache
```
### 2. One-Command Install, Outdated & Update Across 28 Managers
```powershell
blazy config prefer scoop winget npm bun uv cargo
blazy install rg # Resolves scoop:ripgrep / winget:BurntSushi.ripgrep.MSVC / apt:ripgrep
blazy scoop install ripgrep # Or target a specific manager directly (`blazy <manager> install <pkg>`)
blazy outdated # Unified update check across all managers
blazy update * # Update all eligible user-space managers together
```
### 3. Catch `PATH` Shadowing & Duplicate Installs
```powershell
blazy which cargo # Shows [active] vs [shadowed] binaries on PATH
blazy which cargo --fix # Prints a dry-run PATH reorder command
blazy audit # Flags cross-provider duplicates
blazy audit --fix # Shows exact uninstall commands (requires -y to apply)
```
### 4. AI-Safe Automation & MCP Server
```powershell
blazy --json doctor --check # Non-zero exit if environment has issues
blazy --json plan install rg # Deterministic dry-run ExecutionPlan
blazy --ndjson --yes install rg # Streaming line-by-line JSON progress
```
#### Coding Agent Setup (Claude Code, Codex, OpenCode, Cursor, Antigravity)
Any coding agent can install `blazy`, register its skill, and connect via MCP in seconds:
- **Claude Code:**
```sh
claude mcp add blazy -- blazy mcp
blazy skill --install claude
```
- **OpenAI Codex CLI:**
```sh
blazy skill --install codex
```
And add to `~/.codex/config.toml`:
```toml
[mcp_servers.blazy]
command = "blazy"
args = ["mcp"]
```
- **OpenCode / Cursor / Antigravity:**
```sh
blazy skill --install opencode ```
And configure `"command": "blazy", "args": ["mcp"]` in your MCP settings.
---
## Comparison
| Unifies 28 existing OS + language managers | **Yes** | Single ecosystem | Language runtimes | Own store |
| Cross-provider `which --fix` & `audit` | **Yes** | No | No | No |
| Ephemeral `run` + `--keep` alias | **Yes** | No | No | `nix run` |
| Native `--json`, `--ndjson`, & `mcp` server | **Yes** | Partial / No | Partial | Partial |
| Replaces underlying package managers | **No** | — | Partially | Yes |
**What `blazy` is not:** `blazy` does not replace `scoop`, `winget`, `apt`, `brew`, `uv`, or `cargo`, and it does not sandbox OS-level builds like `nix`. It is the unified routing, diagnostics, manifest, and AI-safety layer on top of the managers you already have.
---
## Installation
### Windows (PowerShell — installs to `%LOCALAPPDATA%\blazy\bin` & updates User `PATH`)
```powershell
### macOS & Linux
```sh
Verify release checksums via `SHA256SUMS.txt` on [GitHub Releases](https://github.com/Yash-K-Jagani/blazy/releases).
### Cargo
```powershell
cargo install blazy --locked
```
### Scoop / Winget / Homebrew
- **Scoop:**
```powershell
scoop bucket add blazy https://github.com/Yash-K-Jagani/scoop-blazy
scoop install blazy
```
- **Homebrew (macOS & Linux):**
```sh
brew tap Yash-K-Jagani/blazy https://github.com/Yash-K-Jagani/homebrew-blazy
brew install blazy
```
- **Winget manifest:** [YashKJagani.blazy.yaml](packaging/winget/YashKJagani.blazy.yaml) (ready for `wingetcreate submit`)
---
## Manifests, CI & Rollback
```powershell
blazy init # Create starter blazy.toml (tools = [...] + [packages])
blazy export --pin # Export installed packages with pinned versions
blazy sync --dry-run # Preview missing packages
blazy sync --locked # CI drift check (exits 1 if manifest & system drift)
blazy history # View local audit log
blazy undo # Roll back last add/remove
```
---
## Why It's Fast
- **Single-pass `PATH` index (`OnceLock`):** Scans `PATH` directories once per run instead of spawning `--version` subprocesses on every `plan`, `search`, or `install`.
- **Zero-network catalog resolution:** `blazy install rg` or `blazy plan install python` resolves canonical aliases instantaneously before falling back to network search.
- **Targeted `uninstall` / `update`:** Checks `PATH` ownership and catalog mappings first instead of running `list` across all 28 providers.
- **Parallel `sync` & `update *`:** Runs independent provider installs/updates concurrently across different managers.
---
## Documentation
- [docs/commands.md](docs/commands.md) — full command reference & `provider_priority` behavior
- [docs/mcp.md](docs/mcp.md) — MCP server tools and safety defaults
- [llms.txt](llms.txt) — concise index for AI coding agents
- [CHANGELOG.md](CHANGELOG.md)
- [SECURITY.md](SECURITY.md) — threat model, elevation guardrails, and MCP safety
- [CONTRIBUTING.md](CONTRIBUTING.md) — how to add a new `Provider` and tests