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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a687c9f4bb0db9df671ccb741b37dc96ee9bef6e73c430d42d8de580f13a6969
4
- data.tar.gz: 74a004b0794125b2ee2e9db9a17579b6695969e1d0d56c7bc76a21f71cb9f94a
3
+ metadata.gz: 335ebe29df566a811eddbc67c2443bff069e45d3c6b93bc736d68a23e088358d
4
+ data.tar.gz: a3408be015a62fa83b971effc2ace94d6b02b34a26c31b13264fbab59af8f69e
5
5
  SHA512:
6
- metadata.gz: e5801730249eec150ebc2a10439581852e313bd0ed1e7d3ce62c412a33e8568b3cb769c335a9a763e13f30bf87914485563210720015c01a44cfd60ffc7365bb
7
- data.tar.gz: 5199b14e9005bcddd88e79fd2e0e3dbb0a506bdefb96582fc65c63fa8166b08cb4e895c3b644bf64e92871335dcd6bc30d2d7b62e56209a58d8d633a6e438773
6
+ metadata.gz: 6c96743c0f93b769157410d51e0cad83a10bd589bd87bf69da09497e36e9fc3779578dbd4e63024fdf83a7774c06fcda05698e595911edb9e127e5f548f0e0e5
7
+ data.tar.gz: 00e42b86e41c16193c84fdda638a6ccea20ecdca4f4af7c583808e9be552189f78b1568ac649294a38e1dca9a6be828cfe2ef4f81b46c03f5365b2ba879c00cc
data/.env.template ADDED
@@ -0,0 +1,2 @@
1
+ # OpenAI API key
2
+ OPENAI_API_KEY=your_openai_api_key_here
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [1.0.1] - 2025-03-28
2
+
3
+ * Manual release
4
+
5
+
6
+ ## [1.0.0] - 2025-03-28
7
+
8
+ * Manual release
9
+
10
+
1
11
  ## [0.4.1] - 2025-03-28
2
12
 
3
13
  * Manual release
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
- ## Development
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
- - **CI Workflow**: Runs tests and RuboCop on multiple Ruby versions for every push and pull request
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
- To release a new version, just merge your changes to the main branch. The automation will:
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
- For manual releases or version changes (major or minor), update the version in `lib/ruby_todo/version.rb` before merging to main.
254
-
255
- ## Contributing
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
- ### Command not found after installation
230
+ ### API Key Options
266
231
 
267
- If you see "command not found" after installing the gem, check the following:
232
+ There are two ways to provide your OpenAI API key:
268
233
 
269
- 1. Verify the gem is installed:
234
+ 1. **Configure once with the setup command** (recommended):
270
235
  ```bash
271
- $ gem list ruby_todo
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. Check your gem installation path:
240
+ 2. **Use environment variables**:
275
241
  ```bash
276
- $ gem environment
242
+ $ export OPENAI_API_KEY=your_api_key_here
243
+ $ ruby_todo ai ask "your prompt"
277
244
  ```
278
245
 
279
- 3. Make sure your PATH includes the gem bin directory shown in the environment output.
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
- $ rvm rehash # If using RVM
248
+ $ ruby_todo ai ask "your prompt" --api-key=your_api_key_here
288
249
  ```
289
250
 
290
- ### Database Issues
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
- If you encounter database issues:
262
+ ```bash
263
+ $ ruby_todo ai ask "Show me all high priority tasks"
264
+ ```
293
265
 
294
- 1. Try resetting the database:
295
- ```bash
296
- $ rm ~/.ruby_todo/ruby_todo.db
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
- 2. Check file permissions:
301
- ```bash
302
- $ ls -la ~/.ruby_todo/
303
- ```
270
+ #### Bulk Operations
304
271
 
305
- ### Getting Help
272
+ The AI assistant can perform bulk operations on all tasks:
306
273
 
307
- Run any command with `--help` to see available options:
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 --help
311
- $ ruby_todo task add --help
293
+ $ ruby_todo ai ask "Summarize my Work notebook" --verbose
312
294
  ```
295
+
296
+ ## Development