shell_integration - MadBomber/aia GitHub Wiki

Shell Integration

AIA supports powerful shell integration, enabling dynamic content and environment variable substitution within your prompts.

Shell Command Substitution

Insert the output of a shell command directly into your prompt using:

$(shell command)

Examples:

  • Insert your OS version: $(uname -v)
  • Insert file content: $(cat README.md)

Environment Variable Substitution

Reference environment variables in your prompts:

  • $USER or ${USER}

Use Cases

  • Tailor prompts to specific platforms
  • Insert real-time data (news, file contents, etc.)
  • Adapt prompts based on your working directory or environment

Safety Note

With great power comes great responsibility! Shell integration can execute any command—be cautious with your prompt files.


For more on embedding Ruby, see Embedded Ruby. For directive usage, see Prompt Directives.