← Back to Blog

Claude Code Field Guide: CLI Orchestration

TL;DR

Claude orchestrates git, gh, gcloud, and deploy scripts. You make decisions. One terminal replaces five tools.

Part of the Claude Code Field Guide series.


Claude Code runs in a terminal, which means it has access to everything your terminal can do.

The Tool Consolidation

Before Claude Code, my workflow involved:

  • IDE for code
  • Terminal for git
  • Browser for GitHub PRs
  • Separate tool for code review (CodeRabbit)
  • Various dashboards for deployment

Now it's one terminal:

# In one Claude session:
# - Write the feature
# - Run tests
# - Create commit
# - Push to GitHub
# - Create PR with gh cli
# - Deploy to staging with gcloud
# - Run smoke tests
# - Launch review agent
# - Merge when approved

Claude orchestrates the tools. I make decisions.

The Code Review Workflow

My PR review process:

  1. Claude writes code
  2. Claude runs tests
  3. Claude commits and pushes
  4. Claude creates PR via gh pr create
  5. New agent (fresh context) reviews the PR
  6. Review agent comments on issues
  7. If approved, Claude merges via gh pr merge

I have a custom /review-pr command that structures the review:

# Review PR from Current Branch

1. Fetch PR details:
   gh pr view --json number,title,body,additions,deletions,files

2. Fetch the full diff:
   gh pr diff

3. Analyze for:
   **Code Quality** - Logic errors, edge cases, null handling
   **Security** - SQL injection, XSS, hardcoded secrets
   **Performance** - N+1 queries, missing indexes
   **Architecture** - Does change fit existing patterns?

4. Provide structured review:
   - Summary: What does this PR do?
   - Risk Assessment: Low/Medium/High with reasoning
   - Findings: Critical / Warning / Suggestion
   - Verdict: Approve / Request Changes / Needs Discussion

5. If merging, ask: major, minor, or patch release?

I used CodeRabbit before, which was good. This is better because the reviewer has full codebase access, can run the code, can check if suggested fixes actually work. The fresh-context agent doesn't carry the author's assumptions about why the code is correct.

Deployment Pipelines

Claude can execute deployment scripts:

# Claude runs this sequence:
npm run build
npm run test
gcloud app deploy --project=my-project
./scripts/smoke-test.sh production

It can handle the happy path and respond to errors. Failed deployment? Claude reads the logs, diagnoses, suggests fixes.

MCP Servers: External Service Integration

Beyond CLI tools, Claude Code connects to external services via MCP (Model Context Protocol) servers. This extends orchestration beyond your local machine.

Examples from my workflow:

  • n8n automation: My n8n instance is managed as code. Claude creates and modifies workflows through the n8n MCP server
  • Presentations: I have a Slidev template. Claude generates presentations from the terminal, updating slides based on documentation
  • Project management: Connect to Asana, Linear, or other tools to create tasks, update status, link PRs to issues

MCP servers turn Claude into an orchestrator for your entire toolchain—not just what's on your machine.

Branch-Based Development

Develop in git branches, review via pull requests. This workflow compounds with Claude:

  1. Claude makes small commits as it works—each logical change gets its own commit for easy rollback
  2. Create PR when feature is complete
  3. Claude reviews the PR (fresh-context agent)
  4. You review after Claude—human oversight on Claude's review
  5. Squash commits on merge if you want clean history

The small-commit approach gives you rollback granularity during development. Squashing on merge keeps main history clean. Best of both worlds.

Why This Works

The key insight: Claude doesn't need GUIs. CLI tools are often more powerful than their web counterparts, and Claude can chain them together in ways that manual workflows can't match.

  • gh for GitHub (PRs, issues, releases)
  • gcloud for Google Cloud
  • aws for AWS
  • kubectl for Kubernetes
  • MCP servers for external services
  • Any CLI tool you use

One conversation, full access to your entire toolchain.


Next: Diagrams and Documentation

Back to Claude Code Field Guide