Piping AI Agent Configs Into Your Build Pipeline with --json
The --json flag turns AI Toolkit Plus into a composable CLI tool. Pipe config generation into scripts, CI, dashboards, and custom automation.
CLI tools that only output human-readable text are half-finished. The moment you need to integrate with a script, CI pipeline, or dashboard, you're parsing colored terminal output with regex. That's not engineering — that's suffering.
AI Toolkit Plus now supports --json output for everything.
The Basics
aitoolkitplus init --all --json[
{"agent": "claude", "path": "CLAUDE.md"},
{"agent": "claude", "path": ".claude/settings.json"},
{"agent": "cursor", "path": ".cursorrules"},
{"agent": "cursor", "path": ".cursor/rules/framework.mdc"},
{"agent": "copilot", "path": ".github/copilot-instructions.md"},
{"agent": "windsurf", "path": ".windsurfrules"},
{"agent": "codex", "path": "AGENTS.md"},
{"agent": "codex", "path": "codex.md"},
{"agent": "gemini", "path": "GEMINI.md"},
{"agent": "mcp", "path": ".well-known/mcp.json"},
{"agent": "mcp", "path": "mcp-config.json"}
]Clean JSON. No ANSI colors. No progress messages. Ready to pipe.
Real-World Patterns
1. Config Drift Detection in CI
- name: Detect config drift
run: |
aitoolkitplus init --all --dry-run --json > /tmp/expected.json
EXPECTED=$(cat /tmp/expected.json | jq -r '.[].path' | sort)
ACTUAL=$(git diff --name-only HEAD~1 | grep -E 'CLAUDE|cursor|copilot|windsurf|AGENTS|codex|GEMINI|mcp' | sort)
if [ "$EXPECTED" != "$ACTUAL" ]; then
echo "::warning::AI configs may need updating"
fi2. Dashboard Integration
Building an internal developer portal? Pull config status:
# Which agents are configured in this repo?
aitoolkitplus init --all --dry-run --json | jq '[.[].agent] | unique'
# ["claude", "codex", "copilot", "cursor", "gemini", "mcp", "windsurf"]3. Multi-Repo Automation
# Update configs across all repos in an org
for repo in $(gh repo list my-org --json name -q '.[].name'); do
cd /tmp && git clone "git@github.com:my-org/$repo.git"
cd "$repo"
aitoolkitplus init --all --json > "/tmp/reports/$repo.json"
cd /tmp && rm -rf "$repo"
done4. Custom Post-Processing
# Generate configs, then patch CLAUDE.md with team-specific addendum
aitoolkitplus init --agent claude --json
cat >> CLAUDE.md << 'EOF'
## Team-Specific Rules
- All PRs require two approvals
- Use conventional commits (feat:, fix:, chore:)
- Never deploy on Fridays
EOF5. Combining with --dry-run
# Preview without writing, as JSON
aitoolkitplus init --all --dry-run --json | jq length
# 11Count how many files would be generated. Zero side effects.
Why JSON Matters
The Unix philosophy: programs should be composable. --json transforms AI Toolkit Plus from "a tool you run manually" into "a component in your automation pipeline."
Every CI system, every scripting language, every monitoring tool speaks JSON. By outputting structured data, you can:
- Script it — Wrap in bash, Python, or Node.js automation
- Monitor it — Track which repos have stale configs
- Gate it — Fail CI if configs are out of date
- Report it — Generate dashboards showing AI tool adoption across your org
Getting Started
# JSON output for init
aitoolkitplus init --all --json
# JSON output for dry-run preview
aitoolkitplus init --all --dry-run --json
# Combine with jq for specific queries
aitoolkitplus init --all --json | jq '.[] | select(.agent == "claude")'The --json flag suppresses all human-readable output (progress messages, colors, summaries) and emits only the structured result. It's designed to be piped, not read.
AI Toolkit Plus generates configuration files for Claude Code, Cursor, Copilot, Windsurf, Codex, and Gemini CLI from a single command. Learn more.