exec - MadBomber/aia GitHub Wiki

--exec Option

The --exec option is specifically designed for use in shebang lines of executable prompt files. When enabled, it instructs AIA to process dynamic content elements within the executable prompt file, including:

  • Environment variable parameters
  • Shell command integrations
  • ERB (Embedded Ruby) templating
  • Prompt directives

Usage

The --exec option is typically used in shebang lines:

#!/usr/bin/env aia run --exec --no-out_file

Dynamic Content Processing

When --exec is specified:

  • Enabled: Dynamic content (envars, shell commands, ERB, directives) is processed
  • Not specified: The executable prompt file is treated like any other static context file

Recommended Usage

For executable prompt files that act as full *nix command citizens in piped workflows:

#!/usr/bin/env aia run --exec --no-out_file

The --no-out_file option is recommended (but not required) to ensure the executable prompt file:

  • Receives input from STDIN
  • Generates output to STDOUT
  • Works seamlessly in complex piped workflows

Examples

Basic Executable Prompt with Dynamic Content

#!/usr/bin/env aia run --exec --no-out_file
# File: analyze_logs
# Process log files with dynamic shell integration

//shell find /var/log -name "*.log" -mtime -1
Analyze the recent log files above for any error patterns.

With Environment Variables

#!/usr/bin/env aia run --exec --no-out_file
# File: system_report
# Generate system report using environment variables

Current user: [USER]
System: //shell uname -a
Generate a system health report for the above configuration.

See Also