ruby_todo 0.4.1 → 1.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.
- checksums.yaml +4 -4
- data/.env.template +2 -0
- data/.rspec +1 -0
- data/CHANGELOG.md +10 -0
- data/README.md +56 -72
- data/ai_assistant_implementation.md +611 -0
- data/db/migrate/20240328_add_is_default_to_notebooks.rb +10 -0
- data/delete_notebooks.rb +20 -0
- data/implementation_steps.md +130 -0
- data/lib/ruby_todo/ai_assistant/common_query_handler.rb +378 -0
- data/lib/ruby_todo/ai_assistant/configuration_management.rb +27 -0
- data/lib/ruby_todo/ai_assistant/openai_integration.rb +333 -0
- data/lib/ruby_todo/ai_assistant/task_creation.rb +86 -0
- data/lib/ruby_todo/ai_assistant/task_management.rb +327 -0
- data/lib/ruby_todo/ai_assistant/task_search.rb +362 -0
- data/lib/ruby_todo/cli.rb +296 -146
- data/lib/ruby_todo/commands/ai_assistant.rb +449 -0
- data/lib/ruby_todo/database.rb +58 -84
- data/lib/ruby_todo/models/notebook.rb +44 -10
- data/lib/ruby_todo/version.rb +1 -1
- data/progress_ai_test.md +126 -0
- data/protectors_tasks.json +159 -0
- data/test_ai_assistant.rb +55 -0
- data/test_migration.rb +55 -0
- metadata +46 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 335ebe29df566a811eddbc67c2443bff069e45d3c6b93bc736d68a23e088358d
|
4
|
+
data.tar.gz: a3408be015a62fa83b971effc2ace94d6b02b34a26c31b13264fbab59af8f69e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c96743c0f93b769157410d51e0cad83a10bd589bd87bf69da09497e36e9fc3779578dbd4e63024fdf83a7774c06fcda05698e595911edb9e127e5f548f0e0e5
|
7
|
+
data.tar.gz: 00e42b86e41c16193c84fdda638a6ccea20ecdca4f4af7c583808e9be552189f78b1568ac649294a38e1dca9a6be828cfe2ef4f81b46c03f5365b2ba879c00cc
|
data/.env.template
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -12,6 +12,7 @@ A powerful CLI todo list manager with multi-notebook support and automated task
|
|
12
12
|
- Task statistics and analytics
|
13
13
|
- Task export and import (JSON, CSV)
|
14
14
|
- Task templates with placeholders
|
15
|
+
- AI assistant for natural language task management
|
15
16
|
- Beautiful CLI interface with colored output
|
16
17
|
- SQLite database for persistent storage
|
17
18
|
|
@@ -202,21 +203,6 @@ List all templates:
|
|
202
203
|
$ ruby_todo template list
|
203
204
|
```
|
204
205
|
|
205
|
-
Show template details:
|
206
|
-
```bash
|
207
|
-
$ ruby_todo template show "Weekly Report"
|
208
|
-
```
|
209
|
-
|
210
|
-
Use a template to create a task:
|
211
|
-
```bash
|
212
|
-
$ ruby_todo template use "Weekly Report" "Work" --replacements week="12"
|
213
|
-
```
|
214
|
-
|
215
|
-
Delete a template:
|
216
|
-
```bash
|
217
|
-
$ ruby_todo template delete "Weekly Report"
|
218
|
-
```
|
219
|
-
|
220
206
|
## Template Placeholders
|
221
207
|
|
222
208
|
Templates support the following placeholder types:
|
@@ -230,83 +216,81 @@ Templates support the following placeholder types:
|
|
230
216
|
- `{month}`: Current month
|
231
217
|
- `{year}`: Current year
|
232
218
|
|
233
|
-
##
|
234
|
-
|
235
|
-
After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests. You can also run `rubocop` to check the code style.
|
236
|
-
|
237
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
238
|
-
|
239
|
-
### CI/CD
|
240
|
-
|
241
|
-
This project uses GitHub Actions for continuous integration and delivery:
|
219
|
+
## AI Assistant
|
242
220
|
|
243
|
-
|
244
|
-
- **Release Workflow**: Automatically increments version number, updates CHANGELOG, creates a GitHub release, and publishes to RubyGems when code is pushed to the main branch
|
221
|
+
Ruby Todo includes an AI assistant powered by OpenAI's gpt-4o-mini model that can help you manage your tasks using natural language.
|
245
222
|
|
246
|
-
|
247
|
-
1. Increment the patch version
|
248
|
-
2. Update the CHANGELOG.md file
|
249
|
-
3. Run tests to ensure everything works
|
250
|
-
4. Build and publish the gem to RubyGems
|
251
|
-
5. Create a GitHub release
|
223
|
+
### Configuration
|
252
224
|
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/jeremiahparrack/ruby_todo.
|
258
|
-
|
259
|
-
## License
|
260
|
-
|
261
|
-
The gem is available as open source under the terms of the MIT License.
|
262
|
-
|
263
|
-
## Troubleshooting
|
225
|
+
Configure your AI assistant:
|
226
|
+
```bash
|
227
|
+
$ ruby_todo ai configure
|
228
|
+
```
|
264
229
|
|
265
|
-
###
|
230
|
+
### API Key Options
|
266
231
|
|
267
|
-
|
232
|
+
There are two ways to provide your OpenAI API key:
|
268
233
|
|
269
|
-
1.
|
234
|
+
1. **Configure once with the setup command** (recommended):
|
270
235
|
```bash
|
271
|
-
$
|
236
|
+
$ ruby_todo ai configure
|
272
237
|
```
|
238
|
+
This prompts you to enter your OpenAI API key and securely saves it in `~/.ruby_todo/ai_config.json`.
|
273
239
|
|
274
|
-
2.
|
240
|
+
2. **Use environment variables**:
|
275
241
|
```bash
|
276
|
-
$
|
242
|
+
$ export OPENAI_API_KEY=your_api_key_here
|
243
|
+
$ ruby_todo ai ask "your prompt"
|
277
244
|
```
|
278
245
|
|
279
|
-
3.
|
280
|
-
|
281
|
-
4. You may need to run:
|
282
|
-
```bash
|
283
|
-
$ rbenv rehash # If using rbenv
|
284
|
-
```
|
285
|
-
or
|
246
|
+
3. **Pass the API key directly in the command**:
|
286
247
|
```bash
|
287
|
-
$
|
248
|
+
$ ruby_todo ai ask "your prompt" --api-key=your_api_key_here
|
288
249
|
```
|
289
250
|
|
290
|
-
###
|
251
|
+
### Using the AI Assistant
|
252
|
+
|
253
|
+
Ask the AI assistant to perform actions:
|
254
|
+
```bash
|
255
|
+
$ ruby_todo ai ask "Create a new task in my Work notebook to update the documentation by next Friday"
|
256
|
+
```
|
257
|
+
|
258
|
+
```bash
|
259
|
+
$ ruby_todo ai ask "Move all tasks related to the API project to in_progress status"
|
260
|
+
```
|
291
261
|
|
292
|
-
|
262
|
+
```bash
|
263
|
+
$ ruby_todo ai ask "Show me all high priority tasks"
|
264
|
+
```
|
293
265
|
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
$ ruby_todo init
|
298
|
-
```
|
266
|
+
```bash
|
267
|
+
$ ruby_todo ai ask "Create a JSON to import 5 new tasks for my upcoming vacation"
|
268
|
+
```
|
299
269
|
|
300
|
-
|
301
|
-
```bash
|
302
|
-
$ ls -la ~/.ruby_todo/
|
303
|
-
```
|
270
|
+
#### Bulk Operations
|
304
271
|
|
305
|
-
|
272
|
+
The AI assistant can perform bulk operations on all tasks:
|
306
273
|
|
307
|
-
|
274
|
+
```bash
|
275
|
+
$ ruby_todo ai ask "Move all tasks to todo"
|
276
|
+
```
|
277
|
+
|
278
|
+
```bash
|
279
|
+
$ ruby_todo ai ask "Move all tasks to in_progress"
|
280
|
+
```
|
281
|
+
|
282
|
+
```bash
|
283
|
+
$ ruby_todo ai ask "Show me all task statistics"
|
284
|
+
```
|
285
|
+
|
286
|
+
Pass in an API key directly (if not configured):
|
287
|
+
```bash
|
288
|
+
$ ruby_todo ai ask "What tasks are overdue?" --api-key=your_api_key_here --api=claude
|
289
|
+
```
|
308
290
|
|
291
|
+
Enable verbose mode to see full AI responses:
|
309
292
|
```bash
|
310
|
-
$ ruby_todo --
|
311
|
-
$ ruby_todo task add --help
|
293
|
+
$ ruby_todo ai ask "Summarize my Work notebook" --verbose
|
312
294
|
```
|
295
|
+
|
296
|
+
## Development
|