Examples
These patterns use flags the CLI accepts today. Every flag is listed in the CLI reference.
Run a task from a script
#!/bin/sh
set -e
syntic -p "run the test suite and list each failing test name" \
--permission-mode acceptEdits \
--max-turns 15 \
--max-budget-usd 1Pipe input in
git diff --staged | syntic -p "write a commit message for this diff"Get machine-readable output
syntic -p "list the exported functions in src/index.ts" --output-format json > result.jsonStream the run as it happens
syntic -p "refactor the logger to use structured fields" \
--output-format stream-json --verboseEach line is one JSON message: the initial record, status records, assistant messages and a final result.
Ask for a fixed answer shape
--json-schema checks the final answer against a JSON Schema, given inline or as a file path. A mismatch gets one retry; a run that still does not match exits non-zero. With --output-format json, the checked answer is in structured_output:
syntic -p "extract the package name and version from package.json" \
--json-schema '{"type":"object","properties":{"name":{"type":"string"},"version":{"type":"string"}},"required":["name","version"]}' \
--output-format json > result.jsonResume the last session in a script
syntic -p "continue the migration" --continueLimit tools for a run
Offer only the built-in tools a run needs with --tools, or remove single tools with --disallowed-tools:
syntic -p "explain the build pipeline" --tools "Read,Grep,Glob"
syntic -p "explain the build pipeline" --disallowed-tools "Write,Edit,Bash"More patterns for CI are in Scripting and CI.