aia 2.0.0.0.pre.beta2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +152 -223
  3. data/README.md +41 -18
  4. data/bin/aia +8 -3
  5. data/lib/aia/aia_completion.bash +2 -3
  6. data/lib/aia/aia_completion.fish +6 -5
  7. data/lib/aia/aia_completion.zsh +2 -3
  8. data/lib/aia/chat_loop.rb +16 -14
  9. data/lib/aia/config/cli_parser.rb +123 -91
  10. data/lib/aia/config/defaults.yml +18 -40
  11. data/lib/aia/config/mcp_parser.rb +30 -36
  12. data/lib/aia/config/model_spec.rb +8 -14
  13. data/lib/aia/config/validator.rb +102 -103
  14. data/lib/aia/config/value_caster.rb +76 -0
  15. data/lib/aia/config.rb +70 -53
  16. data/lib/aia/crew.rb +29 -19
  17. data/lib/aia/debate_handler.rb +27 -10
  18. data/lib/aia/directives/configuration_directives.rb +55 -14
  19. data/lib/aia/directives/context_directives.rb +24 -12
  20. data/lib/aia/directives/execution_directives.rb +18 -23
  21. data/lib/aia/directives/model_directives.rb +41 -104
  22. data/lib/aia/directives/utility_directives.rb +16 -17
  23. data/lib/aia/directives/web_and_file_directives.rb +21 -14
  24. data/lib/aia/fact_asserter.rb +3 -3
  25. data/lib/aia/history_transfer.rb +64 -24
  26. data/lib/aia/logger.rb +14 -46
  27. data/lib/aia/mcp_config_normalizer.rb +27 -14
  28. data/lib/aia/mcp_connection_manager.rb +181 -184
  29. data/lib/aia/mcp_discovery.rb +43 -15
  30. data/lib/aia/mcp_grouper.rb +2 -1
  31. data/lib/aia/mcp_server_config.rb +20 -2
  32. data/lib/aia/mcp_utility.rb +24 -19
  33. data/lib/aia/mention_router.rb +15 -2
  34. data/lib/aia/modality_query.rb +36 -0
  35. data/lib/aia/model_alias_registry.rb +11 -11
  36. data/lib/aia/model_registry.rb +75 -0
  37. data/lib/aia/network_builder.rb +8 -7
  38. data/lib/aia/patches/mcp_stdio_stderr.rb +102 -0
  39. data/lib/aia/patches/ruby_llm_streaming_error.rb +21 -4
  40. data/lib/aia/patches/ruby_llm_tool_param_compat.rb +18 -0
  41. data/lib/aia/pipeline_orchestrator.rb +71 -38
  42. data/lib/aia/prompt_decomposer.rb +1 -1
  43. data/lib/aia/prompt_handler.rb +56 -29
  44. data/lib/aia/provider_registry.rb +105 -0
  45. data/lib/aia/robot_builder.rb +1 -1
  46. data/lib/aia/robot_factory.rb +67 -63
  47. data/lib/aia/robot_sync.rb +79 -0
  48. data/lib/aia/role_catalog.rb +89 -0
  49. data/lib/aia/session.rb +25 -11
  50. data/lib/aia/skill_utils.rb +60 -19
  51. data/lib/aia/spawn_handler.rb +16 -4
  52. data/lib/aia/spawn_spec_parser.rb +6 -7
  53. data/lib/aia/special_mode_handler.rb +28 -25
  54. data/lib/aia/speech.rb +70 -34
  55. data/lib/aia/startup_coordinator.rb +17 -92
  56. data/lib/aia/streaming_runner.rb +10 -2
  57. data/lib/aia/system_prompt_assembler.rb +12 -11
  58. data/lib/aia/task_board.rb +60 -0
  59. data/lib/aia/tool_approver.rb +205 -0
  60. data/lib/aia/tool_filter.rb +1 -10
  61. data/lib/aia/tool_filter_strategy.rb +12 -1
  62. data/lib/aia/tool_introspection.rb +9 -1
  63. data/lib/aia/tool_loader.rb +67 -33
  64. data/lib/aia/tool_utility.rb +6 -5
  65. data/lib/aia/tools/delegate_to_foreman_tool.rb +6 -4
  66. data/lib/aia/tools/recruit_robot_tool.rb +12 -12
  67. data/lib/aia/tools/reskill_robot_tool.rb +7 -7
  68. data/lib/aia/tools/task_board_tool.rb +16 -16
  69. data/lib/aia/trakflow_bridge.rb +14 -8
  70. data/lib/aia/turn_state.rb +31 -8
  71. data/lib/aia/ui_presenter.rb +16 -0
  72. data/lib/aia/utility.rb +6 -24
  73. data/lib/aia/variable_input_collector.rb +0 -3
  74. data/lib/aia/verification_network.rb +9 -10
  75. data/lib/aia/version.rb +1 -9
  76. data/lib/aia.rb +34 -8
  77. metadata +20 -161
  78. data/.better-commits.json +0 -150
  79. data/.config/tocer/configuration.yml +0 -6
  80. data/.envrc +0 -19
  81. data/.loki +0 -11
  82. data/.reek.yml +0 -160
  83. data/.rubocop.yml +0 -116
  84. data/.rubocop_strict.yml +0 -15
  85. data/.version +0 -1
  86. data/COMMITS.md +0 -196
  87. data/IMPLEMENTATION_PLAN.md +0 -506
  88. data/Rakefile +0 -47
  89. data/_typos.toml +0 -10
  90. data/aia.gemspec +0 -92
  91. data/architecture_review.md +0 -314
  92. data/config/aia.yml +0 -13
  93. data/docs/AGENTS.md +0 -40
  94. data/docs/advanced-prompting.md +0 -814
  95. data/docs/assets/images/aia.png +0 -0
  96. data/docs/cli-reference.md +0 -1241
  97. data/docs/configuration.md +0 -747
  98. data/docs/contributing.md +0 -386
  99. data/docs/directives-reference.md +0 -1145
  100. data/docs/examples/index.md +0 -277
  101. data/docs/examples/mcp/index.md +0 -475
  102. data/docs/examples/prompts/analysis/index.md +0 -78
  103. data/docs/examples/prompts/automation/index.md +0 -109
  104. data/docs/examples/prompts/development/index.md +0 -125
  105. data/docs/examples/prompts/index.md +0 -333
  106. data/docs/examples/prompts/learning/index.md +0 -127
  107. data/docs/examples/prompts/writing/index.md +0 -62
  108. data/docs/examples/tools/index.md +0 -282
  109. data/docs/faq.md +0 -578
  110. data/docs/guides/available-models.md +0 -366
  111. data/docs/guides/basic-usage.md +0 -478
  112. data/docs/guides/chat.md +0 -680
  113. data/docs/guides/crew.md +0 -239
  114. data/docs/guides/executable-prompts.md +0 -331
  115. data/docs/guides/first-prompt.md +0 -454
  116. data/docs/guides/getting-started.md +0 -455
  117. data/docs/guides/image-generation.md +0 -507
  118. data/docs/guides/index.md +0 -48
  119. data/docs/guides/local-models.md +0 -306
  120. data/docs/guides/migrate-prompts.md +0 -335
  121. data/docs/guides/models.md +0 -1017
  122. data/docs/guides/shared-tools.md +0 -254
  123. data/docs/guides/tools.md +0 -831
  124. data/docs/index.md +0 -259
  125. data/docs/installation.md +0 -274
  126. data/docs/mcp-integration.md +0 -603
  127. data/docs/prompt_management.md +0 -665
  128. data/docs/security.md +0 -674
  129. data/docs/special_projects_guide.md +0 -386
  130. data/docs/tools-and-mcp-examples.md +0 -1211
  131. data/docs/workflows-and-pipelines.md +0 -636
  132. data/examples/.gitignore +0 -2
  133. data/examples/00_setup_aia.sh +0 -111
  134. data/examples/01_basic_usage.sh +0 -23
  135. data/examples/02_frontmatter.sh +0 -33
  136. data/examples/03_shell_integration.sh +0 -55
  137. data/examples/04_erb_templating.sh +0 -56
  138. data/examples/05_shell_then_erb.sh +0 -38
  139. data/examples/06_prompt_chaining.sh +0 -59
  140. data/examples/07_pipeline.sh +0 -46
  141. data/examples/08_context_files.sh +0 -43
  142. data/examples/09_roles.sh +0 -67
  143. data/examples/10_stdin_piping.sh +0 -49
  144. data/examples/11_multi_model.sh +0 -65
  145. data/examples/12_token_usage.sh +0 -52
  146. data/examples/13_cost_tracking.sh +0 -68
  147. data/examples/14_output_file.sh +0 -91
  148. data/examples/15_parameters.sh +0 -68
  149. data/examples/16_directives.sh +0 -113
  150. data/examples/17_require_and_conditionals.sh +0 -68
  151. data/examples/18_tools.sh +0 -61
  152. data/examples/19_local_tools.sh +0 -34
  153. data/examples/20_mcp_servers.sh +0 -102
  154. data/examples/21_executable_prompts.sh +0 -78
  155. data/examples/22_chat_mode.sh +0 -217
  156. data/examples/23_verify.sh +0 -139
  157. data/examples/24_decompose.sh +0 -139
  158. data/examples/25_spawn.sh +0 -139
  159. data/examples/26_debate.sh +0 -97
  160. data/examples/27_mention_routing.sh +0 -157
  161. data/examples/28_model_switching.sh +0 -106
  162. data/examples/29_agent_harness.sh +0 -177
  163. data/examples/README.md +0 -321
  164. data/examples/advanced_multi_robot_capabilities_without_examples.md +0 -106
  165. data/examples/aia_config.yml +0 -22
  166. data/examples/aia_config_orchestrator.yml +0 -45
  167. data/examples/aia_config_with_mcp.yml +0 -21
  168. data/examples/common.sh +0 -39
  169. data/examples/context/project_goals.md +0 -6
  170. data/examples/context/tech_stack.md +0 -7
  171. data/examples/directives/timestamp_directive.rb +0 -22
  172. data/examples/mcp/filesystem.json +0 -9
  173. data/examples/prompts_dir/analyze.md +0 -2
  174. data/examples/prompts_dir/brainstorm.md +0 -2
  175. data/examples/prompts_dir/conditional.md +0 -17
  176. data/examples/prompts_dir/creative.md +0 -4
  177. data/examples/prompts_dir/erbinfo.md +0 -5
  178. data/examples/prompts_dir/erbinfo_raw.md +0 -8
  179. data/examples/prompts_dir/evaluate.md +0 -2
  180. data/examples/prompts_dir/explain_joke.md +0 -1
  181. data/examples/prompts_dir/explain_recursion.md +0 -1
  182. data/examples/prompts_dir/fun_fact +0 -3
  183. data/examples/prompts_dir/greeting.md +0 -8
  184. data/examples/prompts_dir/greeting_required.md +0 -7
  185. data/examples/prompts_dir/hello.md +0 -1
  186. data/examples/prompts_dir/includes/ruby_facts.md +0 -4
  187. data/examples/prompts_dir/limerick.md +0 -1
  188. data/examples/prompts_dir/list_with_mcp.md +0 -3
  189. data/examples/prompts_dir/pick_best.md +0 -2
  190. data/examples/prompts_dir/project_summary +0 -12
  191. data/examples/prompts_dir/quiz_with_include.md +0 -6
  192. data/examples/prompts_dir/require_demo.md +0 -5
  193. data/examples/prompts_dir/roles/formal.md +0 -3
  194. data/examples/prompts_dir/roles/orchestrator.md +0 -21
  195. data/examples/prompts_dir/roles/pirate.md +0 -3
  196. data/examples/prompts_dir/shell_then_erb.md +0 -6
  197. data/examples/prompts_dir/sort_compare.md +0 -2
  198. data/examples/prompts_dir/summarize_context.md +0 -2
  199. data/examples/prompts_dir/sysinfo.md +0 -5
  200. data/examples/prompts_dir/sysinfo_raw.md +0 -8
  201. data/examples/prompts_dir/tagline.md +0 -1
  202. data/examples/prompts_dir/tell_joke.md +0 -1
  203. data/examples/prompts_dir/tell_joke_with_next.md +0 -4
  204. data/examples/prompts_dir/use_local_tool.md +0 -8
  205. data/examples/prompts_dir/use_tools.md +0 -8
  206. data/examples/prompts_dir/weather.md +0 -2
  207. data/examples/prompts_dir/whats_new.md +0 -2
  208. data/examples/prompts_dir/with_timestamp.md +0 -5
  209. data/examples/requirements/sinatra_taskflow_app.md +0 -139
  210. data/examples/rules/01_classify_ruby.rb +0 -16
  211. data/examples/rules/02_prefer_claude_for_code.rb +0 -19
  212. data/examples/rules/03_gate_prompt_length.rb +0 -19
  213. data/examples/rules/04_tool_selection.rb +0 -41
  214. data/examples/rules/README.md +0 -30
  215. data/examples/run_all.sh +0 -294
  216. data/examples/tools/word_count_tool.rb +0 -30
  217. data/lib/AGENTS.md +0 -57
  218. data/lib/aia/model_switch_handler.rb +0 -100
  219. data/mcp_servers/README.md +0 -110
  220. data/mcp_servers/apple-mcp.json +0 -8
  221. data/mcp_servers/filesystem.json +0 -9
  222. data/mcp_servers/mcp_server_chart.json +0 -11
  223. data/mcp_servers/playwright_one.json +0 -8
  224. data/mcp_servers/playwright_server_definition.json +0 -9
  225. data/mcp_servers/playwright_two.json +0 -8
  226. data/mcp_servers/tavily_mcp_server.json +0 -8
  227. data/mkdocs.yml +0 -169
data/docs/index.md DELETED
@@ -1,259 +0,0 @@
1
- <!-- Tocer[start]: Auto-generated, don't remove. -->
2
-
3
- ## Table of Contents
4
-
5
- - [AIA - AI Assistant](#aia---ai-assistant)
6
- - [Key Features](#key-features)
7
- - [🚀 Dynamic Prompt Management](#-dynamic-prompt-management)
8
- - [🎭 Roles & 🎓 Skills](#-roles---skills)
9
- - [🔧 Powerful Integration](#-powerful-integration)
10
- - [💬 Interactive Chat Sessions](#-interactive-chat-sessions)
11
- - [🎯 Advanced Features](#-advanced-features)
12
- - [Quick Start](#quick-start)
13
- - [Core Architecture](#core-architecture)
14
- - [Component Overview](#component-overview)
15
- - [Core Components](#core-components)
16
- - [External Dependencies](#external-dependencies)
17
- - [Documentation Structure](#documentation-structure)
18
- - [Getting Started](#getting-started)
19
- - [Guides](#guides)
20
- - [Reference](#reference)
21
- - [Community & Support](#community--support)
22
- - [License](#license)
23
-
24
- <!-- Tocer[finish]: Auto-generated, don't remove. -->
25
-
26
- # AIA - AI Assistant
27
-
28
- <table border="0">
29
- <tr>
30
- <td width="30%" valign="top">
31
- <img src="assets/images/aia.png" alt="AIA - May I take your prompt?" width="200" />
32
- <div align="center">
33
- <strong>The Prompt is the Code</strong>
34
- </div>
35
- </td>
36
- <td width="70%" valign="top">
37
-
38
- Welcome to AIA, your powerful CLI tool for dynamic prompt management and AI interaction.
39
- <br/><br/>
40
- <strong>AIA (AI Assistant)</strong> is a Ruby-based command-line tool that revolutionizes how you interact with AI models. It's designed for generative AI workflows, enabling you to effortlessly manage AI prompts, integrate seamlessly with shell and embedded Ruby (ERB), run batch processes, and engage in interactive chats with user-defined directives, tools, and MCP clients.
41
- </td>
42
- </tr>
43
- </table>
44
-
45
- <div align="center">
46
- AIA treats prompts as executable programs, complete with configuration, logic, and workflows.
47
- </div>
48
-
49
- ---
50
-
51
- !!! tip "🚀 New: AI Assistant Scheduler (AIAS)"
52
-
53
- **Schedule and automate your AIA prompts!** AIAS is a new Ruby gem that lets you run AIA prompts on a cron-like schedule — perfect for recurring AI tasks, automated reports, and timed workflows.
54
-
55
- **[View AIAS on GitHub →](https://github.com/madbomber/aias)**
56
-
57
- ---
58
-
59
- !!! tip "🎭 Roles: Give Your Robot a Personality"
60
-
61
- Roles are plain-text prompt files that define how your AI thinks, talks, and interacts with you. Drop one in `~/.prompts/roles/` and your robot instantly becomes someone new.
62
-
63
- **For fun:**
64
- ```bash
65
- aia --chat --role pirate # Arrr, matey!
66
- aia --chat --role nyc_cabbie # opinions about EVERYTHING
67
- aia --chat --role stoned_hacker # solves it anyway, dude
68
- ```
69
-
70
- **For serious work:**
71
- ```bash
72
- # Explains quantum physics to your 7-year-old
73
- aia --chat --role first_grade_teacher
74
-
75
- # Three expert robots on the same design doc, simultaneously
76
- aia --model gpt-4o=architect,claude=security,gemini=performance design.md
77
- ```
78
-
79
- Assign a different role to each model and get multiple expert perspectives in one command. **[Full Roles Guide →](guides/models.md)**
80
-
81
- !!! tip "🎓 Skills: Teach Your Robot Your Process"
82
-
83
- Skills are structured instruction sets that tell your robot *exactly how* to approach a task — your workflow, your standards, every single time. Each skill is a directory with a `SKILL.md` file in `~/.prompts/skills/`.
84
-
85
- ```bash
86
- aia -s code-quality my_prompt # one skill
87
- aia -s code-quality,security-review my_prompt # stack them
88
- aia --chat --role senior_dev -s code-quality # role + skill
89
- /skill code-quality # add mid-chat
90
- ```
91
-
92
- Combine roles and skills: a pirate who follows your code review process, a first-grade teacher who uses your step-by-step explanation method, or multiple robots each with their own role and skill set — all from the command line. **[Full Skills Guide →](directives-reference.md)**
93
-
94
- ---
95
-
96
- ## Key Features
97
-
98
- ### 🚀 Dynamic Prompt Management
99
- - **Hierarchical Configuration**: Embedded directives > CLI args > environment variables > config files > defaults
100
- - **Prompt Sequences and Workflows**: Chain prompts together for complex AI workflows
101
- - **Fuzzy Search**: Find prompts quickly with fuzzy matching (requires `fzf`)
102
-
103
- ### 🎭 Roles & 🎓 Skills
104
- - **Robot Personalities**: Give any robot a voice — fun personas like a pirate or NYC cabbie, or professional ones like a senior architect or first-grade teacher
105
- - **Per-Model Roles**: Assign a different role to each model in a multi-model session — `--model gpt-4o=architect,claude=security`
106
- - **Reusable Skill Sets**: Encode your exact workflow once in a `SKILL.md` file; apply it to any prompt with `-s skill-name`
107
- - **Role + Skill Combos**: A robot can be *who you want* (role) and *know exactly what to do* (skill) simultaneously
108
- - **Mid-Chat Skills**: Add a skill to a running chat session with `/skill skill-name`
109
-
110
- ### 🔧 Powerful Integration
111
- - **Shell Integration**: Execute shell commands directly within prompts
112
- - **Ruby (ERB) Processing**: Use Ruby code in your prompts for dynamic content
113
- - **RubyLLM::Tool Support**: Function callbacks for enhanced AI capabilities
114
- - **MCP Client Support**: Integrate with Model Context Protocol clients
115
-
116
- ### 💬 Interactive Chat Sessions
117
- - **Context Management**: Maintain conversation history and context
118
- - **Multi-model Support**: Use multiple AI models simultaneously
119
- - **Consensus Mode**: Get consensus responses from multiple models
120
- - **Voice Support**: Convert text to speech and back
121
-
122
- ### 🎯 Advanced Features
123
- - **Executable Prompts**: Run prompts as executable scripts
124
- - **ERB Parameters**: Use embedded Ruby for dynamic prompt parameters
125
- - **Image Generation**: Generate images with customizable parameters
126
- - **Tool Integration**: Use custom Ruby tools for enhanced functionality
127
-
128
- ## Quick Start
129
-
130
- 1. **Install AIA:**
131
- ```bash
132
- gem install aia
133
- ```
134
-
135
- 2. **Install dependencies:**
136
- ```bash
137
- brew install fzf
138
- ```
139
-
140
- 3. **Create your first prompt:**
141
- ```bash
142
- mkdir -p ~/.prompts
143
- cat > ~/.prompts/what_is.md << 'EOF'
144
- ---
145
- parameters:
146
- topic: null
147
- ---
148
- What is <%= topic %>?
149
- EOF
150
- ```
151
-
152
- 4. **Run your prompt:**
153
- ```bash
154
- aia what_is
155
- ```
156
- You'll be prompted to enter a value for `topic`, then AIA will send your question to the AI model.
157
-
158
- 5. **Start an interactive chat:**
159
- ```bash
160
- aia --chat
161
-
162
- # Or use multiple models for comparison
163
- aia --chat --model "gpt-4o-mini,gpt-3.5-turbo"
164
- ```
165
-
166
- When AIA starts, you'll see the friendly robot mascot:
167
-
168
- ```plain
169
-
170
- , ,
171
- (\____/) AI Assistant (v1.0.0) is Online
172
- (_oo_) ["gpt-4o-mini", "claude-sonnet-4-20250514"]
173
- (O) using ruby_llm
174
- __||__ \) model db was last refreshed on
175
- [/______\] / 2026-02-04
176
- / \__AI__/ \/ You can share my tools
177
- / /__\
178
- (\ /____\
179
-
180
- ```
181
-
182
- ## Core Architecture
183
-
184
- AIA follows a modular Ruby gem structure with clear separation of concerns:
185
-
186
- ### Component Overview
187
-
188
- ```mermaid
189
- graph TD
190
- A[CLI Input] --> B[Config System]
191
- B --> C[Prompt Handler]
192
- C --> D[Directive Processor]
193
- D --> E[Context Manager]
194
- E --> F[RubyLLM Adapter]
195
- F --> G[AI Models]
196
-
197
- H[Prompt Files] --> C
198
- I[Role Files] --> C
199
- J[Tools] --> F
200
- K[MCP Clients] --> F
201
-
202
- C --> L[Chat Processor Service]
203
- L --> M[UI Presenter]
204
- M --> N[Terminal Output]
205
- ```
206
-
207
- ### Core Components
208
-
209
- - **AIA::Config** - Configuration management with hierarchical precedence
210
- - **AIA::PromptHandler** - Main prompt processing orchestrator
211
- - **AIA::ChatProcessorService** - Interactive chat session management
212
- - **AIA::DirectiveProcessor** - Processes embedded directives (`/command params`)
213
- - **AIA::RubyLLMAdapter** - Replaced in v2 by `RobotFactory` which builds `RobotLab::Robot` or `RobotLab::Network` instances powered by the `robot_lab` gem.
214
- - **AIA::RobotFactory** - Builds `RobotLab::Robot` or `RobotLab::Network` instances; the primary AI execution backend in v2
215
- - **AIA::ShellCommandExecutor** - Executes shell commands safely within prompts
216
- - **AIA::HistoryManager** - Manages prompt parameter history and user input
217
- - **AIA::UIPresenter** - Terminal output formatting and presentation
218
- - **AIA::Session** - Manages chat sessions and state
219
- - **AIA::Fzf** - Fuzzy finder integration for prompt selection
220
- - **AIA::Directives::Checkpoint** - Manages conversation checkpoints, restore, clear, and review operations
221
-
222
- ### External Dependencies
223
-
224
- - **prompt_manager gem** - Core prompt management functionality
225
- - **robot_lab gem** - Robot/network execution engine (replaces direct ruby_llm usage in v2)
226
- - **ruby_llm gem** - AI model interface layer (used internally by robot_lab)
227
- - **fzf** - Command-line fuzzy finder (external CLI tool)
228
-
229
- ## Documentation Structure
230
-
231
- ### Getting Started
232
- - [Installation](installation.md) - Get AIA up and running
233
- - [Configuration](configuration.md) - Configure AIA for your needs
234
- - [Getting Started Guide](guides/getting-started.md) - Your first steps with AIA
235
-
236
- ### Guides
237
- - [Chat Mode](guides/chat.md) - Interactive conversations with AI
238
- - [Working with Models](guides/models.md) - Multi-model support and configuration
239
- - [Tools Integration](guides/tools.md) - Extend AIA with custom tools
240
- - [Advanced Prompting](advanced-prompting.md) - Master complex prompt techniques
241
-
242
- ### Reference
243
- - [CLI Parameters](cli-reference.md) - Complete command-line reference
244
- - [Directives Reference](directives-reference.md) - All available directives
245
- - [Examples](examples/index.md) - Practical examples and use cases
246
-
247
- ## Community & Support
248
-
249
- - **GitHub**: [madbomber/aia](https://github.com/MadBomber/aia)
250
- - **Issues**: [Report bugs and request features](https://github.com/MadBomber/aia/issues)
251
- - **RubyGems**: [aia gem](https://rubygems.org/gems/aia)
252
-
253
- ## License
254
-
255
- AIA is open source software. See the [LICENSE](https://github.com/MadBomber/aia/blob/main/LICENSE) file for details.
256
-
257
- ---
258
-
259
- Ready to get started? Head to the [Installation](installation.md) guide to begin your AIA journey!
data/docs/installation.md DELETED
@@ -1,274 +0,0 @@
1
- <!-- Tocer[start]: Auto-generated, don't remove. -->
2
-
3
- ## Table of Contents
4
-
5
- - [Installation](#installation)
6
- - [Prerequisites](#prerequisites)
7
- - [Required](#required)
8
- - [Recommended](#recommended)
9
- - [Installation Methods](#installation-methods)
10
- - [Method 1: Install from RubyGems (Recommended)](#method-1-install-from-rubygems-recommended)
11
- - [Method 2: Install from Source](#method-2-install-from-source)
12
- - [Method 3: Using Bundler](#method-3-using-bundler)
13
- - [Verify Installation](#verify-installation)
14
- - [Initial Setup](#initial-setup)
15
- - [1. Create Prompts Directory](#1-create-prompts-directory)
16
- - [2. Create Configuration Directory](#2-create-configuration-directory)
17
- - [3. Basic Configuration File (Optional)](#3-basic-configuration-file-optional)
18
- - [4. Set Up API Keys](#4-set-up-api-keys)
19
- - [OpenAI](#openai)
20
- - [Anthropic Claude](#anthropic-claude)
21
- - [Google Gemini](#google-gemini)
22
- - [Ollama (Local models)](#ollama-local-models)
23
- - [Optional Dependencies](#optional-dependencies)
24
- - [Install fzf for Fuzzy Search](#install-fzf-for-fuzzy-search)
25
- - [macOS (using Homebrew)](#macos-using-homebrew)
26
- - [Ubuntu/Debian](#ubuntudebian)
27
- - [Other systems](#other-systems)
28
- - [Testing Your Installation](#testing-your-installation)
29
- - [1. Check Available Models](#1-check-available-models)
30
- - [2. Test Basic Functionality](#2-test-basic-functionality)
31
- - [3. Test Chat Mode](#3-test-chat-mode)
32
- - [Troubleshooting](#troubleshooting)
33
- - [Common Issues](#common-issues)
34
- - ["Command not found: aia"](#command-not-found-aia)
35
- - ["No models available"](#no-models-available)
36
- - ["fzf not found" warning](#fzf-not-found-warning)
37
- - [Permission errors](#permission-errors)
38
- - [Getting Help](#getting-help)
39
- - [Next Steps](#next-steps)
40
- - [Updating AIA](#updating-aia)
41
-
42
- <!-- Tocer[finish]: Auto-generated, don't remove. -->
43
-
44
- # Installation
45
-
46
- This guide will help you install AIA and get it running on your system.
47
-
48
- ## Prerequisites
49
-
50
- ### Required
51
- - **Ruby**: Version >= 4.0.0
52
- - **RubyGems**: Usually comes with Ruby
53
-
54
- ### Recommended
55
- - **fzf**: For fuzzy prompt searching
56
- - **git**: For prompt management with version control
57
-
58
- ## Installation Methods
59
-
60
- ### Method 1: Install from RubyGems (Recommended)
61
-
62
- The easiest way to install AIA is through RubyGems:
63
-
64
- ```bash
65
- gem install aia
66
- ```
67
-
68
- ### Method 2: Install from Source
69
-
70
- If you want the latest development version:
71
-
72
- ```bash
73
- git clone https://github.com/MadBomber/aia.git
74
- cd aia
75
- bundle install
76
- rake install
77
- ```
78
-
79
- ### Method 3: Using Bundler
80
-
81
- Add to your Gemfile:
82
-
83
- ```ruby
84
- gem 'aia'
85
- ```
86
-
87
- Then run:
88
-
89
- ```bash
90
- bundle install
91
- ```
92
-
93
- ## Verify Installation
94
-
95
- After installation, verify that AIA is working:
96
-
97
- ```bash
98
- aia --version
99
- ```
100
-
101
- You should see the version number printed.
102
-
103
- ## Initial Setup
104
-
105
- ### 1. Create Prompts Directory
106
-
107
- AIA stores prompts in a directory (default: `~/.prompts`). Create it:
108
-
109
- ```bash
110
- mkdir -p ~/.prompts
111
- ```
112
-
113
- ### 2. Create Configuration Directory
114
-
115
- Create the configuration directory (following XDG Base Directory Specification):
116
-
117
- ```bash
118
- mkdir -p ~/.config/aia
119
- ```
120
-
121
- ### 3. Basic Configuration File (Optional)
122
-
123
- Create a basic configuration file at `~/.config/aia/aia.yml`:
124
-
125
- ```yaml
126
- # Basic AIA configuration
127
- # Uses nested structure - see docs/configuration.md for full reference
128
-
129
- llm:
130
- temperature: 0.7
131
-
132
- models:
133
- - name: gpt-4o-mini
134
-
135
- prompts:
136
- dir: ~/.prompts
137
-
138
- flags:
139
- verbose: false
140
- ```
141
-
142
- ### 4. Set Up API Keys
143
-
144
- AIA uses the RubyLLM gem, which supports multiple AI providers. Set up your API keys as environment variables:
145
-
146
- #### OpenAI
147
- ```bash
148
- export OPENAI_API_KEY="your_openai_api_key_here"
149
- ```
150
-
151
- #### Anthropic Claude
152
- ```bash
153
- export ANTHROPIC_API_KEY="your_anthropic_api_key_here"
154
- ```
155
-
156
- #### Google Gemini
157
- ```bash
158
- export GOOGLE_API_KEY="your_google_api_key_here"
159
- ```
160
-
161
- #### Ollama (Local models)
162
- ```bash
163
- export OLLAMA_URL="http://localhost:11434"
164
- ```
165
-
166
- Add these to your shell profile (`.bashrc`, `.zshrc`, etc.) to make them permanent.
167
-
168
- ## Optional Dependencies
169
-
170
- ### Install fzf for Fuzzy Search
171
-
172
- AIA supports fuzzy searching for prompts using `fzf`. Install it:
173
-
174
- #### macOS (using Homebrew)
175
- ```bash
176
- brew install fzf
177
- ```
178
-
179
- #### Ubuntu/Debian
180
- ```bash
181
- apt-get install fzf
182
- ```
183
-
184
- #### Other systems
185
- See the [fzf installation guide](https://github.com/junegunn/fzf#installation).
186
-
187
- ## Testing Your Installation
188
-
189
- ### 1. Check Available Models
190
-
191
- ```bash
192
- aia --available-models
193
- ```
194
-
195
- This will show all available AI models.
196
-
197
- ### 2. Test Basic Functionality
198
-
199
- Create a simple prompt file:
200
-
201
- ```bash
202
- echo "Hello, what can you help me with today?" > ~/.prompts/hello.md
203
- ```
204
-
205
- Run it:
206
-
207
- ```bash
208
- aia hello
209
- ```
210
-
211
- ### 3. Test Chat Mode
212
-
213
- ```bash
214
- aia --chat
215
- ```
216
-
217
- This should start an interactive chat session.
218
-
219
- ## Troubleshooting
220
-
221
- ### Common Issues
222
-
223
- #### "Command not found: aia"
224
- - Make sure Ruby's bin directory is in your PATH
225
- - Try reinstalling: `gem uninstall aia && gem install aia`
226
-
227
- #### "No models available"
228
- - Check that your API keys are set correctly
229
- - Verify your internet connection
230
- - Try: `aia --available-models` to diagnose
231
-
232
- #### "fzf not found" warning
233
- - Install fzf as described above
234
- - Or disable fuzzy search: `aia --no-fuzzy`
235
-
236
- #### Permission errors
237
- - Try installing with: `gem install aia --user-install`
238
- - Or use `sudo` (not recommended): `sudo gem install aia`
239
-
240
- ### Getting Help
241
-
242
- If you encounter issues:
243
-
244
- 1. Check the [FAQ](faq.md)
245
- 2. Search existing [GitHub issues](https://github.com/MadBomber/aia/issues)
246
- 3. Create a new issue with:
247
- - Your OS and Ruby version
248
- - The exact error message
249
- - Steps to reproduce
250
-
251
- ## Next Steps
252
-
253
- Once AIA is installed:
254
-
255
- 1. Read the [Configuration Guide](configuration.md)
256
- 2. Follow the [Getting Started Guide](guides/getting-started.md)
257
- 3. Explore [Examples](examples/index.md)
258
-
259
- ## Updating AIA
260
-
261
- To update to the latest version:
262
-
263
- ```bash
264
- gem update aia
265
- ```
266
-
267
- Or if installed from source:
268
-
269
- ```bash
270
- cd path/to/aia
271
- git pull
272
- bundle install
273
- rake install
274
- ```