Example scripts demonstrating different ways to use afm-cli.
| Script | Description |
|---|---|
01_basic.sh |
Simple prompt (positional argument) |
02_system_prompt.sh |
System prompt (-s / --system-prompt) for style/format |
03_schema_inline.sh |
Structured JSON output with inline --schema |
04_schema_file.sh |
Structured output using a schema file (person_schema.json) |
05_conversation.sh |
Multi-turn chat with -c / --conversation |
06_stdin.sh |
Prompt from stdin (pipe) |
07_help_version.sh |
--help and --version |
08_file_input.sh |
Prompt from file (--file / -f) |
test_schema.sh |
Test suite for --schema / --json-schema (run with --verbose to see output) |
make run-examples
# or with custom binary:
make run-examples AFM=./build/Release/afm-cliRun the schema test suite:
make test-schema
make test-schema VERBOSE=1 # show afm-cli outputOr run a single example:
./examples/01_basic.sh
./examples/01_basic.sh /path/to/afm-cliafm-clionPATH, or pass the binary as the first argument to each script.- macOS with Apple Intelligence enabled for generate examples; help/version work without it.