@@ -117,6 +117,7 @@ json-cli --help
117117
118118 Options
119119 --provider <name> AI provider: claude | openai | ollama (default: claude)
120+ --catalogs <list> Force specific catalogs: package,git,docker,fs,shell (comma-separated)
120121 --yes Skip confirmation prompt
121122 --dry-run Show plan without executing
122123 --debug Show system prompt and raw AI response
@@ -136,6 +137,8 @@ json-cli --help
136137 json-cli "run tests" --dry-run
137138 json-cli "run tests" --debug
138139 json-cli "run tests" --debug --dry-run
140+ json-cli "deploy to prod" --catalogs docker
141+ json-cli "list files in E:" --catalogs fs
139142 json-cli --resume
140143 json-cli --history
141144
@@ -144,6 +147,40 @@ json-cli --help
144147
145148---
146149
150+ ## Catalogs (Command Whitelists)
151+
152+ json-cli automatically detects which catalogs to use based on your project structure:
153+
154+ | Catalog | Auto-detected when | Commands |
155+ | ---------| -------------------| ----------|
156+ | ` package ` | ` package.json ` exists | npm, pnpm, yarn, bun |
157+ | ` git ` | ` .git/ ` folder exists | git init, add, commit, push, pull... |
158+ | ` docker ` | ` Dockerfile ` or ` docker-compose.yml ` exists | docker build, run, compose... |
159+ | ` fs ` | Always included | mkdir, rm, cp, mv, touch, cat, ls, dir |
160+ | ` shell ` | Always included | Any command (escape hatch) |
161+
162+ ### Force specific catalogs
163+
164+ Use ` --catalogs ` to override auto-detection:
165+
166+ ``` bash
167+ # Only use docker commands, even in a Node.js project
168+ json-cli " deploy to prod" --catalogs docker
169+
170+ # Only filesystem commands
171+ json-cli " list files in E:" --catalogs fs
172+
173+ # Multiple catalogs (comma-separated)
174+ json-cli " build and deploy" --catalogs package,docker
175+ ```
176+
177+ This is useful when you want to:
178+ - Exclude certain tools from the plan
179+ - Ensure only specific command types are used
180+ - Override auto-detection in CI/CD pipelines
181+
182+ ---
183+
147184## How it works
148185
149186```
@@ -177,7 +214,8 @@ Runner ← executes step by step, streams output live
177214| ` yarn ` | install, run, build, test, publish, add, remove, why, upgrade |
178215| ` bun ` | install, run, build, test, publish, add, remove, x, update |
179216| ` git ` | init, add, commit, push, pull, clone, status, log, branch, checkout, merge, diff, stash |
180- | ` fs ` | mkdir, touch, cp, mv, ls ` (coming soon) ` |
217+ | ` docker ` | build, run, compose, push, pull, exec, logs, ps, stop, start, rm, rmi |
218+ | ` fs ` | mkdir, rm, cp, mv, touch, cat, ls, dir |
181219| ` shell ` | any * (escape hatch — always requires extra confirmation)* |
182220
183221> ** Note:** Flags and arguments are unrestricted, ` --port 5000 ` , ` -m "message" ` , ` --force ` etc. are all passed freely. Only the command itself is whitelisted.
0 commit comments