Skip to content

The AI ran rg, git and npm: how to read the commands behind coding agents

Learn what rg, git diff, shell tools and build commands tell you about Claude Code and Codex — and why neither agent is tied to one search command.

The AI ran rg, git and npm: how to read the commands behind coding agents
In this article

In brief · TL;DR: rg searches text and file paths; git shows history and changes; npm, python and other commands run software; editing tools apply patches. Claude Code and Codex may use similar commands or dedicated tools — there is no universal command assigned to each brand. Understanding the categories makes agent actions easier to supervise.

Advertisement Precivo

01 — The discovery

What changed, who it is for and why it matters.

You ask an agent to fix a form. The screen fills with rg --files, git diff, npm test. Sometimes there is no visible shell command at all, only a file-search tool or a patch operation.

The useful skill is not typing faster than an agent. It is understanding what kind of work each action represents.

The ripgrep project provides the rg binary for fast recursive searching that respects ignore rules. OpenAI’s published Codex prompting guide also recommends rg and rg --files when available. So “Claude uses rg, but Codex uses a different search program” is not a dependable distinction.

What matters is the harness, available tools, operating system, project instructions and current task. One agent might run rg in a shell; another might use a specialised file-search tool. Both can search a project without requiring users to know the underlying implementation.

Read actions by category

Command or toolTypical purposeWhat to check
pwd, ls, find, rg --filesLocation and inventoryCorrect directory, ignored files
rg -n "text" ., grepContent searchRelevant files and line numbers
cat, sed, ReadReading contentContext and selected range
apply_patch, EditChanging codeResulting diff and scope
git status, git diffInspecting changesUnrequested changes
npm test, pytest, cargo testRunning testsTest availability and outcome
npm run build, hugoBuilding softwareActual success or failure
curl, wgetSending requests or downloadingURL, transmitted data, credentials

These are examples, not a guarantee that every command exists on every machine. npm test depends on a configured Node project. pytest needs a suitable Python environment. Read and Edit may be agent-specific tools rather than shell programs.

A subtle detail about rg

By default, ripgrep honours .gitignore and related rules, skips hidden files and avoids binary content. This makes searching cleaner. It also means an absent match does not necessarily mean an absent file. Check the working directory and ignore rules before declaring that a configuration does not exist. ripgrep guide.

Different tools, one evidence trail

Claude Code and Codex expose different capabilities and execution interfaces. An agent with a specialised read or edit tool may use it instead of composing a shell command. Open Codex harness architecture.

The goal is an evidence trail: locate a file, understand it, make a bounded change, then check the result. A long transcript of commands is not proof that a bug was fixed.

02 — The Solo verdict

Our straight take: is it worth your time?

Learn to recognise rg and git diff before memorising dozens of rarely used commands. Together they help answer where the agent found something and what it changed.

For risky operations such as deleting, overwriting, publishing or transmitting data, request a clear explanation before authorising execution.

Advertisement Flokin

03 — The workbench: inspect a project without edits

Requirements: a practice Git repository with ripgrep installed. Open a shell in the repository directory. These commands read information only:

pwd
rg --files
rg -n "TODO" .
git status --short
git diff --stat

Expected observations: the working folder, searchable file paths, TODO matches with line numbers, Git status and a summary of unstaged changes. No matches or no changes can produce empty output. Ripgrep returns exit status 1 for no matches; that need not signal a broken installation.

Ask an agent: “Show the files you searched and justify the search. Distinguish read-only commands from proposed edits. Make no changes.” Compare the explanation with real file paths.

Next: configure a code editor in which you can inspect this work.

References: ripgrep, search guide, Git, Codex prompting. Guided, read-only exercise.

More in Tutorials

See all

Advertise

Solopreneurs, makers and creators who use AI and automation every day. Editorial and media formats for brands that bring real value to this reader.

Talk to us about formats

Every partnership goes through editorial approval. No misleading promises.

  1. Sponsored articles Useful content, in the Caminho Solo tone and standard.
  2. Banners and display Placements in strategic areas of the site.
  3. Commercial partnerships Series sponsorships, affiliate partnerships, and custom campaigns.
  4. Native content Guides, tutorials or comparisons featuring your product.

Get in touch

Let's talk

Have questions, suggestions, or want to collaborate? Fill out the form below and we'll get back to you soon.

Prefer email?

contato@caminhosolo.com.br

We respect your privacy. Your data will only be used to respond to your message.