Extensions
CLI
Command-line tools the agent drives via Bash, and the CLI vs MCP axis. Concept and a generic example.
A large part of Claude Code's capability comes from command-line tools it already knows how to use. Through the Bash tool, the agent runs the same commands you'd type in the terminal — gh for GitHub, git, npm, the Playwright CLI — and reads the output to decide the next step. There's nothing to install on Claude's side: if the CLI is on the PATH, the agent can drive it.
How the agent uses a CLI
Giving the agent a CLI is, in practice, making sure it's installed and letting it call it via Bash. An example — opening a pull request:
gh pr create --title "Add env validation" --body "Closes #42"The agent assembles the command, runs it through Bash, and uses the output (the PR URL, an error) to move on. The CLI already ships --help, so the agent discovers the flags without you having to document them.
Premium Content
Unlock all 20 sections of the Claude Code Guide with lifetime access.
What's included:
- 19 detailed sections, from setup to workflow
- Lifetime access with updates
- Practical examples and ready-to-use configs
- Bilingual support (PT-BR and EN)