timellama 0.1.0__tar.gz

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,12 @@
1
+ # Required: Productive.io API credentials
2
+ PRODUCTIVE_API_TOKEN=your_api_token
3
+ PRODUCTIVE_ORG_ID=your_org_id
4
+ PRODUCTIVE_USER_ID=your_user_id
5
+ PRODUCTIVE_BILLING_CUTOFF_DAY=10 # Optional, defaults to 10
6
+
7
+ # Optional: Calendar ICS URL (for calendar sync feature)
8
+ ICS_CALENDAR_URL=https://outlook.office365.com/owa/calendar/.../calendar.ics
9
+
10
+ # Optional: Ollama settings
11
+ OLLAMA_MODEL=llama3.2:3b # Default model
12
+ OLLAMA_HOST=http://localhost:11434 # Default host
@@ -0,0 +1,70 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ *.manifest
29
+ *.spec
30
+
31
+ # Installer logs
32
+ pip-log.txt
33
+ pip-delete-this-directory.txt
34
+
35
+ # Unit test / coverage reports
36
+ htmlcov/
37
+ .tox/
38
+ .nox/
39
+ .coverage
40
+ .coverage.*
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+ *.cover
45
+ *.py,cover
46
+ .hypothesis/
47
+ .pytest_cache/
48
+
49
+ # Environments
50
+ .env
51
+ .venv
52
+ env/
53
+ venv/
54
+ ENV/
55
+ env.bak/
56
+ venv.bak/
57
+
58
+ # IDE
59
+ .idea/
60
+ .vscode/
61
+ *.swp
62
+ *.swo
63
+ *~
64
+
65
+ # macOS
66
+ .DS_Store
67
+
68
+ # Project specific
69
+ *.ics
70
+ .env.local
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Adam Chrabaszcz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,262 @@
1
+ Metadata-Version: 2.4
2
+ Name: timellama
3
+ Version: 0.1.0
4
+ Summary: CLI for Productive.io time tracking with calendar sync, team hours review, and local LLM support
5
+ Project-URL: Homepage, https://github.com/achrabaszcz/timellama
6
+ Project-URL: Repository, https://github.com/achrabaszcz/timellama
7
+ Project-URL: Issues, https://github.com/achrabaszcz/timellama/issues
8
+ Author: Adam Chrabaszcz
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: calendar,cli,hours,invoicing,mcp,ollama,productive,time-tracking
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Office/Business :: Scheduling
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: click>=8.0.0
23
+ Requires-Dist: ics-calendar-mcp>=0.1.0
24
+ Requires-Dist: mcp>=1.0.0
25
+ Requires-Dist: ollama>=0.4.0
26
+ Requires-Dist: productive-time-mcp>=0.1.0
27
+ Requires-Dist: python-dotenv>=1.0.0
28
+ Requires-Dist: rich>=13.0.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
31
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
32
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # 🦙 TimeLlama
36
+
37
+ CLI for Productive.io time tracking with calendar sync, team hours review, and local LLM support.
38
+
39
+ TimeLlama helps you manage time tracking in Productive.io—sync calendar events to time entries, review team hours for invoicing, and get AI-powered work summaries. Uses a local LLM (Ollama) so all your data stays on your machine.
40
+
41
+ ## Features
42
+
43
+ - **Calendar Sync**: Automatically create/update Productive time entries from your calendar
44
+ - **Team Hours Review**: Check employee hours for billing periods with AI-generated summaries
45
+ - **Invoice Approval**: Interactive workflow to review and approve team hours
46
+ - **Interactive Chat**: REPL mode for managing time entries with LLM suggestions
47
+ - **Cron-Ready**: One-shot sync command for automation
48
+ - **Local LLM**: Uses Ollama for formatting—all data stays on your machine
49
+
50
+ ## Installation
51
+
52
+ ### Prerequisites
53
+
54
+ 1. **Ollama** (for LLM features):
55
+ ```bash
56
+ # macOS
57
+ brew install ollama
58
+
59
+ # Start Ollama server
60
+ ollama serve
61
+
62
+ # Pull the model
63
+ ollama pull llama3.2:3b
64
+ ```
65
+
66
+ 2. **Productive.io API access** with your API token
67
+
68
+ 3. **Calendar ICS file** (exported from Google Calendar, Outlook, etc.)
69
+
70
+ ### Install TimeLlama
71
+
72
+ ```bash
73
+ # Via pipx (recommended - isolated environment)
74
+ pipx install timellama
75
+
76
+ # Or via pip
77
+ pip install timellama
78
+
79
+ # Or install from source
80
+ git clone https://github.com/achrabaszcz/timellama.git
81
+ cd timellama
82
+ pip install -e .
83
+ ```
84
+
85
+ ## Configuration
86
+
87
+ Create a `.env` file or set environment variables:
88
+
89
+ ```bash
90
+ # Required: Productive.io API credentials
91
+ PRODUCTIVE_API_TOKEN=your_api_token
92
+ PRODUCTIVE_ORG_ID=your_org_id
93
+ PRODUCTIVE_USER_ID=your_user_id
94
+
95
+ # Optional: Calendar ICS URL (for calendar sync)
96
+ ICS_CALENDAR_URL=https://outlook.office365.com/owa/calendar/.../calendar.ics
97
+
98
+ # Optional: Billing period cutoff day (default: 10)
99
+ PRODUCTIVE_BILLING_CUTOFF_DAY=10
100
+
101
+ # Optional: Ollama settings
102
+ OLLAMA_MODEL=llama3.2:3b
103
+ OLLAMA_HOST=http://localhost:11434
104
+ ```
105
+
106
+ ### Getting Your Productive Credentials
107
+
108
+ 1. **API Token**: Go to Productive → Settings → API tokens
109
+ 2. **Organization ID**: Found in your Productive URL: `app.productive.io/org-ID/...`
110
+ 3. **User ID**: Use the Productive API or check your profile settings
111
+
112
+ ### Setting Up Your Calendar
113
+
114
+ TimeLlama fetches calendar data from an ICS URL. Most calendar providers offer a shareable ICS link:
115
+
116
+ **Outlook/Office 365**:
117
+ 1. Go to Outlook Calendar → Settings → Shared calendars
118
+ 2. Publish your calendar and copy the ICS link
119
+ 3. Set `ICS_CALENDAR_URL` to the link
120
+
121
+ **Google Calendar**:
122
+ 1. Go to Google Calendar → Settings → Settings for my calendars
123
+ 2. Select your calendar → Integrate calendar
124
+ 3. Copy the "Secret address in iCal format"
125
+ 4. Set `ICS_CALENDAR_URL` to the link
126
+
127
+ ## Usage
128
+
129
+ ### Check Configuration
130
+
131
+ ```bash
132
+ timellama doctor
133
+ ```
134
+
135
+ ### Show Today's Status
136
+
137
+ ```bash
138
+ timellama status
139
+ ```
140
+
141
+ ### Sync Calendar to Productive
142
+
143
+ ```bash
144
+ # Sync today's calendar events
145
+ timellama sync
146
+
147
+ # Dry run - see what would happen
148
+ timellama sync --dry-run
149
+
150
+ # Include LLM suggestions for additional items
151
+ timellama sync --suggestions
152
+ ```
153
+
154
+ ### Interactive Chat Mode
155
+
156
+ ```bash
157
+ timellama chat
158
+ ```
159
+
160
+ Commands in chat mode:
161
+ - `sync` - Sync calendar to Productive
162
+ - `show` - Show current status
163
+ - `add <item>` - Add item to today's log
164
+ - `help` - Show help
165
+ - `quit` - Exit
166
+
167
+ ### Add Item to Today's Log
168
+
169
+ ```bash
170
+ timellama add Code review for PR 123
171
+ timellama add Debugging authentication issue
172
+ ```
173
+
174
+ ### Employee Hours
175
+
176
+ ```bash
177
+ # Get employee hours for billing period
178
+ timellama hours "John Doe"
179
+
180
+ # Current calendar month
181
+ timellama hours "John" --period current
182
+
183
+ # Previous month
184
+ timellama hours "Jane" --period previous
185
+
186
+ # Custom date range
187
+ timellama hours "John" --after 2026-01-01 --before 2026-01-31
188
+
189
+ # With AI summary
190
+ timellama hours "John" --summary
191
+ ```
192
+
193
+ ### Interactive Approval Workflow
194
+
195
+ ```bash
196
+ timellama approve
197
+ ```
198
+
199
+ ## Cron Setup
200
+
201
+ For automated daily sync:
202
+
203
+ ```bash
204
+ # Edit crontab
205
+ crontab -e
206
+
207
+ # Add line (sync at 6 PM every weekday)
208
+ 0 18 * * 1-5 /path/to/timellama sync >> /var/log/timellama.log 2>&1
209
+ ```
210
+
211
+ ## Architecture
212
+
213
+ ```
214
+ ┌─────────────────────────────────────────────────────────────┐
215
+ │ timellama CLI │
216
+ ├─────────────────────────────────────────────────────────────┤
217
+ │ Commands: │
218
+ │ - timellama chat (interactive mode) │
219
+ │ - timellama sync (automated sync for cron) │
220
+ │ - timellama status (show today's log) │
221
+ │ - timellama hours <name> (employee work summary) │
222
+ │ - timellama approve (review team hours) │
223
+ └─────────────────────────────────────────────────────────────┘
224
+ │ │ │
225
+ ▼ ▼ ▼
226
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
227
+ │ Ollama │ │ ics-calendar│ │ productive- │
228
+ │ (local) │ │ MCP │ │ time MCP │
229
+ │ llama3.2:3b │ │ (bundled) │ │ (bundled) │
230
+ └─────────────┘ └─────────────┘ └─────────────┘
231
+ ```
232
+
233
+ **Bundled MCP Servers**: The `productive-time-mcp` and `ics-calendar-mcp` servers are installed as dependencies. TimeLlama spawns them automatically—no separate setup needed.
234
+
235
+ ## Privacy
236
+
237
+ - All data stays local
238
+ - Ollama runs on localhost:11434
239
+ - MCP servers run locally (stdio)
240
+ - Only Productive API calls go external (required for time tracking)
241
+ - No calendar data sent to cloud LLMs
242
+
243
+ ## Development
244
+
245
+ ```bash
246
+ # Clone repo
247
+ git clone https://github.com/achrabaszcz/timellama.git
248
+ cd timellama
249
+
250
+ # Install with dev dependencies
251
+ pip install -e ".[dev]"
252
+
253
+ # Run tests
254
+ pytest
255
+
256
+ # Lint
257
+ ruff check src/
258
+ ```
259
+
260
+ ## License
261
+
262
+ MIT
@@ -0,0 +1,228 @@
1
+ # 🦙 TimeLlama
2
+
3
+ CLI for Productive.io time tracking with calendar sync, team hours review, and local LLM support.
4
+
5
+ TimeLlama helps you manage time tracking in Productive.io—sync calendar events to time entries, review team hours for invoicing, and get AI-powered work summaries. Uses a local LLM (Ollama) so all your data stays on your machine.
6
+
7
+ ## Features
8
+
9
+ - **Calendar Sync**: Automatically create/update Productive time entries from your calendar
10
+ - **Team Hours Review**: Check employee hours for billing periods with AI-generated summaries
11
+ - **Invoice Approval**: Interactive workflow to review and approve team hours
12
+ - **Interactive Chat**: REPL mode for managing time entries with LLM suggestions
13
+ - **Cron-Ready**: One-shot sync command for automation
14
+ - **Local LLM**: Uses Ollama for formatting—all data stays on your machine
15
+
16
+ ## Installation
17
+
18
+ ### Prerequisites
19
+
20
+ 1. **Ollama** (for LLM features):
21
+ ```bash
22
+ # macOS
23
+ brew install ollama
24
+
25
+ # Start Ollama server
26
+ ollama serve
27
+
28
+ # Pull the model
29
+ ollama pull llama3.2:3b
30
+ ```
31
+
32
+ 2. **Productive.io API access** with your API token
33
+
34
+ 3. **Calendar ICS file** (exported from Google Calendar, Outlook, etc.)
35
+
36
+ ### Install TimeLlama
37
+
38
+ ```bash
39
+ # Via pipx (recommended - isolated environment)
40
+ pipx install timellama
41
+
42
+ # Or via pip
43
+ pip install timellama
44
+
45
+ # Or install from source
46
+ git clone https://github.com/achrabaszcz/timellama.git
47
+ cd timellama
48
+ pip install -e .
49
+ ```
50
+
51
+ ## Configuration
52
+
53
+ Create a `.env` file or set environment variables:
54
+
55
+ ```bash
56
+ # Required: Productive.io API credentials
57
+ PRODUCTIVE_API_TOKEN=your_api_token
58
+ PRODUCTIVE_ORG_ID=your_org_id
59
+ PRODUCTIVE_USER_ID=your_user_id
60
+
61
+ # Optional: Calendar ICS URL (for calendar sync)
62
+ ICS_CALENDAR_URL=https://outlook.office365.com/owa/calendar/.../calendar.ics
63
+
64
+ # Optional: Billing period cutoff day (default: 10)
65
+ PRODUCTIVE_BILLING_CUTOFF_DAY=10
66
+
67
+ # Optional: Ollama settings
68
+ OLLAMA_MODEL=llama3.2:3b
69
+ OLLAMA_HOST=http://localhost:11434
70
+ ```
71
+
72
+ ### Getting Your Productive Credentials
73
+
74
+ 1. **API Token**: Go to Productive → Settings → API tokens
75
+ 2. **Organization ID**: Found in your Productive URL: `app.productive.io/org-ID/...`
76
+ 3. **User ID**: Use the Productive API or check your profile settings
77
+
78
+ ### Setting Up Your Calendar
79
+
80
+ TimeLlama fetches calendar data from an ICS URL. Most calendar providers offer a shareable ICS link:
81
+
82
+ **Outlook/Office 365**:
83
+ 1. Go to Outlook Calendar → Settings → Shared calendars
84
+ 2. Publish your calendar and copy the ICS link
85
+ 3. Set `ICS_CALENDAR_URL` to the link
86
+
87
+ **Google Calendar**:
88
+ 1. Go to Google Calendar → Settings → Settings for my calendars
89
+ 2. Select your calendar → Integrate calendar
90
+ 3. Copy the "Secret address in iCal format"
91
+ 4. Set `ICS_CALENDAR_URL` to the link
92
+
93
+ ## Usage
94
+
95
+ ### Check Configuration
96
+
97
+ ```bash
98
+ timellama doctor
99
+ ```
100
+
101
+ ### Show Today's Status
102
+
103
+ ```bash
104
+ timellama status
105
+ ```
106
+
107
+ ### Sync Calendar to Productive
108
+
109
+ ```bash
110
+ # Sync today's calendar events
111
+ timellama sync
112
+
113
+ # Dry run - see what would happen
114
+ timellama sync --dry-run
115
+
116
+ # Include LLM suggestions for additional items
117
+ timellama sync --suggestions
118
+ ```
119
+
120
+ ### Interactive Chat Mode
121
+
122
+ ```bash
123
+ timellama chat
124
+ ```
125
+
126
+ Commands in chat mode:
127
+ - `sync` - Sync calendar to Productive
128
+ - `show` - Show current status
129
+ - `add <item>` - Add item to today's log
130
+ - `help` - Show help
131
+ - `quit` - Exit
132
+
133
+ ### Add Item to Today's Log
134
+
135
+ ```bash
136
+ timellama add Code review for PR 123
137
+ timellama add Debugging authentication issue
138
+ ```
139
+
140
+ ### Employee Hours
141
+
142
+ ```bash
143
+ # Get employee hours for billing period
144
+ timellama hours "John Doe"
145
+
146
+ # Current calendar month
147
+ timellama hours "John" --period current
148
+
149
+ # Previous month
150
+ timellama hours "Jane" --period previous
151
+
152
+ # Custom date range
153
+ timellama hours "John" --after 2026-01-01 --before 2026-01-31
154
+
155
+ # With AI summary
156
+ timellama hours "John" --summary
157
+ ```
158
+
159
+ ### Interactive Approval Workflow
160
+
161
+ ```bash
162
+ timellama approve
163
+ ```
164
+
165
+ ## Cron Setup
166
+
167
+ For automated daily sync:
168
+
169
+ ```bash
170
+ # Edit crontab
171
+ crontab -e
172
+
173
+ # Add line (sync at 6 PM every weekday)
174
+ 0 18 * * 1-5 /path/to/timellama sync >> /var/log/timellama.log 2>&1
175
+ ```
176
+
177
+ ## Architecture
178
+
179
+ ```
180
+ ┌─────────────────────────────────────────────────────────────┐
181
+ │ timellama CLI │
182
+ ├─────────────────────────────────────────────────────────────┤
183
+ │ Commands: │
184
+ │ - timellama chat (interactive mode) │
185
+ │ - timellama sync (automated sync for cron) │
186
+ │ - timellama status (show today's log) │
187
+ │ - timellama hours <name> (employee work summary) │
188
+ │ - timellama approve (review team hours) │
189
+ └─────────────────────────────────────────────────────────────┘
190
+ │ │ │
191
+ ▼ ▼ ▼
192
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
193
+ │ Ollama │ │ ics-calendar│ │ productive- │
194
+ │ (local) │ │ MCP │ │ time MCP │
195
+ │ llama3.2:3b │ │ (bundled) │ │ (bundled) │
196
+ └─────────────┘ └─────────────┘ └─────────────┘
197
+ ```
198
+
199
+ **Bundled MCP Servers**: The `productive-time-mcp` and `ics-calendar-mcp` servers are installed as dependencies. TimeLlama spawns them automatically—no separate setup needed.
200
+
201
+ ## Privacy
202
+
203
+ - All data stays local
204
+ - Ollama runs on localhost:11434
205
+ - MCP servers run locally (stdio)
206
+ - Only Productive API calls go external (required for time tracking)
207
+ - No calendar data sent to cloud LLMs
208
+
209
+ ## Development
210
+
211
+ ```bash
212
+ # Clone repo
213
+ git clone https://github.com/achrabaszcz/timellama.git
214
+ cd timellama
215
+
216
+ # Install with dev dependencies
217
+ pip install -e ".[dev]"
218
+
219
+ # Run tests
220
+ pytest
221
+
222
+ # Lint
223
+ ruff check src/
224
+ ```
225
+
226
+ ## License
227
+
228
+ MIT
@@ -0,0 +1,65 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "timellama"
7
+ version = "0.1.0"
8
+ description = "CLI for Productive.io time tracking with calendar sync, team hours review, and local LLM support"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "Adam Chrabaszcz" }
14
+ ]
15
+ keywords = ["productive", "time-tracking", "calendar", "ollama", "mcp", "cli", "invoicing", "hours"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: Office/Business :: Scheduling",
26
+ ]
27
+
28
+ dependencies = [
29
+ "mcp>=1.0.0",
30
+ "productive-time-mcp>=0.1.0",
31
+ "ics-calendar-mcp>=0.1.0",
32
+ "ollama>=0.4.0",
33
+ "click>=8.0.0",
34
+ "rich>=13.0.0",
35
+ "python-dotenv>=1.0.0",
36
+ ]
37
+
38
+ [project.optional-dependencies]
39
+ dev = [
40
+ "pytest>=7.0.0",
41
+ "pytest-asyncio>=0.21.0",
42
+ "ruff>=0.1.0",
43
+ ]
44
+
45
+ [project.scripts]
46
+ timellama = "timellama.cli:main"
47
+
48
+ [project.urls]
49
+ Homepage = "https://github.com/achrabaszcz/timellama"
50
+ Repository = "https://github.com/achrabaszcz/timellama"
51
+ Issues = "https://github.com/achrabaszcz/timellama/issues"
52
+
53
+ [tool.hatch.build.targets.wheel]
54
+ packages = ["src/timellama"]
55
+
56
+ [tool.ruff]
57
+ line-length = 100
58
+ target-version = "py310"
59
+
60
+ [tool.ruff.lint]
61
+ select = ["E", "F", "I", "W"]
62
+
63
+ [tool.pytest.ini_options]
64
+ asyncio_mode = "auto"
65
+ testpaths = ["tests"]
@@ -0,0 +1,3 @@
1
+ """TimeLlama - Calendar to Productive.io time tracking automation."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,6 @@
1
+ """Entry point for running timellama as a module."""
2
+
3
+ from timellama.cli import main
4
+
5
+ if __name__ == "__main__":
6
+ main()