aia 0.5.8 โ†’ 0.5.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97bd3e1401d2883bca0d6ce3ab427a9fab12d3b71b2114a87fe278a0360f3693
4
- data.tar.gz: 0333f04542cde2c853ccd00aff70e90b9d680960020f5187ab0b265916c24a27
3
+ metadata.gz: 1cd315c42710fcff586cb6159b981fd3a1ba8c85cc950985dd46b93eb9b00ef1
4
+ data.tar.gz: c97d4f8db6bfc74f047ad439a6ddbddcdde72cd5dce614b1341c356a71bbad92
5
5
  SHA512:
6
- metadata.gz: 17395c59e8aabf7d4994236fd407beaf2231c6d05744af1fcd84ae588ad7ffcd4abd853096728ca50fb09976075b4ac920200e6732d7736d072e2d2a4071e7fb
7
- data.tar.gz: f8f21824485408330c31fe99b6b77fd072e08486ccd4293df9f9a55fc464369081f901f0bf6bc8c818e2238ad17d63ce497f164cd9960967d0f55942558c55c8
6
+ metadata.gz: 7cb087fe893bae9bf366c8cee81d4c35f329198a3508c475cbfd077661afff794299791d41b5af6faed0580e2a22eae9559ea69d6edad2a61705b81e54d52dd1
7
+ data.tar.gz: d76aba8685317e19ca534202a6dcce5ac61255702abc9e5f8ffd751c2f9ff778499048ac45a5ff7a5a5ffd5222e3249e5cd51a15398f20430f010d6900a27c99
@@ -0,0 +1,150 @@
1
+ {
2
+ "check_status": true,
3
+ "commit_type": {
4
+ "enable": true,
5
+ "initial_value": "feat",
6
+ "infer_type_from_branch": true,
7
+ "append_emoji_to_label": false,
8
+ "append_emoji_to_commit": false,
9
+ "options": [
10
+ {
11
+ "value": "feat",
12
+ "label": "feat",
13
+ "hint": "A new feature",
14
+ "emoji": "โœจ"
15
+ },
16
+ {
17
+ "value": "fix",
18
+ "label": "fix",
19
+ "hint": "A bug fix",
20
+ "emoji": "๐Ÿ›"
21
+ },
22
+ {
23
+ "value": "docs",
24
+ "label": "docs",
25
+ "hint": "Documentation only changes",
26
+ "emoji": "๐Ÿ“š"
27
+ },
28
+ {
29
+ "value": "refactor",
30
+ "label": "refactor",
31
+ "hint": "A code change that neither fixes a bug nor adds a feature",
32
+ "emoji": "๐Ÿ”จ"
33
+ },
34
+ {
35
+ "value": "perf",
36
+ "label": "perf",
37
+ "hint": "A code change that improves performance",
38
+ "emoji": "๐Ÿš€"
39
+ },
40
+ {
41
+ "value": "test",
42
+ "label": "test",
43
+ "hint": "Adding missing tests or correcting existing tests",
44
+ "emoji": "๐Ÿšจ"
45
+ },
46
+ {
47
+ "value": "build",
48
+ "label": "build",
49
+ "hint": "Changes that affect the build system or external dependencies",
50
+ "emoji": "๐Ÿšง"
51
+ },
52
+ {
53
+ "value": "ci",
54
+ "label": "ci",
55
+ "hint": "Changes to our CI configuration files and scripts",
56
+ "emoji": "๐Ÿค–"
57
+ },
58
+ {
59
+ "value": "chore",
60
+ "label": "chore",
61
+ "hint": "Other changes that do not modify src or test files",
62
+ "emoji": "๐Ÿงน"
63
+ },
64
+ {
65
+ "value": "",
66
+ "label": "none"
67
+ }
68
+ ]
69
+ },
70
+ "commit_scope": {
71
+ "enable": true,
72
+ "custom_scope": false,
73
+ "initial_value": "app",
74
+ "options": [
75
+ {
76
+ "value": "app",
77
+ "label": "app"
78
+ },
79
+ {
80
+ "value": "shared",
81
+ "label": "shared"
82
+ },
83
+ {
84
+ "value": "server",
85
+ "label": "server"
86
+ },
87
+ {
88
+ "value": "tools",
89
+ "label": "tools"
90
+ },
91
+ {
92
+ "value": "",
93
+ "label": "none"
94
+ }
95
+ ]
96
+ },
97
+ "check_ticket": {
98
+ "infer_ticket": true,
99
+ "confirm_ticket": true,
100
+ "add_to_title": true,
101
+ "append_hashtag": false,
102
+ "title_position": "start"
103
+ },
104
+ "commit_title": {
105
+ "max_size": 70
106
+ },
107
+ "commit_body": {
108
+ "enable": true,
109
+ "required": false
110
+ },
111
+ "commit_footer": {
112
+ "enable": true,
113
+ "initial_value": [],
114
+ "options": [
115
+ "closes",
116
+ "breaking-change",
117
+ "deprecated",
118
+ "custom"
119
+ ]
120
+ },
121
+ "breaking_change": {
122
+ "add_exclamation_to_title": true
123
+ },
124
+ "confirm_commit": true,
125
+ "print_commit_output": true,
126
+ "branch_pre_commands": [],
127
+ "branch_post_commands": [],
128
+ "worktree_pre_commands": [],
129
+ "worktree_post_commands": [],
130
+ "branch_user": {
131
+ "enable": true,
132
+ "required": false,
133
+ "separator": "/"
134
+ },
135
+ "branch_type": {
136
+ "enable": true,
137
+ "separator": "/"
138
+ },
139
+ "branch_ticket": {
140
+ "enable": true,
141
+ "required": false,
142
+ "separator": "_"
143
+ },
144
+ "branch_description": {
145
+ "max_length": 70
146
+ },
147
+ "branch_action_default": "branch",
148
+ "enable_worktrees": true,
149
+ "overrides": {}
150
+ }
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 8
4
+ :patch: 10
5
5
  :special: ''
6
6
  :metadata: ''
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.10] 2024-02-03
4
+ - Added --roles_dir to isolate roles from other prompts if desired
5
+ - Changed --prompts to --prompts_dir to be consistent
6
+ - Refactored common fzf usage into its own tool class
7
+
8
+ ## [0.5.9] 2024-02-01
9
+ - Added a "I'm working" spinner thing when "--verbose" is used as an indication that the backend is in the process of composing its response to the prompt.
10
+
3
11
  ## [0.5.8] 2024-01-17
4
12
  - Changed the behavior of the --dump option. It must now be followed by path/to/file.ext where ext is a supported config file format: yml, yaml, toml
5
13
 
data/README.md CHANGED
@@ -5,23 +5,17 @@
5
5
  It leverages the `prompt_manager` gem to manage prompts for the `mods` and `sgpt` CLI utilities. It utilizes "ripgrep" for searching for prompt files. It uses `fzf` for prompt selection based on a search term and fuzzy matching.
6
6
 
7
7
  **Most Recent Change**: Refer to the [Changelog](CHANGELOG.md)
8
- v0.5.7
9
- - Added ERB processing to config files that have the pattern any_file.ext.erb where ext is the real extension of the file.
10
8
 
11
- v0.5.6
12
- - Directives within a chat session follow up are now available
13
- - when the `--shell` option is set access to envars and shell scripts are availabe in a chat session follow up prompt
14
- - when the `--erb` option is set, access to ERB-based dynamic content is available in a chat session follow up prompt.
15
-
16
- v0.5.3
17
- - `--render` will render markdown formatted content to the terminal using the `glow` CLI utility.
18
- - fixes to some terminal UI stuff like AI response is not being wrapped to the terminal width to make for easier reading.
19
- - fixed the completion functions to use the correct $AIA_PROMPTS_DIR envar
20
-
21
- v0.5.0 - Breaking changes:
22
- - `--config` is now `--config_file`
23
- - `--env` is now `--shell`
24
- - `--output` is now `--out_file`
9
+ > v0.5.10
10
+ > - Added --roles_dir
11
+ > - Changed --prompts to --prompts_dir
12
+ > - Fixed Issue 33
13
+ >
14
+ > v0.5.9
15
+ > - When "--verbose" is used, an animation is shown while the backend is composing its response to the prompt.
16
+ >
17
+ > v0.5.7
18
+ > - Added ERB processing to config files that have the pattern any_file.ext.erb where ext is the real extension of the file.
25
19
 
26
20
  <!-- Tocer[start]: Auto-generated, don't remove. -->
27
21
 
@@ -42,10 +36,13 @@ v0.5.0 - Breaking changes:
42
36
  - [Backend Directive Commands](#backend-directive-commands)
43
37
  - [Using Directives in Chat Sessions](#using-directives-in-chat-sessions)
44
38
  - [All About ROLES](#all-about-roles)
39
+ - [The --roles_dir (AIA_ROLES_DIR)](#the---roles_dir-aia_roles_dir)
40
+ - [The --role Option](#the---role-option)
45
41
  - [Other Ways to Insert Roles into Prompts](#other-ways-to-insert-roles-into-prompts)
46
42
  - [External CLI Tools Used](#external-cli-tools-used)
47
43
  - [Shell Completion](#shell-completion)
48
44
  - [My Most Powerful Prompt](#my-most-powerful-prompt)
45
+ - [My Configuration](#my-configuration)
49
46
  - [Development](#development)
50
47
  - [Contributing](#contributing)
51
48
  - [License](#license)
@@ -66,7 +63,7 @@ Install the command-line utilities by executing:
66
63
 
67
64
  You will also need to establish a directory in your file system where your prompt text files, last used parameters and usage log files are kept.
68
65
 
69
- Setup a system environment variable named "AIA_PROMPTS_DIR" that points to your prompts directory. The default is in your HOME directory named ".prompts_dir"
66
+ Setup a system environment variable (envar) named "AIA_PROMPTS_DIR" that points to your prompts directory. The default is in your HOME directory named ".prompts". The envar "AIA_ROLES_DIR" points to your role directory where you have prompts that define the different roles you want the LLM to assume when it is doing its work. The default roles directory is inside the prompts directory. Its name is "roles".
70
67
 
71
68
  You may also want to install the completion script for your shell. To get a copy of the completion script do:
72
69
 
@@ -82,97 +79,126 @@ The usage report obtained using either `-h` or `--help` is implemented as a stan
82
79
  ```text
83
80
  $ aia --help
84
81
 
85
- aia(1) User Manuals aia(1)
82
+ aia(1) User Manuals aia(1)
86
83
 
87
84
  NAME
88
85
  aia - command-line interface for an AI assistant
89
86
 
90
87
  SYNOPSIS
91
- aia [options]* PROMPT_ID [CONTEXT_FILE]* [-- EXTERNAL_OPTIONS+]
88
+ aia [options]* PROMPT_ID [CONTEXT_FILE]* [--
89
+ EXTERNAL_OPTIONS+]
92
90
 
93
91
  DESCRIPTION
94
- The aia command-line tool is an interface for interacting with an AI model backend,
95
- providing a simple way to send prompts and receive responses. The CLI supports various
96
- options to customize the interaction, load a configuration file, edit prompts, set
97
- debugging levels, and more.
92
+ The aia command-line tool is an interface for interacting
93
+ with an AI model backend, providing a simple way to send
94
+ prompts and receive responses. The CLI supports various
95
+ options to customize the interaction, load a
96
+ configuration file, edit prompts, set debugging levels,
97
+ and more.
98
98
 
99
99
  ARGUMENTS
100
100
  PROMPT_ID
101
101
  This is a required argument.
102
102
 
103
103
  CONTEXT_FILES
104
- This is an optional argument. One or more files can be added to the prompt as
105
- context for the backend gen-AI tool to process.
104
+ This is an optional argument. One or more files
105
+ can be added to the prompt as context for the
106
+ backend gen-AI tool to process.
106
107
 
107
108
  EXTERNAL_OPTIONS
108
- External options are optional. Anything that follow โ€œ -- โ€œ will be sent to the
109
- backend gen-AI tool. For example โ€œ-- -C -m gpt4-128kโ€ will send the options
110
- โ€œ-C -m gpt4-128kโ€ to the backend gen-AI tool. aia will not validate these
111
- external options before sending them to the backend gen-AI tool.
109
+ External options are optional. Anything that
110
+ follow โ€œ -- โ€œ will be sent to the backend gen-AI
111
+ tool. For example โ€œ-- -C -m gpt4-128kโ€ will send
112
+ the options โ€œ-C -m gpt4-128kโ€ to the backend
113
+ gen-AI tool. aia will not validate these external
114
+ options before sending them to the backend gen-AI
115
+ tool.
112
116
 
113
117
  OPTIONS
114
- --chat begin a chat session with the backend after the initial prompt response; will
115
- set --no-out_file so that the backend response comes to STDOUT. After the
116
- initial prompt is processed, you will be asked to provide a follow up. Just
117
- enter whatever is appropriate terminating your input with a RETURN. The
118
- backend will provide a response to you follow up and ask you again if you have
119
- another follow up. This back and forth chatting will continue until you enter a
120
- RETURN without any other content - an empty follow up prompt. You may also
121
- enter a directive to be processed after which another follow up is requested.
122
- If you have the --shell and/or the --erb options set you may use those tools
123
- within your follow up to provide dynamic content.
118
+ --chat begin a chat session with the backend after the
119
+ initial prompt response; will set --no-out_file
120
+ so that the backend response comes to STDOUT.
121
+ After the initial prompt is processed, you will be
122
+ asked to provide a follow up. Just enter whatever
123
+ is appropriate terminating your input with a
124
+ RETURN. The backend will provide a response to
125
+ you follow up and ask you again if you have
126
+ another follow up. This back and forth chatting
127
+ will continue until you enter a RETURN without any
128
+ other content - an empty follow up prompt. You
129
+ may also enter a directive to be processed after
130
+ which another follow up is requested. If you have
131
+ the --shell and/or the --erb options set you may
132
+ use those tools within your follow up to provide
133
+ dynamic content.
124
134
 
125
135
  --completion SHELL_NAME
126
136
 
127
137
  --dump PATH/TO/FILE.ext
128
- Dump the current configuration to a file in the format denoted by the fileโ€™s
129
- extension. Currently only .yml, .yaml and .toml are acceptable file
130
- extensions. If the file exists, it will be over-written without warning.
138
+ Dump the current configuration to a file in the
139
+ format denoted by the fileโ€™s extension. Currently
140
+ only .yml, .yaml and .toml are acceptable file
141
+ extensions. If the file exists, it will be
142
+ over-written without warning.
131
143
 
132
144
  -e, --edit
133
- Invokes an editor on the prompt file. You can make changes to the prompt file,
134
- save it and the newly saved prompt will be processed by the backend.
145
+ Invokes an editor on the prompt file. You can
146
+ make changes to the prompt file, save it and the
147
+ newly saved prompt will be processed by the
148
+ backend.
135
149
 
136
150
  --shell
137
- This option tells aia to replace references to system environment variables in
138
- the prompt with the value of the envar. envars are like $HOME and ${HOME} in
139
- this example their occurance will be replaced by the value of ENV[โ€˜HOMEโ€™].
140
- Also the dynamic shell command in the pattern $(shell command) will be executed
141
- and its output replaces its pattern. It does not matter if your shell uses
142
- different patters than BASH since the replacement is being done within a Ruby
143
- context.
144
-
145
- --erb If dynamic prompt content using $(...) wasnโ€™t enough here is ERB. Embedded
146
- RUby. <%= ruby code %> within a prompt will have its ruby code executed and
147
- the results of that execution will be inserted into the prompt. Iโ€™m sure we
148
- will find a way to truly misuse this capability. Remember, some say that the
149
- simple prompt is the best prompt.
151
+ This option tells aia to replace references to
152
+ system environment variables in the prompt with
153
+ the value of the envar. envars are like $HOME and
154
+ ${HOME} in this example their occurance will be
155
+ replaced by the value of ENV[โ€˜HOMEโ€™]. Also the
156
+ dynamic shell command in the pattern $(shell
157
+ command) will be executed and its output replaces
158
+ its pattern. It does not matter if your shell
159
+ uses different patters than BASH since the
160
+ replacement is being done within a Ruby context.
161
+
162
+ --erb If dynamic prompt content using $(...) wasnโ€™t
163
+ enough here is ERB. Embedded RUby. <%= ruby code
164
+ %> within a prompt will have its ruby code
165
+ executed and the results of that execution will be
166
+ inserted into the prompt. Iโ€™m sure we will find a
167
+ way to truly misuse this capability. Remember,
168
+ some say that the simple prompt is the best
169
+ prompt.
150
170
 
151
171
  --model NAME
152
- Name of the LLM model to use - default is gpt-4-1106-preview
172
+ Name of the LLM model to use - default is
173
+ gpt-4-1106-preview
153
174
 
154
175
  --render
155
- Render markdown to the terminal using the external tool โ€œglowโ€ - default: false
176
+ Render markdown to the terminal using the external
177
+ tool โ€œglowโ€ - default: false
156
178
 
157
179
  --speak
158
- Simple implementation. Uses the โ€œsayโ€ command to speak the response. Fun with
159
- --chat
180
+ Simple implementation. Uses the โ€œsayโ€ command to
181
+ speak the response. Fun with --chat
160
182
 
161
183
  --terse
162
- Add a clause to the prompt text that instructs the backend to be terse in its
163
- response.
184
+ Add a clause to the prompt text that instructs the
185
+ backend to be terse in its response.
164
186
 
165
187
  --version
166
188
  Print Version - default is false
167
189
 
168
190
  -b, --[no]-backend LLM TOOL
169
- Specify the backend prompt resolver - default is mods
191
+ Specify the backend prompt resolver - default is
192
+ mods
170
193
 
171
194
  -c, --config_file PATH_TO_CONFIG_FILE
172
- Load Config File. both YAML and TOML formats are supported. Also ERB is
173
- supported. For example ~/aia_config.yml.erb will be processed through ERB and
174
- then through YAML. The result will be written out to ~/aia_config.yml so that
175
- you can manually verify that you got what you wanted from the ERB processing.
195
+ Load Config File. both YAML and TOML formats are
196
+ supported. Also ERB is supported. For example
197
+ ~/aia_config.yml.erb will be processed through ERB
198
+ and then through YAML. The result will be written
199
+ out to ~/aia_config.yml so that you can manually
200
+ verify that you got what you wanted from the ERB
201
+ processing.
176
202
 
177
203
  -d, --debug
178
204
  Turn On Debugging - default is false
@@ -181,13 +207,15 @@ OPTIONS
181
207
  Edit the Prompt File - default is false
182
208
 
183
209
  -f, --fuzzy`
184
- Use Fuzzy Matching when searching for a prompt - default is false
210
+ Use Fuzzy Matching when searching for a prompt -
211
+ default is false
185
212
 
186
213
  -h, --help
187
214
  Show Usage - default is false
188
215
 
189
216
  -l, --[no]-log_file PATH_TO_LOG_FILE
190
- Log FILEPATH - default is $HOME/.prompts/prompts.log
217
+ Log FILEPATH - default is
218
+ $HOME/.prompts/prompts.log
191
219
 
192
220
  -m, --[no]-markdown
193
221
  Format with Markdown - default is true
@@ -195,107 +223,143 @@ OPTIONS
195
223
  -o, --[no]-out_file PATH_TO_OUTPUT_FILE
196
224
  Out FILENAME - default is ./temp.md
197
225
 
198
- -p, --prompts PATH_TO_DIRECTORY
199
- Directory containing the prompt files - default is ~/.prompts
226
+ -p, --prompts_dir PATH_TO_DIRECTORY
227
+ Directory containing the prompt files - default is
228
+ ~/.prompts
229
+
230
+ --roles_dir PATH_TO_DIRECTORY
231
+ Directory containing the personification prompt
232
+ files - default is ~/.prompts/roles
200
233
 
201
234
  -r, --role ROLE_ID
202
- A role ID is the same as a prompt ID. A โ€œroleโ€ is a specialized prompt that
203
- gets pre-pended to another prompt. Itโ€™s purpose is to configure the LLM into a
204
- certain orientation within which to resolve its primary prompt.
235
+ A role ID is the same as a prompt ID. A โ€œroleโ€ is
236
+ a specialized prompt that gets pre-pended to
237
+ another prompt. Itโ€™s purpose is to configure the
238
+ LLM into a certain orientation within which to
239
+ resolve its primary prompt.
205
240
 
206
241
  -v, --verbose
207
242
  Be Verbose - default is false
208
243
 
209
244
  CONFIGURATION HIERARCHY
210
- System Environment Variables (envars) that are all uppercase and begin with โ€œAIA_โ€ can
211
- be used to over-ride the default configuration settings. For example setting โ€œexport
212
- AIA_PROMPTS_DIR=~/Documents/promptsโ€ will over-ride the default configuration;
213
- however, a config value provided by a command line options will over-ride an envar
214
- setting.
215
-
216
- Configuration values found in a config file will over-ride all other values set for a
217
- config item.
218
-
219
- โ€//configโ€ directives found inside a prompt file over-rides that config item
220
- regardless of where the value was set.
221
-
222
- For example โ€œ//config chat? = trueโ€ within a prompt will setup the chat back and forth
223
- chat session for that specific prompt regardless of the command line options or the
224
- envar AIA_CHAT settings
245
+ System Environment Variables (envars) that are all
246
+ uppercase and begin with โ€œAIA_โ€ can be used to over-ride
247
+ the default configuration settings. For example setting
248
+ โ€œexport AIA_PROMPTS_DIR=~/Documents/promptsโ€ will
249
+ over-ride the default configuration; however, a config
250
+ value provided by a command line options will over-ride
251
+ an envar setting.
252
+
253
+ Configuration values found in a config file will
254
+ over-ride all other values set for a config item.
255
+
256
+ โ€//configโ€ directives found inside a prompt file
257
+ over-rides that config item regardless of where the value
258
+ was set.
259
+
260
+ For example โ€œ//config chat? = trueโ€ within a prompt will
261
+ setup the chat back and forth chat session for that
262
+ specific prompt regardless of the command line options or
263
+ the envar AIA_CHAT settings
225
264
 
226
265
  OpenAI ACCOUNT IS REQUIRED
227
- Additionally, the program requires an OpenAI access key, which can be specified using
228
- one of the following environment variables:
266
+ Additionally, the program requires an OpenAI access key,
267
+ which can be specified using one of the following
268
+ environment variables:
229
269
 
230
270
  โ€ข OPENAI_ACCESS_TOKEN
231
271
 
232
272
  โ€ข OPENAI_API_KEY
233
273
 
234
- Currently there is not specific standard for name of the OpenAI key. Some programs
235
- use one name, while others use a different name. Both of the envars listed above mean
236
- the same thing. If you use more than one tool to access OpenAI resources, you may
237
- have to set several envars to the same key value.
274
+ Currently there is not specific standard for name of the
275
+ OpenAI key. Some programs use one name, while others use
276
+ a different name. Both of the envars listed above mean
277
+ the same thing. If you use more than one tool to access
278
+ OpenAI resources, you may have to set several envars to
279
+ the same key value.
238
280
 
239
- To acquire an OpenAI access key, first create an account on the OpenAI platform, where
240
- further documentation is available.
281
+ To acquire an OpenAI access key, first create an account
282
+ on the OpenAI platform, where further documentation is
283
+ available.
241
284
 
242
285
  USAGE NOTES
243
- aia is designed for flexibility, allowing users to pass prompt ids and context files
244
- as arguments. Some options change the behavior of the output, such as --out_file for
245
- specifying a file or --no-out_file for disabling file output in favor of standard
246
- output (STDPIT).
247
-
248
- The --completion option displays a script that enables prompt ID auto-completion for
249
- bash, zsh, or fish shells. Itโ€™s crucial to integrate the script into the shellโ€™s
286
+ aia is designed for flexibility, allowing users to pass
287
+ prompt ids and context files as arguments. Some options
288
+ change the behavior of the output, such as --out_file for
289
+ specifying a file or --no-out_file for disabling file
290
+ output in favor of standard output (STDPIT).
291
+
292
+ The --completion option displays a script that enables
293
+ prompt ID auto-completion for bash, zsh, or fish shells.
294
+ Itโ€™s crucial to integrate the script into the shellโ€™s
250
295
  runtime to take effect.
251
296
 
252
- The --dump path/to/file.ext option will write the current configuration to a file in
253
- the format requested by the fileโ€™s extension. The following extensions are supported:
254
- .yml, .yaml and .toml
297
+ The --dump path/to/file.ext option will write the current
298
+ configuration to a file in the format requested by the
299
+ fileโ€™s extension. The following extensions are
300
+ supported: .yml, .yaml and .toml
255
301
 
256
302
  PROMPT DIRECTIVES
257
- Within a prompt text file any line that begins with โ€œ//โ€ is considered a prompt
258
- directive. There are numerious prompt directives available. In the discussion above
259
- on the configuration you learned about the โ€œ//configโ€ directive.
303
+ Within a prompt text file any line that begins with โ€œ//โ€
304
+ is considered a prompt directive. There are numerious
305
+ prompt directives available. In the discussion above on
306
+ the configuration you learned about the โ€œ//configโ€
307
+ directive.
260
308
 
261
- Detail discussion on individual prompt directives is TBD. Most likely it will be
262
- handled in the github wiki <https://github.com/MadBomber/aia>
309
+ Detail discussion on individual prompt directives is TBD.
310
+ Most likely it will be handled in the github wiki
311
+ <https://github.com/MadBomber/aia>
263
312
 
264
313
  SEE ALSO
265
314
 
266
- โ€ข OpenAI Platform Documentation <https://platform.openai.com/docs/overview>
315
+ โ€ข OpenAI Platform Documentation
316
+ <https://platform.openai.com/docs/overview>
267
317
  for more information on obtaining access tokens
268
318
  <https://platform.openai.com/account/api-keys>
269
319
  and working with OpenAI models.
270
320
 
271
321
  โ€ข mods <https://github.com/charmbracelet/mods>
272
- for more information on mods - AI for the command line, built for pipelines.
273
- LLM based AI is really good at interpreting the output of commands and
274
- returning the results in CLI friendly text formats like Markdown. Mods is a
275
- simple tool that makes it super easy to use AI on the command line and in
276
- your pipelines. Mods works with OpenAI
322
+ for more information on mods - AI for the
323
+ command line, built for pipelines. LLM based AI
324
+ is really good at interpreting the output of
325
+ commands and returning the results in CLI
326
+ friendly text formats like Markdown. Mods is a
327
+ simple tool that makes it super easy to use AI
328
+ on the command line and in your pipelines. Mods
329
+ works with OpenAI
277
330
  <https://platform.openai.com/account/api-keys>
278
- and LocalAI <https://github.com/go-skynet/LocalAI>
331
+ and LocalAI
332
+ <https://github.com/go-skynet/LocalAI>
279
333
 
280
334
  โ€ข sgpt <https://github.com/tbckr/sgpt>
281
- (aka shell-gpt) is a powerful command-line interface (CLI) tool designed for
282
- seamless interaction with OpenAI models directly from your terminal.
283
- Effortlessly run queries, generate shell commands or code, create images from
284
- text, and more, using simple commands. Streamline your workflow and enhance
285
- productivity with this powerful and user-friendly CLI tool.
335
+ (aka shell-gpt) is a powerful command-line
336
+ interface (CLI) tool designed for seamless
337
+ interaction with OpenAI models directly from
338
+ your terminal. Effortlessly run queries,
339
+ generate shell commands or code, create images
340
+ from text, and more, using simple commands.
341
+ Streamline your workflow and enhance
342
+ productivity with this powerful and
343
+ user-friendly CLI tool.
286
344
 
287
345
  โ€ข fzf <https://github.com/junegunn/fzf>
288
- fzf is a general-purpose command-line fuzzy finder. Itโ€™s an interactive
289
- Unix filter for command-line that can be used with any list; files, command
290
- history, processes, hostnames, bookmarks, git commits, etc.
346
+ fzf is a general-purpose command-line fuzzy
347
+ finder. Itโ€™s an interactive Unix filter for
348
+ command-line that can be used with any list;
349
+ files, command history, processes, hostnames,
350
+ bookmarks, git commits, etc.
291
351
 
292
352
  โ€ข ripgrep <https://github.com/BurntSushi/ripgrep>
293
- Search tool like grep and The Silver Searcher. It is a line-oriented search
294
- tool that recursively searches a directory tree for a regex pattern. By
295
- default, ripgrep will respect gitignore rules and automatically skip hidden
296
- files/directories and binary files. (To disable all automatic filtering by
297
- default, use rg -uuu.) ripgrep has first class support on Windows, macOS and
298
- Linux, with binary downloads available for every release.
353
+ Search tool like grep and The Silver Searcher.
354
+ It is a line-oriented search tool that
355
+ recursively searches a directory tree for a
356
+ regex pattern. By default, ripgrep will respect
357
+ gitignore rules and automatically skip hidden
358
+ files/directories and binary files. (To disable
359
+ all automatic filtering by default, use rg
360
+ -uuu.) ripgrep has first class support on
361
+ Windows, macOS and Linux, with binary downloads
362
+ available for every release.
299
363
 
300
364
  โ€ข glow <https://github.com/charmbracelet/glow>
301
365
  Render markdown on the CLI
@@ -303,10 +367,9 @@ SEE ALSO
303
367
  AUTHOR
304
368
  Dewayne VanHoozer <dvanhoozer@gmail.com>
305
369
 
306
- AIA 2024-01-01 aia(1)
370
+ AIA v0.5.10 aia(1)
307
371
  ```
308
372
 
309
-
310
373
  ## Configuration Using Envars
311
374
 
312
375
  The `aia` configuration defaults can be over-ridden by system environment variables *(envars)* with the prefix "AIA_" followed by the config item name also in uppercase. All configuration items can be over-ridden in this way by an envar. The following table show a few examples.
@@ -444,7 +507,19 @@ The directive is executed and a new follow up prompt can be entered with a more
444
507
 
445
508
  ## All About ROLES
446
509
 
447
- `aia` provides the `--role` CLI option to identify a prompt ID within your prompts directory which defines the context within which the LLM is to provide its response. The text of the role ID is pre-pended to the text of the primary prompt to form a complete prompt to be processed by the backend.
510
+ ### The --roles_dir (AIA_ROLES_DIR)
511
+
512
+ There are two kinds of prompts
513
+ 1. instructional - tells the LLM what to do
514
+ 2. personification - tells the LLM who it should pretend to be when it does its transformational work.
515
+
516
+ That second kind of prompt is called a role. Sometimes the role is incorporated into the instruction. For example "As a magician make a rabbit appear out of a hat." To reuse the same role in multiple prompts `aia` encourages you to designate a special `roles_dir` into which you put prompts that are specific to personification - roles.
517
+
518
+ The default `roles_dir` is a sub-directory of the `prompts_dir` named roles. You can, however, put your `roles_dir` anywhere that makes sense to you.
519
+
520
+ ### The --role Option
521
+
522
+ The `--role` option is used to identify a personification prompt within your roles directory which defines the context within which the LLM is to provide its response. The text of the role ID is pre-pended to the text of the primary prompt to form a complete prompt to be processed by the backend.
448
523
 
449
524
  For example consider:
450
525
 
@@ -452,17 +527,17 @@ For example consider:
452
527
  aia -r ruby refactor my_class.rb
453
528
  ```
454
529
 
455
- Within the prompts directory the contents of the text file `ruby.txt` will be pre-pre-pended to the contents of the `refactor.txt` file to produce a complete prompt. That complete prompt will have any parameters then directives processed before sending the prompt text to the backend.
530
+ Within the roles directory the contents of the text file `ruby.txt` will be pre-pre-pended to the contents of the `refactor.txt` file from the prompts directory to produce a complete prompt. That complete prompt will have any parameters followed by directives processed before sending the combined prompt text to the backend.
456
531
 
457
532
  Note that `--role` is just a way of saying add this prompt text file to the front of this other prompt text file. The contents of the "role" prompt could be anything. It does not necessarily have be an actual role.
458
533
 
459
- You might consider have a sub-directory of your `prompts_dir` name `role` in which you put the prompt files that describe the various roles that you commonly use with your prompts. `aia` fully supports a directory tree within the `prompts_dir` as a way of organization or classification of your different prompt text files.
534
+ `aia` fully supports a directory tree within the `prompts_dir` as a way of organization or classification of your different prompt text files.
460
535
 
461
536
  ```shell
462
- aia -r roles/sw_eng doc_the_methods my_class.rb
537
+ aia -r sw_eng doc_the_methods my_class.rb
463
538
  ```
464
539
 
465
- In this example the prompt text file `$AIA_PROMPTS_DIR/roles/sw_eng.txt` is prepended to the prompt text file `$AIA_PROMPTS_DIR/doc_the_methods.txt`
540
+ In this example the prompt text file `$AIA_ROLES_DIR/sw_eng.txt` is prepended to the prompt text file `$AIA_PROMPTS_DIR/doc_the_methods.txt`
466
541
 
467
542
 
468
543
  ### Other Ways to Insert Roles into Prompts
@@ -473,7 +548,7 @@ Since `aia` supports parameterized prompts you could make a keyword like "[ROLE]
473
548
  As a [ROLE] tell me what you think about [SUBJECT]
474
549
  ```
475
550
 
476
- When this prompt is processed, `aia` will ask you for a value for the keyword "ROLE" and the keyword "SUBJECT" to complete the prompt. Since `aia` maintains a history your previous answers, you could just choose something that you used in the past or answer with a completely new value.
551
+ When this prompt is processed, `aia` will ask you for a value for the keyword "ROLE" and the keyword "SUBJECT" to complete the prompt. Since `aia` maintains a history of your previous answers, you could just choose something that you used in the past or answer with a completely new value.
477
552
 
478
553
  ## External CLI Tools Used
479
554
 
@@ -538,6 +613,40 @@ aia ad_hoc financial_statement.txt
538
613
 
539
614
  Both do the same thing; however, `aia` does not put the text of the prompt into the shell's history file.... of course the keyword/parameter value is saved in the prompt's JSON file and the prompt with the response are logged unless `--no-log` is specified; but, its not messing up the shell history!
540
615
 
616
+ ## My Configuration
617
+
618
+ I use the `bash` shell. In my `.bashrc` file I source another file named `.bashrc__aia` which looks like this:
619
+
620
+ ```shell
621
+ # ~/.bashic_aia
622
+ # AI Assistant
623
+
624
+ # These are the defaults:
625
+ export AIA_PROMPTS_DIR=~/.prompts
626
+ export AIA_OUT_FILE=./temp.md
627
+ export AIA_LOG_FILE=$AIA_PROMPTS_DIR/_prompts.log
628
+ export AIA_BACKEND=mods
629
+ export AIA_MODEL=gpt-4-1106-preview
630
+
631
+ # Not a default. Invokes spinner.
632
+ export AIA_VERBOSE=true
633
+
634
+ alias chat='aia chat --terse'
635
+
636
+ # rest of the file is the completion function
637
+ ```
638
+
639
+ Here is what my `chat` prompt file looks like:
640
+
641
+ ```shell
642
+ # ~/.prompts/chat.txt
643
+ # Desc: Start a chat session
644
+
645
+ //config chat? = true
646
+
647
+ [WHAT]
648
+ ```
649
+
541
650
  ## Development
542
651
 
543
652
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/justfile CHANGED
@@ -30,7 +30,11 @@ set dotenv-load := false
30
30
  pwd := env_var('PWD')
31
31
 
32
32
  me := justfile()
33
- home := env_var('HOME')
33
+
34
+ home := env_var('HOME')
35
+ downloads_dir := env_var('HOME') + "/Downloads/"
36
+ documents_dir := env_var('HOME') + "/Documents/"
37
+
34
38
  backup_dir := env_var('JUST_BACKUP_DIR')
35
39
  backup_file := trim_start_match(me, home)
36
40
  my_backup := backup_dir + backup_file
data/lib/aia/cli.rb CHANGED
@@ -154,7 +154,8 @@ class AIA::Cli
154
154
  role: ['', "-r --role"],
155
155
  #
156
156
  config_file:[nil, "-c --config_file"],
157
- prompts_dir:["~/.prompts", "-p --prompts"],
157
+ prompts_dir:["~/.prompts", "-p --prompts_dir"],
158
+ roles_dir: ["~/.prompts/roles", "--roles_dir"],
158
159
  out_file: [STDOUT, "-o --out_file --no-out_file"],
159
160
  log_file: ["~/.prompts/_prompts.log", "-l --log_file --no-log_file"],
160
161
  #
@@ -230,10 +231,14 @@ class AIA::Cli
230
231
 
231
232
  EOS
232
233
 
233
- show_usage
234
+ show_error_usage
234
235
 
235
236
  exit
236
237
  end
238
+
239
+ # After all other arguments
240
+ # are processed, check for role parameter.
241
+ check_for_role_parameter
237
242
  end
238
243
 
239
244
 
@@ -272,6 +277,56 @@ class AIA::Cli
272
277
  end
273
278
  end
274
279
 
280
+
281
+ def check_for_role_parameter
282
+ role = AIA.config.role
283
+ return if role.empty?
284
+
285
+ role_path = string_to_pathname(AIA.config.roles_dir) + "#{role}.txt"
286
+
287
+ unless role_path.exist?
288
+ puts "Role prompt '#{role}' not found. Invoking fzf to choose a role..."
289
+ invoke_fzf_to_choose_role
290
+ end
291
+ end
292
+
293
+
294
+ def invoke_fzf_to_choose_role
295
+ roles_path = string_to_pathname AIA.config.roles_dir
296
+
297
+ available_roles = roles_path
298
+ .children
299
+ .select { |f| '.txt' == f.extname}
300
+ .map{|role| role.basename.to_s.gsub('.txt','')}
301
+
302
+ fzf = AIA::Fzf.new(
303
+ list: available_roles,
304
+ directory: roles_path,
305
+ prompt: 'Select Role:',
306
+ extension: '.txt'
307
+ )
308
+
309
+ chosen_role = fzf.run
310
+
311
+ if chosen_role.nil?
312
+ abort("No role selected. Exiting...")
313
+ else
314
+ AIA.config.role = chosen_role
315
+ puts "Role changed to '#{chosen_role}'."
316
+ end
317
+ end
318
+
319
+
320
+ def show_error_usage
321
+ puts <<~ERROR_USAGE
322
+
323
+ Usage: aia [options] PROMPT_ID [CONTEXT_FILE(s)] [-- EXTERNAL_OPTIONS]"
324
+ Try 'aia --help' for more information."
325
+
326
+ ERROR_USAGE
327
+ end
328
+
329
+
275
330
  # aia usage is maintained in a man page
276
331
  def show_usage
277
332
  @options[:help?][0] = false
data/lib/aia/main.rb CHANGED
@@ -15,11 +15,15 @@ require_relative 'user_query'
15
15
  # of a single class.
16
16
 
17
17
  class AIA::Main
18
+ SPINNER_FORMAT = :bouncing_ball
19
+
18
20
  include AIA::DynamicContent
19
21
  include AIA::UserQuery
20
22
 
21
23
  attr_accessor :logger, :tools, :backend
22
24
 
25
+ attr_reader :spinner
26
+
23
27
  def initialize(args= ARGV)
24
28
  AIA::Tools.load_tools
25
29
 
@@ -31,6 +35,9 @@ class AIA::Main
31
35
  ]}
32
36
  end
33
37
 
38
+ @spinner = TTY::Spinner.new(":spinner :title", format: SPINNER_FORMAT)
39
+ spinner.update(title: "composing response ... ")
40
+
34
41
  @logger = AIA::Logging.new(AIA.config.log_file)
35
42
 
36
43
  @logger.info(AIA.config) if AIA.config.debug? || AIA.config.verbose?
@@ -118,9 +125,15 @@ class AIA::Main
118
125
 
119
126
 
120
127
  def get_and_display_result(the_prompt_text)
128
+ spinner.auto_spin if AIA.config.verbose?
129
+
121
130
  backend.text = the_prompt_text
122
131
  result = backend.run
123
132
 
133
+ if AIA.config.verbose?
134
+ spinner.success "Done."
135
+ end
136
+
124
137
  AIA.config.out_file.write "\nResponse:\n"
125
138
 
126
139
  if STDOUT == AIA.config.out_file
data/lib/aia/prompt.rb CHANGED
@@ -32,9 +32,7 @@ class AIA::Prompt
32
32
  if AIA.config.role.empty?
33
33
  @role = nil
34
34
  else
35
- AIA.config.arguments.prepend AIA.config.role
36
- get_prompt
37
- @role = @prompt.dup
35
+ @role = (AIA.config.roles_dir + "#{AIA.config.role}.txt").read
38
36
  end
39
37
 
40
38
  get_prompt
@@ -42,7 +40,7 @@ class AIA::Prompt
42
40
  @prompt_text_before_role = @prompt.text.dup
43
41
 
44
42
  unless @role.nil?
45
- @prompt.text.prepend @role.text
43
+ @prompt.text.prepend @role
46
44
  end
47
45
 
48
46
  if build
@@ -200,37 +198,18 @@ class AIA::Prompt
200
198
 
201
199
  def handle_multiple_prompts(found_these, while_looking_for_this)
202
200
  raise ArgumentError, "Argument is not an Array" unless found_these.is_a?(Array)
203
-
204
- # TODO: Make this a class constant for defaults; make the header content
205
- # a parameter so it can be varied.
206
- fzf_options = [
207
- "--tabstop=2", # 2 soaces for a tab
208
- "--header='Prompt IDs which contain: #{while_looking_for_this}\nPress ESC to cancel.'",
209
- "--header-first",
210
- "--prompt='Search term: '",
211
- '--delimiter :',
212
- "--preview 'cat #{AIA.config.prompts_dir}/{1}.txt'",
213
- "--preview-window=down:50%:wrap"
214
- ].join(' ')
215
-
216
-
217
- # Create a temporary file to hold the list of strings
218
- temp_file = Tempfile.new('fzf-input')
219
-
220
- begin
221
- # Write all strings to the temp file
222
- temp_file.puts(found_these)
223
- temp_file.close
224
-
225
- # Execute fzf command-line utility to allow selection
226
- selected = `cat #{temp_file.path} | fzf #{fzf_options}`.strip
227
-
228
- # Check if fzf actually returned a string; if not, return nil
229
- result = selected.empty? ? nil : selected
230
- ensure
231
- # Ensure that the tempfile is closed and unlinked
232
- temp_file.unlink
233
- end
201
+
202
+ # Create an instance of AIA::Fzf with appropriate parameters
203
+ fzf_instance = AIA::Fzf.new(
204
+ list: found_these,
205
+ directory: AIA.config.prompts_dir, # Assuming this is the correct directory
206
+ query: while_looking_for_this,
207
+ subject: 'Prompt IDs',
208
+ prompt: 'Select one: '
209
+ )
210
+
211
+ # Run the fzf instance and get the selected result
212
+ result = fzf_instance.run
234
213
 
235
214
  exit unless result
236
215
 
@@ -238,6 +217,8 @@ class AIA::Prompt
238
217
  end
239
218
 
240
219
 
220
+
221
+
241
222
  def create_prompt(prompt_id)
242
223
  @prompt = PromptManager::Prompt.create(id: prompt_id)
243
224
  # TODO: consider a configurable prompt template
@@ -0,0 +1,105 @@
1
+ # lib/aia/tools/fzf.rb
2
+ # fzf is a general-purpose command-line fuzzy finder
3
+
4
+ require 'shellwords'
5
+ require 'tempfile'
6
+
7
+ class AIA::Fzf < AIA::Tools
8
+
9
+ meta(
10
+ name: 'fzf',
11
+ role: :search_tool,
12
+ desc: "A command-line fuzzy finder",
13
+ url: "https://github.com/junegunn/fzf",
14
+ install: "brew install fzf",
15
+ )
16
+
17
+ DEFAULT_PARAMETERS = %w[
18
+ --tabstop=2
19
+ --header-first
20
+ --prompt='Search term: '
21
+ --delimiter :
22
+ --preview-window=down:50%:wrap
23
+ ]
24
+
25
+ attr_reader :list, :directory, :query, :subject, :prompt, :extension, :command
26
+
27
+ def initialize(
28
+ list:, # Array of Strings (basenames of files w/o extension)
29
+ directory:, # Parent directory of the list items
30
+ query: '', # String, the thing be searched for
31
+ subject: 'Prompt IDs', # or 'Role Names'
32
+ prompt: 'Select one:',
33
+ extension: '.txt'
34
+ )
35
+
36
+ @list = list
37
+ @directory = directory
38
+ @query = query
39
+ @subject = subject
40
+ @prompt = prompt
41
+ @extension = extension
42
+
43
+ build_command
44
+ end
45
+
46
+
47
+ def build_command
48
+ fzf_options = DEFAULT_PARAMETERS.dup
49
+ fzf_options << "--header='#{subject} which contain: #{query}\\nPress ESC to cancel.'"
50
+ fzf_options << "--preview='cat #{directory}/{1}#{extension}'"
51
+ fzf_options << "--prompt=#{Shellwords.escape(prompt)}"
52
+
53
+ fzf_command = "#{meta.name} #{fzf_options.join(' ')}"
54
+
55
+ @command = "cat #{tempfile_path} | #{fzf_command}"
56
+ end
57
+
58
+
59
+ def run
60
+ puts "Executing: #{@command}"
61
+ selected = `#{@command}`
62
+ selected.strip.empty? ? nil : selected.strip
63
+ ensure
64
+ unlink_tempfile
65
+ end
66
+
67
+ ##############################################
68
+ private
69
+
70
+ def tempfile_path
71
+ @tempfile ||= Tempfile.new('fzf-input').tap do |file|
72
+ list.each { |item| file.puts item }
73
+ file.close
74
+ end
75
+ @tempfile.path
76
+ end
77
+
78
+ def unlink_tempfile
79
+ @tempfile&.unlink
80
+ end
81
+ end
82
+
83
+
84
+ __END__
85
+
86
+ $ fzf --help
87
+
88
+ USAGE
89
+ fzf [OPTIONS]
90
+
91
+ OPTIONS
92
+ -x, --extended Extended-search mode
93
+ -e, --exact Enable Exact-match
94
+ --algo=TYPE Fuzzy matching algorithm: [v1|v2] (default: v2)
95
+ +i Case-insensitive match (default: smart-case match)
96
+ +s Synchronous search for multi-staged filtering
97
+ --multi Enable multi-select with tab/shift-tab
98
+
99
+ ... (Other options)
100
+
101
+ EXAMPLES
102
+ find * -type f | fzf > selected
103
+ fzf < /path/to/file_list
104
+
105
+ For full documentation, please visit https://github.com/junegunn/fzf.
data/lib/aia.rb CHANGED
@@ -23,7 +23,15 @@ require 'hashie'
23
23
  require 'pathname'
24
24
  require 'reline'
25
25
  require 'shellwords'
26
- require 'tempfile'
26
+ require 'tempfile' # SMELL: is this still being used?
27
+
28
+ require 'tty-spinner'
29
+
30
+ unless TTY::Spinner.new.respond_to?(:log)
31
+ # Allows messages to be sent to the console while
32
+ # the spinner is still spinning.
33
+ require_relative './core_ext/tty-spinner_log'
34
+ end
27
35
 
28
36
  require 'prompt_manager'
29
37
  require 'prompt_manager/storage/file_system_adapter'
@@ -0,0 +1,25 @@
1
+ # aia/lib/core_ext/tty-spinner_log.rb
2
+ #
3
+ # The gem's README shows the log method; bit the
4
+ # author has been spinning his wheels since 2021 on pushing a release
5
+ # with it. This is a stop gap.
6
+
7
+ module TTY
8
+ class Spinner
9
+ # Log a message to the output
10
+ # This will clear the current spinner line, print the log message,
11
+ # and then redraw or resume the spinner on a new line.
12
+ #
13
+ # @param [String] message
14
+ # the log message to print
15
+ #
16
+ # @api public
17
+ def log(message)
18
+ synchronize do
19
+ clear_line # Clear the spinner
20
+ output.puts(message) # Log the message
21
+ redraw_indent # Redraw the spinner frame
22
+ end
23
+ end
24
+ end
25
+ end
data/man/aia.1 CHANGED
@@ -1,6 +1,6 @@
1
1
  .\" Generated by kramdown-man 1.0.1
2
2
  .\" https://github.com/postmodern/kramdown-man#readme
3
- .TH aia 1 "2024-01-01" AIA "User Manuals"
3
+ .TH aia 1 "v0.5.10" AIA "User Manuals"
4
4
  .SH NAME
5
5
  .PP
6
6
  aia \- command\-line interface for an AI assistant
@@ -81,9 +81,12 @@ Format with Markdown \- default is true
81
81
  \fB\-o\fR, \fB\-\-\[lB]no\[rB]\-out\[ru]file\fR \fIPATH\[ru]TO\[ru]OUTPUT\[ru]FILE\fP
82
82
  Out FILENAME \- default is \.\[sl]temp\.md
83
83
  .TP
84
- \fB\-p\fR, \fB\-\-prompts\fR \fIPATH\[ru]TO\[ru]DIRECTORY\fP
84
+ \fB\-p\fR, \fB\-\-prompts\[ru]dir\fR \fIPATH\[ru]TO\[ru]DIRECTORY\fP
85
85
  Directory containing the prompt files \- default is \[ti]\[sl]\.prompts
86
86
  .TP
87
+ \fB\-\-roles\[ru]dir\fR \fIPATH\[ru]TO\[ru]DIRECTORY\fP
88
+ Directory containing the personification prompt files \- default is \[ti]\[sl]\.prompts\[sl]roles
89
+ .TP
87
90
  \fB\-r\fR, \fB\-\-role\fR \fIROLE\[ru]ID\fP
88
91
  A role ID is the same as a prompt ID\. A \[lq]role\[rq] is a specialized prompt that gets pre\-pended to another prompt\. It\[cq]s purpose is to configure the LLM into a certain orientation within which to resolve its primary prompt\.
89
92
  .TP
data/man/aia.1.md CHANGED
@@ -1,4 +1,4 @@
1
- # aia 1 "2024-01-01" AIA "User Manuals"
1
+ # aia 1 "v0.5.10" AIA "User Manuals"
2
2
 
3
3
  ## NAME
4
4
 
@@ -85,9 +85,12 @@ The aia command-line tool is an interface for interacting with an AI model backe
85
85
  `-o`, `--[no]-out_file` *PATH_TO_OUTPUT_FILE*
86
86
  : Out FILENAME - default is ./temp.md
87
87
 
88
- `-p`, `--prompts` *PATH_TO_DIRECTORY*
88
+ `-p`, `--prompts_dir` *PATH_TO_DIRECTORY*
89
89
  : Directory containing the prompt files - default is ~/.prompts
90
90
 
91
+ `--roles_dir` *PATH_TO_DIRECTORY*
92
+ : Directory containing the personification prompt files - default is ~/.prompts/roles
93
+
91
94
  `-r`, `--role` *ROLE_ID*
92
95
  : A role ID is the same as a prompt ID. A "role" is a specialized prompt that gets pre-pended to another prompt. It's purpose is to configure the LLM into a certain orientation within which to resolve its primary prompt.
93
96
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dewayne VanHoozer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-18 00:00:00.000000000 Z
11
+ date: 2024-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
@@ -225,6 +225,7 @@ executables:
225
225
  extensions: []
226
226
  extra_rdoc_files: []
227
227
  files:
228
+ - ".better-commits.json"
228
229
  - ".config/tocer/configuration.yml"
229
230
  - ".envrc"
230
231
  - ".semver"
@@ -250,6 +251,7 @@ files:
250
251
  - lib/aia/tools.rb
251
252
  - lib/aia/tools/backend_common.rb
252
253
  - lib/aia/tools/editor.rb
254
+ - lib/aia/tools/fzf.rb
253
255
  - lib/aia/tools/glow.rb
254
256
  - lib/aia/tools/mods.rb
255
257
  - lib/aia/tools/sgpt.rb
@@ -258,6 +260,7 @@ files:
258
260
  - lib/aia/user_query.rb
259
261
  - lib/aia/version.rb
260
262
  - lib/core_ext/string_wrap.rb
263
+ - lib/core_ext/tty-spinner_log.rb
261
264
  - main.just
262
265
  - man/aia.1
263
266
  - man/aia.1.md
@@ -284,7 +287,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
284
287
  - !ruby/object:Gem::Version
285
288
  version: '0'
286
289
  requirements: []
287
- rubygems_version: 3.5.4
290
+ rubygems_version: 3.5.5
288
291
  signing_key:
289
292
  specification_version: 4
290
293
  summary: AI Assistant (aia) a command-line (CLI) utility