todo-agent 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,282 @@
1
+ Metadata-Version: 2.4
2
+ Name: todo-agent
3
+ Version: 0.1.0
4
+ Summary: A natural language interface for todo.sh task management
5
+ Author: codeprimate
6
+ Maintainer: codeprimate
7
+ License-Expression: GPL-3.0
8
+ Project-URL: Homepage, https://github.com/codeprimate/todo_agent
9
+ Project-URL: Documentation, https://github.com/codeprimate/todo_agent#readme
10
+ Project-URL: Repository, https://github.com/codeprimate/todo_agent
11
+ Project-URL: Bug Tracker, https://github.com/codeprimate/todo_agent/issues
12
+ Keywords: todo,task-management,llm,natural-language,cli
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: End Users/Desktop
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Topic :: Office/Business :: Scheduling
24
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
+ Classifier: Topic :: Text Processing :: Linguistic
26
+ Requires-Python: >=3.8
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: requests>=2.31.0
30
+ Requires-Dist: typing-extensions>=4.8.0
31
+ Requires-Dist: types-requests>=2.31.0
32
+ Requires-Dist: rich>=13.0.0
33
+ Requires-Dist: tiktoken>=0.5.0
34
+ Provides-Extra: dev
35
+ Requires-Dist: black>=23.0.0; extra == "dev"
36
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
37
+ Requires-Dist: isort>=5.12.0; extra == "dev"
38
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
39
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
40
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
41
+ Requires-Dist: pre-commit>=3.0.0; extra == "dev"
42
+ Requires-Dist: bandit>=1.7.0; extra == "dev"
43
+ Requires-Dist: safety>=2.3.0; extra == "dev"
44
+ Requires-Dist: sphinx>=6.0.0; extra == "dev"
45
+ Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == "dev"
46
+ Requires-Dist: radon>=5.1.0; extra == "dev"
47
+ Requires-Dist: xenon>=0.7.0; extra == "dev"
48
+ Requires-Dist: build>=1.0.0; extra == "dev"
49
+ Requires-Dist: twine>=4.0.0; extra == "dev"
50
+ Requires-Dist: setuptools_scm[toml]>=6.2.0; extra == "dev"
51
+ Dynamic: license-file
52
+
53
+ # Todo Agent
54
+
55
+ A natural language interface for [todo.sh](https://github.com/todotxt/todo.txt-cli) task management powered by LLM function calling.
56
+
57
+ ## What it does
58
+
59
+ Transform natural language into todo.sh commands:
60
+
61
+ ```bash
62
+ # Use interactively
63
+ todo-agent
64
+ # Instead of: todo.sh add "Buy groceries +shopping"
65
+ todo-agent "add buy groceries to shopping list"
66
+ # Instead of: todo.sh list +work
67
+ todo-agent "show my work tasks"
68
+ ```
69
+
70
+ ## Quick Start
71
+
72
+ ### 1. Install
73
+
74
+ #### Prerequisites
75
+
76
+ **Install todo.sh (required)**
77
+
78
+ todo.sh is the underlying task management system that todo-agent interfaces with.
79
+
80
+ **macOS:**
81
+ ```bash
82
+ # Using Homebrew
83
+ brew install todo-txt
84
+ # Or using MacPorts
85
+ sudo port install todo-txt
86
+ ```
87
+
88
+ **Linux:**
89
+ ```bash
90
+ # Ubuntu/Debian
91
+ sudo apt-get install todo-txt-cli
92
+ # CentOS/RHEL/Fedora
93
+ sudo yum install todo-txt-cli
94
+ # or
95
+ sudo dnf install todo-txt-cli
96
+ # Arch Linux
97
+ sudo pacman -S todo-txt-cli
98
+ ```
99
+
100
+ **Windows:**
101
+ ```bash
102
+ # Using Chocolatey
103
+ choco install todo-txt-cli
104
+ # Using Scoop
105
+ scoop install todo-txt-cli
106
+ ```
107
+
108
+ **From source:**
109
+ ```bash
110
+ git clone https://github.com/todotxt/todo.txt-cli.git
111
+ cd todo.txt-cli
112
+ make
113
+ sudo make install
114
+ ```
115
+
116
+ #### Configure todo.sh
117
+
118
+ After installing todo.sh, you need to set up your todo.txt repository:
119
+
120
+ ```bash
121
+ # Create a directory for your todo files
122
+ mkdir ~/todo
123
+ cd ~/todo
124
+
125
+ # Initialize todo.sh (this creates the initial todo.txt file)
126
+ todo.sh init
127
+
128
+ # Verify installation
129
+ todo.sh version
130
+ ```
131
+
132
+ **Important:** Set the `TODO_DIR` environment variable to point to your todo.txt repository:
133
+
134
+ ```bash
135
+ export TODO_DIR="$HOME/todo"
136
+ ```
137
+
138
+ You can add this to your shell profile (`.bashrc`, `.zshrc`, etc.) to make it permanent.
139
+
140
+ #### Install todo-agent
141
+
142
+ ```bash
143
+ # Clone and install from source
144
+ git clone https://github.com/codeprimate/todo-agent.git
145
+ cd todo_agent
146
+ pip install -e .
147
+
148
+ # Or with development dependencies
149
+ pip install -e ".[dev]"
150
+ ```
151
+
152
+ ### 2. Set up your LLM provider
153
+
154
+ **Option A: OpenRouter (recommended)**
155
+ ```bash
156
+ export OPENROUTER_API_KEY="your-api-key-here"
157
+ ```
158
+
159
+ **Option B: Ollama (local)**
160
+ ```bash
161
+ # Install and start Ollama
162
+ ollama pull mistral-small3.1
163
+
164
+ # Configure environment
165
+ export LLM_PROVIDER=ollama
166
+ export OLLAMA_MODEL=mistral-small3.1
167
+ ```
168
+
169
+ ### 3. Use it
170
+
171
+ ```bash
172
+ # Interactive mode
173
+ todo-agent
174
+
175
+ # Single command
176
+ todo-agent "add urgent meeting with team +work @office"
177
+ ```
178
+
179
+ ## Examples
180
+
181
+ ### Task Management
182
+ ```bash
183
+ todo-agent "add buy groceries to shopping list"
184
+ todo-agent "list my work tasks"
185
+ todo-agent "complete the shopping task"
186
+ todo-agent "delete task 5"
187
+ ```
188
+
189
+ ### Task Modification
190
+ ```bash
191
+ todo-agent "change task 2 to buy organic milk"
192
+ todo-agent "add urgent to task 1"
193
+ todo-agent "set task 3 as high priority"
194
+ ```
195
+
196
+ ### Discovery
197
+ ```bash
198
+ todo-agent "what projects do I have?"
199
+ todo-agent "show completed tasks"
200
+ todo-agent "list my contexts"
201
+ ```
202
+
203
+ ## Configuration
204
+
205
+
206
+ ### Configuration Variables
207
+
208
+ | Variable | Description | Default | Required |
209
+ |-----------------------|-------------------------------------------|------------------------|-------------------------------|
210
+ | `LLM_PROVIDER` | LLM provider: `openrouter` or `ollama` | `openrouter` | No (defaults to `openrouter`) |
211
+ | `TODO_DIR` | Path to your todo.txt repository | — | **Yes** |
212
+ | `OPENROUTER_API_KEY` | Your OpenRouter API key | — | Yes (if using OpenRouter) |
213
+ | `OLLAMA_MODEL` | Model name for Ollama | `mistral-small3.1` | No |
214
+ | `LOG_LEVEL` | Logging verbosity (`INFO`, `DEBUG`, etc.) | `INFO` | No |
215
+
216
+ **Note:**
217
+ - `TODO_DIR` is required for all configurations.
218
+ - `OPENROUTER_API_KEY` is only required if you use the OpenRouter provider.
219
+ - The `TODO_FILE`, `DONE_FILE`, and `REPORT_FILE` are automatically inferred from `TODO_DIR`.
220
+
221
+ The `TODO_FILE`, `DONE_FILE`, and `REPORT_FILE` are automatically inferred from `TODO_DIR`.
222
+
223
+ ## Development
224
+
225
+ ```bash
226
+ # Clone and install
227
+ git clone https://github.com/codeprimate/todo-agent.git
228
+ cd todo_agent
229
+ pip install -e ".[dev]"
230
+
231
+ # Run tests
232
+ pytest
233
+
234
+ # Format code
235
+ black .
236
+ isort .
237
+ ```
238
+
239
+ ## Architecture
240
+
241
+ The todo-agent follows a clean, layered architecture with clear separation of concerns:
242
+
243
+ ### **Interface Layer** (`todo_agent/interface/`)
244
+ - **CLI**: User interaction, input/output handling, and application loop
245
+ - **Tools**: Function schemas and execution logic for LLM function calling
246
+ - **Formatters**: Output formatting and presentation
247
+
248
+ ### **Core Layer** (`todo_agent/core/`)
249
+ - **TodoManager**: Business logic orchestrator that translates high-level operations into todo.sh commands
250
+ - **ConversationManager**: Manages conversation state, memory, and context for multi-turn interactions
251
+ - **TaskParser**: Parses and validates task-related operations
252
+ - **Exceptions**: Custom exception classes for error handling
253
+
254
+ ### **Infrastructure Layer** (`todo_agent/infrastructure/`)
255
+ - **Inference Engine**: Orchestrates LLM interactions, tool calling, and conversation flow
256
+ - **LLM Clients**: Provider-specific implementations (OpenRouter, Ollama) with factory pattern
257
+ - **TodoShell**: Subprocess wrapper for executing todo.sh commands
258
+ - **Configuration**: Environment and settings management
259
+ - **Logging**: Structured logging throughout the application
260
+ - **Token Counter**: Manages conversation token limits and costs
261
+
262
+ ### **How It Works**
263
+
264
+ 1. **User Input** → Natural language request (e.g., "add buy groceries to shopping list")
265
+ 2. **CLI** → Captures input and passes to inference engine
266
+ 3. **Inference Engine** → Sends request to LLM with available tools
267
+ 4. **LLM** → Analyzes request and decides which tools to call
268
+ 5. **Tool Execution** → TodoManager → TodoShell → todo.sh
269
+ 6. **Response** → Results returned through conversation manager to user
270
+
271
+ ### **Key Features**
272
+ - **Function Calling**: LLM intelligently selects and executes appropriate tools
273
+ - **Conversation Memory**: Maintains context across interactions
274
+ - **Multi-Provider Support**: Works with cloud (OpenRouter) and local (Ollama) LLMs
275
+ - **Error Handling**: Robust error management with detailed logging
276
+ - **Performance Monitoring**: Tracks thinking time and conversation metrics
277
+
278
+ ## License
279
+
280
+ GNU General Public License v3.0
281
+
282
+ This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
@@ -0,0 +1,27 @@
1
+ todo_agent/__init__.py,sha256=RUowhd14r3tqB_7rl83unGV8oBjra3UOIl7jix-33fk,254
2
+ todo_agent/_version.py,sha256=5jwwVncvCiTnhOedfkzzxmxsggwmTBORdFL_4wq0ZeY,704
3
+ todo_agent/main.py,sha256=YUcCf6oYSnmbT4KfRK6uKzdPxbjLYtSdrRCWxRjTzAI,1247
4
+ todo_agent/core/__init__.py,sha256=YM7c1CqWzlQlHerlxgLPsW0fABO3tpeV4NIUKma9bNc,365
5
+ todo_agent/core/conversation_manager.py,sha256=dyNml0D6Lk8SDKSbd6GIC2SjUOlsAooRmMIMfNRlhzc,10896
6
+ todo_agent/core/exceptions.py,sha256=cPvvkIbKdI7l51wC7cE-ZxUi54P3nf2m7x2lMNMRFYM,399
7
+ todo_agent/core/todo_manager.py,sha256=puq2QWvZ4jblRoWfSmy2Zk-O-nXJVATJwa1cCFppjms,7960
8
+ todo_agent/infrastructure/__init__.py,sha256=XeMvJ-ZvVz2pZmZthZrC4Qlk8VxwLHyIpqr3btUIHLE,284
9
+ todo_agent/infrastructure/config.py,sha256=XYp3CJP51vJYA3vM_Dq5BLYn02vNuFE31qC45Zjml5I,2095
10
+ todo_agent/infrastructure/inference.py,sha256=7TJKpIaBlOQ1NbBB3LOt2M9aO613jbr6aJNmmIUyNuo,9568
11
+ todo_agent/infrastructure/llm_client.py,sha256=ZoObyqaRP6i_eqGYGfJWGeWTJ-VNxpY70ay04vt2v_E,1390
12
+ todo_agent/infrastructure/llm_client_factory.py,sha256=-FD6gBflLB0zqpNASTSmr8Yxl5bHaxCOLlMWAcck60U,1715
13
+ todo_agent/infrastructure/logger.py,sha256=JF3G1Yq6lB6YIgaXnxjCWy4zbP7TPEIdvDIpwRApn34,4247
14
+ todo_agent/infrastructure/ollama_client.py,sha256=VgXPInI5KH6P1Ub9WYJyfYgKkVWbEuJxE_Bts-dke6o,5358
15
+ todo_agent/infrastructure/openrouter_client.py,sha256=AzUSKWF3_9RfhSMzCn82tW2fu6W1uFe0NzgfInwnn0o,6601
16
+ todo_agent/infrastructure/todo_shell.py,sha256=7CF6WnB2W4_v95kjr-DxrRQUDHfuCvUQtJ0NrhDGUow,5738
17
+ todo_agent/infrastructure/token_counter.py,sha256=NC9-y4v7kJRFRlAYe1a7tW-pfFtE4qQslUpVxR-yssM,5121
18
+ todo_agent/infrastructure/prompts/system_prompt.txt,sha256=uCb6yz3uDQdwcB8HJcF0y1_1b75oRtRnCMMHQLHI3NI,2415
19
+ todo_agent/interface/__init__.py,sha256=7nnDEP7w2qYMQJPPzlojCOoYebqw6SmAqJ886CdwXT4,204
20
+ todo_agent/interface/cli.py,sha256=2c7Pq6-_5URTbvN98_eWKf68m8gwXr6_TJ-XxtxikLc,8429
21
+ todo_agent/interface/tools.py,sha256=QZce0HHk5BYmUrGTBLse49tg2C6o5p3pkbd2c99x4MQ,28500
22
+ todo_agent-0.1.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
23
+ todo_agent-0.1.0.dist-info/METADATA,sha256=OI38wernGqhAEOhurFDKQGN7839gKqnw_n29NOoWkVY,8735
24
+ todo_agent-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
25
+ todo_agent-0.1.0.dist-info/entry_points.txt,sha256=4W7LrCib6AXP5IZDwWRht8S5gutLu5oNfTJHGbt4oHs,52
26
+ todo_agent-0.1.0.dist-info/top_level.txt,sha256=a65mlPIhPZHuq2bRIi_sCMAIJsUddvXt171OBF6r6co,11
27
+ todo_agent-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ todo-agent = todo_agent.main:main