Skip to main content

CLI Tools

Since 1.7.5, hatch3r ships a first-class CLI-tools surface area as the token-efficient default for agentic coding. MCP is demoted to opt-in.

Why the pivot

External research and runtime measurement converged on the same conclusion: piping output through CLI binaries is consistently more token-efficient than tool-calling an MCP server for the same operation. Three primary signals drove the pivot:

  • Anthropic engineering — Code execution with MCP (Nov 4 2025): code that orchestrates CLI binaries beats one-shot MCP tool calls when the operation can be expressed as a pipeline.
  • GitHub Blog — Improving token efficiency in agentic workflows (May 7 2026): agent runs that prefer CLI tooling over MCP shave 30-60% off token consumption on file-walk / search / format / diff workloads.
  • Cloudflare — Code Mode (Feb 20 2026) + ThoughtWorks Tech Radar Vol 34 (Apr 2026): industry consensus is pushing agents toward subprocess-tool composition over network-tool federation.

hatch3r still supports MCP — the pivot is about defaults, not deprecation. npx hatch3r init gates MCP behind a Yes/No prompt; npx hatch3r mcp setup reopens it on demand.

The 29-tool catalog

Three tiers. Tier-1 is default-on for every project. Tier-2 is pre-checked per detected project signals. Tier-3 is opt-in advanced.

Tier 1 — default-on (10 tools)

ToolProbeDescription
ripgreprgFast recursive grep with sane defaults and gitignore awareness
fdfdUser-friendly find replacement, gitignore-aware
jqjqJSON processor and query language
yqyqYAML processor (mikefarah Go implementation)
ghghGitHub CLI — repos, issues, PRs, releases, gists
deltadeltaSyntax-highlighting git diff pager
batbatcat clone with syntax highlighting and git integration
sdsdIntuitive sed replacement with literal string patterns
ast-grepsgStructural search and rewrite for code via AST patterns
zstdzstdFast lossless compression with high ratio

Tier 2 — conditional (11 tools)

Pre-checked when the matching trigger holds.

ToolProbeTriggerDescription
Playwrightplaywrightweb-projectBrowser automation, web testing, and UI interaction
duckdbduckdbdata-projectEmbedded analytical database with first-class CSV/Parquet
qsvqsvdata-projectFast CSV toolkit (slice, search, join, stats, 80+ commands) — actively-maintained xsv successor
taplotaplorust-project / python-projectTOML toolkit (format, lint, query)
glabglabgitlab-remoteGitLab CLI — merge requests, issues, pipelines
az-devopsazazure-remoteAzure DevOps work items, repos, pipelines via az CLI extension
Dockerdockerdocker-detectedContainer runtime and CLI
llmllmci-llm-projectsimonw/llm — invoke LLMs from the command line
fzffzfinteractive-ttyInteractive fuzzy finder for TTY pickers
lazygitlazygitinteractive-ttyTerminal UI for git with keyboard-driven workflows
difftasticdifftinteractive-ttyStructural diff that understands syntax

Tier 3 — opt-in advanced (8 tools)

Never pre-checked. Opt in informed.

ToolProbeDescription
RTKrtkCLI output-compression proxy — ⚠ see pipe-output corruption caveat in the canonical hatch3r-cli-rtk skill
StagehandstagehandBrowserbase Stagehand — AI-driven browser automation
aichataichatMulti-provider LLM chat CLI with RAG and session memory
modsmodsCharm mods — Unix-friendly LLM pipeline tool
CombycombyStructural search and replace across languages with declarative patterns
millermlrawk/sed/cut/join for CSV/TSV/JSON/Parquet streams
csvkitcsvlookPython CSV toolkit (csvlook, csvsql, csvjoin, csvstat)
PodmanpodmanDaemonless container engine, rootless by default (Docker alternative)

Install commands per OS

The installer prints copy-paste commands grouped by package manager. It never executes on your behalf. Examples for the tier-1 default-on tools:

ToolmacOSLinuxWindows
ripgrepbrew install ripgrepsudo apt install ripgrepscoop install ripgrep
fdbrew install fdsudo apt install fd-findscoop install fd
jqbrew install jqsudo apt install jqscoop install jq
yqbrew install yqsudo snap install yqscoop install yq
ghbrew install ghsudo apt install ghwinget install GitHub.cli
deltabrew install git-deltasudo apt install git-deltascoop install delta
batbrew install batsudo apt install batwinget install sharkdp.bat
sdbrew install sdcargo install sdscoop install sd
ast-grepbrew install ast-grepcargo install ast-grepscoop install ast-grep
zstdbrew install zstdsudo apt install zstdwinget install Facebook.Zstandard

Run npx hatch3r cli-tools install to print install commands for everything currently selected but not detected on PATH.

Decision tree — which tool for which job?

The hatch3r-cli-overview skill that ships in every project includes the full decision tree. Summary:

  • Text searchrg (fast literal/regex grep). For structural patterns (AST-aware) use ast-grep instead. For cross-language declarative rewrites, escalate to comby.
  • Find filesfd (sane defaults, gitignore-aware).
  • JSON queriesjq. For tabular CSV/TSV pipelines, prefer qsv or miller.
  • YAML / TOMLyq for YAML, taplo for TOML.
  • View a filebat (syntax-highlighted cat). For diff display use delta.
  • Edit-in-placesd for literal-string substitution. For structural rewrites use ast-grep or comby.
  • GitHub / GitLab / Azure DevOps APIsgh / glab / az (with the azure-devops extension).
  • Compression / archivezstd.
  • Browser automationplaywright (deterministic) or stagehand (AI-driven).
  • Data analytics on CSV/Parquetduckdb.
  • LLM in a pipelinellm (simple), mods (Unix-friendly streaming), aichat (RAG + session memory).
  • Containersdocker (default) or podman (rootless / daemonless).

The full umbrella skill (skills/hatch3r-cli-overview/SKILL.md) ships into every project and surfaces this decision tree directly to your agent at runtime.

Choosing between CLI tools and MCP

DimensionCLI toolsMCP servers
Token cost per callLow — output goes back as text via subprocess stdoutHigher — each tool description + each call carries protocol overhead
LatencyLocal subprocess (ms)Stdio / HTTP roundtrip (+startup if not warm)
ComposabilityNative shell pipelines (pipe, redirect, substitution)One operation per tool call; chaining requires repeated tool-calling
Discoverabilitycommand -v probe + skill recipesTool list announced by server at connect time
ProvenancePer-tool install command from registry (vendor-verified)Server package + version pin
Secret handlingEnv vars set in shell (.env.mcp source pattern reusable)Server config injects env vars per call
Best forFile walks, grep, JSON/YAML/CSV processing, GitHub/GitLab API surfaces, diff/format/lint, container ops, structural rewritesAuthenticated remote services without a stable CLI (Linear, Sentry, Context7), tool surfaces tied to a vendor protocol

The pivot makes CLI tools the default, not the only option. npx hatch3r mcp setup reopens the MCP picker; both surfaces coexist.

Manage CLI tools

npx hatch3r cli-tools # open picker (default action)
npx hatch3r cli-tools list # selection + install status
npx hatch3r cli-tools install # print install commands for missing tools
npx hatch3r cli-tools detect # read-only detection report

Selection is recorded in hatch.json under cliTools.selected and survives npx hatch3r clean → npx hatch3r init via PreservedManifestFields. The umbrella hatch3r-cli-overview skill plus the per-tool skills are emitted to the 13 skill-capable adapters during sync.

Upgrading from 1.7.1 or earlier

The CLI tooling pivot lands in 1.7.5. Two upgrade considerations:

  • --yes non-interactive MCP default flipped: npx hatch3r init --yes no longer auto-configures MCP. CI scripts must pass --mcp to opt back in.
  • Opt-in flow on existing projects: Run npx hatch3r cli-tools to open the picker. Tier-1 plus matching tier-2 are pre-checked; detection runs against PATH and the installer offers per-OS commands.

See the Workflow guide for the full lifecycle context.