Agent stack guide

Best CLI Tools for Claude Code

Give Claude Code a small local-first stack, then add authenticated tools only for the repository task at hand.

Coding agentsLocal write

Claude Code command policy preview

Start with one recommended CLI and a read-only policy. Review command prefixes, the target environment, and approval boundaries before saving it.

Claude Code permissionsverified · 2026-07-10
claude-settings.json
{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "_clifinder": {
    "tool": "github-cli",
    "mode": "read-only",
    "modeBoundary": "R0 exact commands may be used; R1, R2, and R3 commands are forbidden.",
    "evidence": "verified",
    "checkedAt": "2026-07-10",
    "testedVersion": "2.86.0",
    "warning": "Review generated command prefixes before installing this policy."
  },
  "permissions": {
    "allow": [],
    "ask": [
      "Bash(gh pr list --state open --json number,title,reviewDecision,url:*)"
    ],
    "deny": [
      "Bash(gh pr merge:*)",
      "Bash(gh repo delete:*)"
    ]
  }
}

Evidence boundary

Compatibility is not a test result: current data does not attribute independent CLI execution to a particular agent.

Treat generated content as a reviewable starting point. Remote writes, deletion, production actions, and any confirmation-marked command must still stop for explicit approval.

Outcome, inputs, and outputs

Define the result and evidence before the agent selects a command.

Goal

Make shell work predictable by defining allowed reads, reviewable local writes, and approval-gated remote actions.

Required inputs

  • Repository instructions
  • available shell and sandbox
  • task-specific credentials
  • team approval policy

Expected outputs

  • Recommended CLI stack
  • project policy
  • structured-output rules
  • task-specific approval list

Best CLI Tools for Claude Code: safe workflow

Run each step inside its stated boundary and verify the output before continuing.

Step 1Read only

Install the base stack

Start with repository search and structured-data tools that work without remote credentials.
Input
Operating system and package manager
Output
ripgrep, jq, and yq availability
$ Install the base stack
rg --version && jq --version && yq --version
Step 2Local write

Write project boundaries

State which commands are read-only, which local writes are expected, and which remote actions require approval.
Input
Repository workflow and team policy
Output
Project instruction file
Step 3Local write

Add tools by task

Add GitHub, deployment, database, or security CLIs only with the narrow credentials and output rules they need.
Input
Concrete task and approved identity
Output
Task-ready stack and credential boundary

Approval points and rollback

Pause at the listed decision points and keep recovery instructions beside the action.

Ask before these actions

  • Remote repository writes, deployment, database mutation, or payment actions
  • Changing project instruction or security ignore files
  • Broadening credential scope or bypassing the configured sandbox

Recovery plan

  • Keep policy changes in version control
  • Revoke task-specific tokens after use
  • Revert local edits and use the remote system’s documented rollback for approved writes

CLI, MCP, or API?

Choose the interface by execution location, identity, output contract, and permission boundary.

CLI

Use for local code, tests, search, Git context, and repeatable developer commands.

MCP

Add when a remote service benefits from typed discovery and centrally constrained operations.

API

Use through a small script or service when batching and stable response contracts matter.

Recommended approach

Default to local CLIs, then choose the narrowest remote interface that completes the task.

Official evidence and references

Use these primary or upstream sources to verify current command behavior before acting.

Claude Code documentation

Official product guidance for terminal operation, permissions, and project instructions.

GitHub CLI manual

Official command, authentication, JSON field, and workflow documentation.

ripgrep guide

Project guide for search behavior, filters, file types, and output controls.

jq manual

Official filters, input modes, exit status, and JSON transformation reference.

Questions before you run it

Which tools belong in every Claude Code project?

A small base of repository search and structured-data tools is enough; remote CLIs should follow the actual task.

Should Claude Code run security tools automatically?

Read-only scans are reasonable when configured, but ignore changes, dependency upgrades, and remediation still need review.

Related tools and guides

Browse sibling guides and choose the next page that best matches the active task.

Continue with tool evidence, a workflow, or a decision guide related to this task.

Continue with tool evidence, a workflow, or a decision guide related to this task.

Continue with tool evidence, a workflow, or a decision guide related to this task.

Inspect installation, authentication, structured output, command risk, and official evidence.

Inspect installation, authentication, structured output, command risk, and official evidence.

Inspect installation, authentication, structured output, command risk, and official evidence.