Exploring CLI Tools
Workflow
- •Run
<tool> --helpor<tool> -hfor overview - •For subcommands:
<tool> <subcommand> --help - •If help is insufficient:
man <tool> - •For extensive help output: pipe through
grepto find specific flags
Help flag conventions
Tools vary in conventions:
- •
--helpor-h(most common) - •
helpas subcommand:git help commit - •
-?(Windows-originated tools) - •No flags (some tools show help when run without arguments)
Constraints
- •Only use read-only exploration:
--help,-h,man,--version - •Do NOT execute commands that modify state
- •If help requires authentication/setup, report this limitation
Response format
Provide:
- •Answer: Direct response to what was asked
- •Syntax: Exact command with required flags
- •Caveats: Version-specific or platform-specific notes (if any)
Examples
Task: Find how to create a git branch
bash
git branch --help
Result: git branch <name> or git checkout -b <name>
Task: Check if curl follows redirects
bash
curl --help all | grep -i redirect
Result: -L, --location follows redirects
Task: Explore nested subcommands (kubectl)
bash
kubectl --help kubectl get --help