CLI Reference¶
Complete reference for all AIA command-line arguments, options, and flags.
Usage Patterns¶
# Basic usage
aia [options] [PROMPT_ID] [CONTEXT_FILE]*
# Chat mode
aia --chat [PROMPT_ID] [CONTEXT_FILE]*
aia --chat [CONTEXT_FILE]*
# Show help
aia --help
# Show version
aia --version
Mode Options¶
--chat
¶
Begin a chat session with the LLM after processing all prompts in the pipeline.
-f, --fuzzy
¶
Use fuzzy matching for prompt search (requires fzf
to be installed).
Note: If fzf
is not installed, AIA will exit with an error.
--terse
¶
Adds a special instruction to the prompt asking the AI to keep responses short and to the point.
Adapter Options¶
--adapter ADAPTER
¶
Interface that adapts AIA to the LLM. Currently supported: ruby_llm
Valid adapters: ruby_llm
--available_models [QUERY]
¶
List (then exit) available models that match the optional query. Query is a comma-separated list of AND components.
# List all models
aia --available_models
# Filter by provider
aia --available_models openai
# Filter by capability and provider
aia --available_models openai,mini
# Filter by modality
aia --available_models text_to_text
# Complex filter
aia --available_models openai,gpt,text_to_image
Model Options¶
-m MODEL, --model MODEL
¶
Name of the LLM model(s) to use. For multiple models, use comma-separated values.
# Single model
aia --model gpt-4 my_prompt
# Multiple models (parallel processing)
aia --model "gpt-4,claude-3-sonnet,gemini-pro" my_prompt
# Short form
aia -m gpt-3.5-turbo my_prompt
--[no-]consensus
¶
Enable/disable consensus mode for multi-model responses. When enabled, AIA attempts to create a consensus response from multiple models.
# Enable consensus mode (requires multiple models)
aia --model "gpt-4,claude-3-sonnet" --consensus my_prompt
# Disable consensus mode (default: show individual responses)
aia --model "gpt-4,claude-3-sonnet" --no-consensus my_prompt
--sm, --speech_model MODEL
¶
Speech model to use for text-to-speech functionality.
--tm, --transcription_model MODEL
¶
Transcription model to use for speech-to-text functionality.
File Options¶
-c, --config_file FILE
¶
Load configuration from a specific file.
-o, --[no-]out_file [FILE]
¶
Output file for saving AI responses.
# Save to default file (temp.md)
aia --out_file my_prompt
# Save to specific file
aia --out_file output.txt my_prompt
# Use absolute path
aia --out_file /tmp/ai_response.md my_prompt
# Disable file output
aia --no-out_file my_prompt
-a, --[no-]append
¶
Append to output file instead of overwriting.
# Append mode
aia --out_file log.md --append my_prompt
# Overwrite mode (default)
aia --out_file log.md --no-append my_prompt
-l, --[no-]log_file [FILE]
¶
Log file for AIA operations.
# Enable logging to default location
aia --log_file my_prompt
# Log to specific file
aia --log_file /var/log/aia.log my_prompt
# Disable logging
aia --no-log_file my_prompt
--md, --[no-]markdown
¶
Format output with Markdown.
# Enable Markdown formatting
aia --markdown my_prompt
# Disable Markdown formatting
aia --no-markdown my_prompt
Prompt Options¶
--prompts_dir DIR
¶
Directory containing prompt files.
--roles_prefix PREFIX
¶
Subdirectory name for role files (default: roles
).
# Use custom roles directory
aia --roles_prefix personas --role expert
# Results in looking for roles in ~/.prompts/personas/expert.txt
-r, --role ROLE_ID
¶
Role ID to prepend to the prompt.
-n, --next PROMPT_ID
¶
Next prompt to process (can be used multiple times to build a pipeline).
-p PROMPTS, --pipeline PROMPTS
¶
Pipeline of comma-separated prompt IDs to process.
-x, --[no-]exec
¶
Designate an executable prompt file.
# Treat prompt as executable
aia --exec my_script_prompt
# Treat as regular prompt (default)
aia --no-exec my_script_prompt
--system_prompt PROMPT_ID
¶
System prompt ID to use for chat sessions.
--regex PATTERN
¶
Regex pattern to extract parameters from prompt text.
AI Parameters¶
-t, --temperature TEMP
¶
Temperature for text generation (0.0 to 2.0). Higher values make output more creative and random.
# Conservative/focused
aia --temperature 0.1 analysis_prompt
# Balanced (default ~0.7)
aia --temperature 0.7 my_prompt
# Creative
aia --temperature 1.5 creative_writing
# Very creative
aia -t 2.0 brainstorm_ideas
--max_tokens TOKENS
¶
Maximum tokens for text generation.
--top_p VALUE
¶
Top-p sampling value (0.0 to 1.0). Alternative to temperature for controlling randomness.
--frequency_penalty VALUE
¶
Frequency penalty (-2.0 to 2.0). Positive values discourage repetition.
# Discourage repetition
aia --frequency_penalty 0.5 my_prompt
# Encourage repetition
aia --frequency_penalty -0.5 my_prompt
--presence_penalty VALUE
¶
Presence penalty (-2.0 to 2.0). Positive values encourage discussing new topics.
# Encourage new topics
aia --presence_penalty 0.5 broad_discussion
# Focus on current topics
aia --presence_penalty -0.5 deep_dive
Audio/Image Options¶
--speak
¶
Convert text to audio and play it. Uses the configured speech model and voice.
--voice VOICE
¶
Voice to use for speech synthesis.
aia --voice alloy --speak my_prompt
aia --voice echo --speak my_prompt
aia --voice fable --speak my_prompt
aia --voice nova --speak my_prompt
aia --voice onyx --speak my_prompt
aia --voice shimmer --speak my_prompt
--is, --image_size SIZE
¶
Image size for image generation.
Common sizes: 256x256
, 512x512
, 1024x1024
, 1792x1024
, 1024x1792
--iq, --image_quality QUALITY
¶
Image quality for image generation.
Values: standard
, hd
--style, --image_style STYLE
¶
Style for image generation.
Values: vivid
, natural
Tool Options¶
--rq LIBS, --require LIBS
¶
Ruby libraries to require for Ruby directive execution.
--tools PATH_LIST
¶
Add tool file(s) or directories. Comma-separated paths.
# Single tool file
aia --tools ./my_tool.rb my_prompt
# Multiple tools
aia --tools "./tool1.rb,./tool2.rb" my_prompt
# Tool directory
aia --tools ./tools/ my_prompt
# Mixed paths
aia --tools "./tools/,./special_tool.rb" my_prompt
--at, --allowed_tools TOOLS_LIST
¶
Allow only these tools to be used. Security feature to restrict tool access.
# Allow specific tools
aia --allowed_tools "calculator,file_reader" my_prompt
aia --at "web_scraper,data_analyzer" analysis_prompt
--rt, --rejected_tools TOOLS_LIST
¶
Reject/block these tools from being used.
# Block dangerous tools
aia --rejected_tools "file_writer,system_command" my_prompt
aia --rt "network_access" secure_prompt
Utility Options¶
-d, --debug
¶
Enable debug output for troubleshooting.
--no-debug
¶
Explicitly disable debug output.
-v, --[no-]verbose
¶
Enable/disable verbose output.
--refresh DAYS
¶
Refresh models database interval in days.
# Refresh immediately
aia --refresh 0
# Refresh weekly
aia --refresh 7
# Refresh monthly
aia --refresh 30
--dump FILE
¶
Dump current configuration to a file for inspection or backup.
--completion SHELL
¶
Show completion script for shell integration.
# Bash completion
aia --completion bash > ~/.bash_completion.d/aia
# Zsh completion
aia --completion zsh > ~/.zsh/completions/_aia
# Fish completion
aia --completion fish > ~/.config/fish/completions/aia.fish
Supported shells: bash
, zsh
, fish
--version
¶
Show AIA version and exit.
-h, --help
¶
Show help message and exit.
Usage Examples¶
Basic Examples¶
# Simple prompt execution
aia hello_world
# Chat mode
aia --chat
# Use specific model
aia --model gpt-4 code_review my_script.py
# Fuzzy prompt selection
aia --fuzzy
Advanced Examples¶
# Multi-model consensus
aia --model "gpt-4,claude-3-sonnet" --consensus analysis_prompt data.csv
# Creative writing with voice output
aia --model gpt-4 --temperature 1.2 --speak --voice nova story_prompt
# Secure tool usage
aia --tools ./safe_tools/ --allowed_tools "calculator,file_reader" --rejected_tools "system_command" analysis_prompt
# Pipeline with custom configuration
aia --pipeline "extract,analyze,summarize" --temperature 0.3 --max_tokens 2000 --out_file report.md data_source.txt
# Debug mode with verbose output
aia --debug --verbose --model claude-3-sonnet problematic_prompt
Configuration Examples¶
# Use custom configuration
aia --config_file ./project_config.yml --prompts_dir ./project_prompts/ my_prompt
# Save output with markdown formatting
aia --out_file analysis.md --markdown --append data_analysis dataset.csv
# Audio processing
aia --transcription_model whisper-1 --speech_model tts-1-hd --voice echo audio_prompt audio_file.wav
Exit Codes¶
0
- Success1
- General error (invalid arguments, file not found, etc.)2
- Configuration error3
- Model/API error4
- Tool execution error
Environment Variables¶
Many CLI options have corresponding environment variables with the AIA_
prefix:
export AIA_MODEL="gpt-4"
export AIA_TEMPERATURE="0.8"
export AIA_PROMPTS_DIR="/custom/prompts"
export AIA_VERBOSE="true"
export AIA_DEBUG="false"
See Configuration for a complete list.
Configuration Precedence¶
Options are resolved in this order (highest to lowest precedence):
- Command line arguments
- Environment variables
- Configuration files
- Built-in defaults
Related Documentation¶
- Configuration Guide - Detailed configuration options
- Getting Started - Basic usage tutorial
- Advanced Prompting - Advanced usage patterns
- Directives Reference - Prompt directive reference