CLI & API
Automation
Print mode, JSON output, and stdin piping make the CLI a clean fit for scripts and CI.
One-shot prompts
Pass a prompt as an argument and the reply streams straight to stdout. Piped stdin is appended to your prompt, which makes the CLI a natural fit for logs and diffs:
# ask about the current repo goatfied "summarize the architecture of this repo" # feed a build log in and ask what broke cat build.log | goatfied -p "what failed and how do I fix it?" # review a diff git diff | goatfied -p "review this change for bugs"
-p / --print is print mode: it streams the answer and exits without saving a session, so it composes cleanly inside pipelines.
JSON output
-o json / --output-format json emits a single JSON object at the end instead of streaming deltas — easy to parse in scripts:
goatfied -p -o json "name three risks in this code" < app.ts
# {"reply":"…","model":"aiarco-goat-1.0","session":null}In CI
# .github/workflows/triage.yml
- name: Ask Goatfied to triage the failure
env:
GOATFIED_TOKEN: ${{ secrets.GOATFIED_TOKEN }}
run: |
npx -y @goatfied/cli -p "Summarize the failing test and suggest a fix" \
< test-output.logFor programmatic use beyond the CLI, call the HTTP API directly.
Next