Back to browse
cli
CLI tool agent with command-line interface design and implementation conventions.
Compare with other agentsFrontmatter
---
name: cli
description: CLI tool agent with command-line interface design and implementation conventions.
---Agent Definition
AGENTS.md - CLI
Overview
Command-line interface tools and entry points.
Setup & environment
- CLI framework: as per project
- Build output: as per project
Build & tests
- Build CLI: as per project
- Run CLI: as per project
- Test: as per project
- Lint: as per project
Code style & conventions
- Use flag parsing library consistently
- Provide --help for all commands and subcommands
- Use --version to display version information
- Exit codes: 0 = success, 1 = general error, 2 = usage error
- Output: structured (JSON) for scripts, human-readable for interactive
- Errors: write to stderr, not stdout
- Progress: show for long-running operations
- Interactive prompts: support non-interactive mode with flags
Security & safety
- Validate all file paths and prevent directory traversal
- Never execute user-provided code without explicit confirmation
- Sensitive data: never log or display in plain text
- Config files: validate schema and permissions
- Network operations: timeout and retry with backoff
PR/commit checklist
- --help text is clear and accurate
- --version displays correct version
- Exit codes are correct
- Errors go to stderr
- Long operations show progress
- Works in non-interactive mode
- Tests cover main workflows
Part of the Assets collection