{"slug": "better-than-stock-cli-tools-for-ai-coding-agents-on-macos", "title": "Better-Than-Stock CLI Tools for AI Coding Agents on macOS", "summary": "A developer argues that macOS's built-in CLI tools like grep, find, and cat are suboptimal for AI coding agents, recommending modern replacements such as ripgrep, fd, and jq for better context economy, fewer round trips, and structured output. ripgrep is noted as the only tool with vendor backing, bundled by Claude Code and Codex CLI, while others are unofficial but preferred by models when available. The developer provides a table of recommended tools and their installation via Homebrew.", "body_md": "macOS ships `grep`\n\n, `find`\n\n, and `cat`\n\n— decades-old, POSIX-correct, and worse choices than the modern replacements once an LLM is the one calling them. Three reasons that's true, not just aesthetic preference:\n\n**Context economy.** ripgrep and fd skip`.git`\n\n,`node_modules`\n\n, and build output by default and print compact`file:line:match`\n\nresults.`grep -r`\n\n/`find`\n\nwithout carefully hand-tuned exclusions dump everything, and every irrelevant line an agent reads is context it paid for and now has to reason past.**Fewer wasted round trips.** Models are trained on a decade of GitHub, Stack Overflow, and blog content where these newer tools are increasingly the default. They emit correct`rg`\n\n/`fd`\n\n/`jq`\n\nflags on the first try more reliably than the equivalent`find -exec grep`\n\nor`awk`\n\nincantation — a failed command is a full extra turn burned on repair, not just a lost second.**Structured output.**`jq`\n\n/`yq`\n\nhand back parseable slices of JSON/YAML instead of a blob the model has to re-derive values from by eye, which is slower and more error-prone than it looks.\n\nNone of this requires the model to have been fine-tuned on any specific tool. It only requires the tool to be on `$PATH`\n\n— every harness below either bundles ripgrep itself or falls back to whatever it finds, and all of them will reach for a better tool over a worse one if you give them the choice.\n\n**ripgrep is the one tool with actual vendor backing**— Claude Code and Codex CLI bundle it and are documented to prefer it over`grep`\n\n; everything else below is*unofficial*: no vendor documents it, but it's what a model reaches for when it's on`$PATH`\n\n.- Install the replacements once, globally, and stop thinking about it — see\n[copy-paste](https://gist.github.com/starred.atom#copy-paste). - Node.js 22+ is the real gatekeeper for actually running these harnesses (separate from the tools they call) — Claude Code, Codex CLI, and Qwen Code all need it.\n- For open-weight models, DeepSeek and GLM/Zhipu don't have a verified first-party terminal agent as of this research pass — see\n[below](https://gist.github.com/starred.atom#the-open-weight-column-is-thinner-than-it-looks).\n\n| Tool | Replaces | Status | Why it's worth it for an agent loop | Install |\n|---|---|---|---|---|\n`rg` ) |\n\n`grep`\n\n**Confirmed**— Claude Code's`Grep`\n\ntool is *built on*ripgrep (its own syntax, not POSIX regex) and bundles a binary per-platform; Codex CLI bundles/depends on it too and has a documented crash history (`spawn rg ENOENT`\n\n) without it. Qwen Code's Homebrew formula pulls it in as a dependency.`.gitignore`\n\n-aware, compact match output — the single biggest context-economy win on this list`brew install ripgrep`\n\n[fd](https://github.com/sharkdp/fd)`find`\n\n`.gitignore`\n\n-aware, compact-output logic as ripgrep, and it's what a model defaults to over `find -exec`\n\nchains when it's present`find`\n\n+`grep`\n\n+`xargs`\n\noften needs for the same result`brew install fd`\n\n[jq](https://jqlang.github.io/jq/)`gh api`\n\n/HTTP responses into a structured slice instead of a blob the model re-derives values from by eye`brew install jq`\n\n[tree](https://formulae.brew.sh/formula/tree)`find`\n\n/ `ls -R`\n\n`$PATH`\n\n`ls`\n\n/`find`\n\n`brew install tree`\n\n[bat](https://github.com/sharkdp/bat)`cat`\n\n*you*review what the agent touched, not the agent itself`brew install bat`\n\n[fzf](https://github.com/junegunn/fzf)`brew install fzf`\n\n[git](https://git-scm.com)`brew install git`\n\n[gh](https://cli.github.com)`brew install gh`\n\nLanguage toolchains follow the same logic once you're inside a specific stack — `uv`\n\n/`ruff`\n\nfor Python, whatever your repo needs. No vendor documents shelling out to a specific linter; they call whatever's on `$PATH`\n\nif you tell them to.\n\n| Assistant | Vendor | Runtime prereq | Install (Homebrew) | Alternative install |\n|---|---|---|---|---|\nClaude Code |\nAnthropic | Node.js (native installer avoids needing it yourself) | `brew install --cask claude-code` (stable) / `claude-code@latest` |\nNative installer (curl script) |\nCodex CLI |\nOpenAI | None strictly required — standalone binary | `brew install --cask codex` |\n`npm install -g @openai/codex` or `curl -fsSL https://chatgpt.com/codex/install.sh | sh` |\nQwen Code |\nAlibaba | Node.js ≥ 22 (npm path only) | `brew install qwen-code` (homebrew/core, prebuilt bottle, pulls in Node + ripgrep) |\n`npm install -g @qwen-code/qwen-code@latest` or standalone install script |\nMiMo Code |\nXiaomi | Inherits\n|\n\n`curl -fsSL https://mimo-code.xiaomi.com/install.sh | sh`\n\nCodex CLI additionally sandboxes its shell tool (Seatbelt on macOS) and disables outbound network by default — worth knowing before debugging why `curl`\n\n\"hangs\" inside it.\n\nSources: [Claude Code setup docs](https://code.claude.com/docs/en/setup), [OpenAI Codex CLI repo](https://github.com/openai/codex), [Qwen Code repo](https://github.com/QwenLM/qwen-code), [Qwen Code docs](https://qwenlm.github.io/qwen-code-docs/en/users/overview/), [XiaomiMiMo/MiMo-Code](https://github.com/XiaomiMiMo/MiMo-Code).\n\n**Qwen Code** (Alibaba) is the strongest entry here — a proper terminal agent with its own repo, docs, MCP/LSP/Plan Mode support, and a real Homebrew formula. Requires Node ≥ 22 for the npm path (Ink 7 + React 19 need it); the standalone script and brew formula sidestep that.\n\n**MiMo Code** (Xiaomi) is honest about not reinventing the wheel: its own README states it's \"built as a fork of OpenCode,\" adding persistent memory, subagent orchestration, and autonomous goal-driven loops on top of OpenCode's existing provider/TUI/LSP/MCP/plugin architecture. If you already run OpenCode, MiMo Code is closer to a feature branch than a new tool.\n\n**DeepSeek and GLM/Zhipu**: no verified official first-party terminal coding agent turned up for either in this research pass — that's a real gap in what's documented publicly, not a claim that one doesn't exist. In practice, both model families are typically driven through third-party or generic harnesses (OpenCode, Aider, Crush, Cline/Roo) rather than a vendor-branded CLI. One thing worth flagging with an explicit confidence caveat: as of my last verified (pre-mid-2026) knowledge, Zhipu marketed GLM models as Anthropic-API-compatible specifically so you could point **Claude Code itself** at a GLM endpoint via `ANTHROPIC_BASE_URL`\n\n— if that's still true, the \"tool to install\" for GLM is just Claude Code again. I did not reconfirm this in the current research pass, so treat it as a lead to verify, not a fact to build on.\n\n```\n# Core, vendor-relevant\nbrew install ripgrep git gh\n\n# Power-user layer (optional, but pays for itself)\nbrew install fd jq fzf bat tree\n\n# Pick your assistant(s)\nbrew install --cask claude-code   # Anthropic\nbrew install --cask codex         # OpenAI\nbrew install qwen-code            # Alibaba (open-weight)\ncurl -fsSL https://mimo-code.xiaomi.com/install.sh | sh   # Xiaomi (open-weight)\n```\n\n- Findings for\n**Claude Code** and**Codex CLI** are backed by official docs, official repos, and live GitHub issues — highest confidence in this file. **Qwen Code** is backed by its own repo and docs — high confidence.**MiMo Code**'s fork relationship is confirmed by its own README; its exact tool-shelling conventions (does it bundle`rg`\n\nthe way Claude Code/Codex do, or just call system`rg`\n\n?) were not independently verified.**DeepSeek** and**GLM/Zhipu** produced no verifiable claims about an official coding CLI — an evidence gap, not a negative finding.- Several specific \"here's the exact required tool list\" claims from blog sources were checked and\n**refuted**— that framing doesn't hold up against what vendors actually document, which is why everything but ripgrep above is labeled unofficial rather than required. - This snapshot is dated\n**2026-07-10**, after this assistant's own January 2026 training cutoff — everything above came from live verification this session, not memorized knowledge. Re-check before relying on it months out; this space moves fast.\n\n[Claude Code — Advanced setup](https://code.claude.com/docs/en/setup)[Claude Code — Tools reference](https://code.claude.com/docs/en/tools-reference)[Claude Code — Permissions](https://code.claude.com/docs/en/permissions)[anthropics/claude-code — GitHub issue #6415](https://github.com/anthropics/claude-code/issues/6415)[openai/codex — GitHub repo](https://github.com/openai/codex)[openai/codex — AGENTS.md](https://github.com/openai/codex/blob/main/AGENTS.md)[OpenAI Codex CLI docs](https://developers.openai.com/codex/cli)[openai/codex — issue #10390 (sandbox network)](https://github.com/openai/codex/issues/10390)[OpenAI — Agent approvals & security](https://learn.chatgpt.com/docs/agent-approvals-security)[QwenLM/qwen-code — GitHub repo](https://github.com/QwenLM/qwen-code)[Qwen Code docs — Overview](https://qwenlm.github.io/qwen-code-docs/en/users/overview/)[XiaomiMiMo/MiMo-Code — GitHub repo](https://github.com/XiaomiMiMo/MiMo-Code)[ripgrep vs grep — benchmarks and why AI agents use rg](https://dev.to/rahulxsingh/ripgrep-vs-grep-performance-benchmarks-and-why-ai-agents-use-rg-1716)", "url": "https://wpnews.pro/news/better-than-stock-cli-tools-for-ai-coding-agents-on-macos", "canonical_source": "https://gist.github.com/kibotu/4788d83f00f0a3991f51a043492fa8dd", "published_at": "2026-07-10 15:18:03+00:00", "updated_at": "2026-07-20 15:34:47.917677+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models", "ai-agents"], "entities": ["Claude Code", "Codex CLI", "Qwen Code", "Anthropic", "ripgrep", "fd", "jq", "Homebrew"], "alternates": {"html": "https://wpnews.pro/news/better-than-stock-cli-tools-for-ai-coding-agents-on-macos", "markdown": "https://wpnews.pro/news/better-than-stock-cli-tools-for-ai-coding-agents-on-macos.md", "text": "https://wpnews.pro/news/better-than-stock-cli-tools-for-ai-coding-agents-on-macos.txt", "jsonld": "https://wpnews.pro/news/better-than-stock-cli-tools-for-ai-coding-agents-on-macos.jsonld"}}