Agent stack guide
Best CLI Tools for Cursor
Use Cursor’s terminal with repository-native commands and a clear split between workspace edits and external actions.
Cursor 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.
## ripgrep command policy
Use `rg` only for source search, pattern discovery, file type filtering, machine-readable matches.
- Default mode: **read-only**.
- Evidence is `verified`, checked 2026-07-10; bounded local checks were recorded for `15.1.0`.
- Verify identity and environment before execution.
- Prefer machine-readable output: `--json`, `--null`.
- Never expose credentials or sensitive output.
- Mode boundary: R0 exact commands may be used; R1, R2, and R3 commands are forbidden.
- Only an explicitly audited suffix-safe prefix may be auto-allowed. Otherwise a generated prefix rule must prompt.
- R3 commands are forbidden in every generated mode; a user request does not silently widen this artifact.
Allowed in read-only mode:
- `rg --json --glob "*.ts" "pattern" src` — R0: Searches a bounded directory and emits one JSON event per line.
- `rg --files --null src` — R0: Lists files while respecting ignore rules.
Require explicit approval in read-only mode:
- None recorded.
Forbidden in read-only mode:
- None recorded.
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.
Best CLI Tools for Cursor: safe workflow
Run each step inside its stated boundary and verify the output before continuing.
Approval points and rollback
Pause at the listed decision points and keep recovery instructions beside the action.
CLI, MCP, or API?
Choose the interface by execution location, identity, output contract, and permission boundary.
Recommended approach
Keep build and inspection in the terminal; gate GitHub and deployment writes separately.
Official evidence and references
Use these primary or upstream sources to verify current command behavior before acting.