tklr-dgraham 0.0.0rc3__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,624 @@
1
+ Metadata-Version: 2.4
2
+ Name: tklr-dgraham
3
+ Version: 0.0.0rc3
4
+ Summary: Reminders Tickler / CLI and Textual UI
5
+ Author-email: Daniel Graham <dnlgrhm@gmail.com>
6
+ Requires-Python: <4.0,>=3.12
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: textual>=0.60
9
+ Requires-Dist: python-dateutil>=2.8.2
10
+ Requires-Dist: tzlocal>=5.3.1
11
+ Requires-Dist: packaging>=25.0
12
+ Requires-Dist: pydantic>=2.11.7
13
+ Requires-Dist: jinja2>=3.1.6
14
+ Requires-Dist: click>=8.2.1
15
+ Requires-Dist: lorem>=0.1.1
16
+ Requires-Dist: readchar>=4.2.1
17
+ Requires-Dist: numpy>=2.3.3
18
+ Requires-Dist: pyperclip>=1.11.0
19
+ Requires-Dist: tomlkit>=0.13.3
20
+ Provides-Extra: dev
21
+ Requires-Dist: lorem>=0.1.1; extra == "dev"
22
+
23
+ <table>
24
+ <tr>
25
+ <td>
26
+ <h1>tklr</h1>
27
+ The term <em>tickler file</em> originally referred to a file system for reminders which used 12 monthly files and 31 daily files. <em>Tklr</em>, pronounced "tickler", is a digital version that ranks tasks by urgency and generally facilitates the same purpose - discovering what's relevant <b>now</b> quickly and easily. It supports the entry format and projects of <strong>etm</strong>, the datetime parsing and recurrence features of <strong>dateutil</strong> and provides both command line (Click) and graphical user interfaces (Textual).</p>
28
+ <p>Make the most of your time!</p>
29
+ <p></p>
30
+ <td style="width: 25%; vertical-align: middle;">
31
+ <img src="https://raw.githubusercontent.com/dagraham/tklr-dgraham/master/tklr_logo.avif"
32
+ alt="tklr" title="Tklr" style="max-width: 360px; width: 100%; height: auto;" />
33
+ </td>
34
+
35
+ </tr>
36
+ </table>
37
+
38
+ Join the conversation on the [Discussions tab](https://github.com/dagraham/tklr-dgraham/discussions)
39
+
40
+ ❌ Preliminary and incomplete. This notice will be removed when the code is ready for general use.
41
+
42
+ ## Overview
43
+
44
+ _tklr_ began life in 2013 as _etm-qt_ sporting a gui based on _Qt_. The intent was to provide an app supporting GTD (David Allen's Getting Things Done) and exploiting the power of python-dateutil. The name changed to _etmtk_ in 2014 when _Tk_ replaced _Qt_. Development of _etmtk_ continued until 2019 when name changed to _etm-dgraham_, to honor the PyPi naming convention, and the interface changed to a terminal based one based on _prompt_toolkit_. In 2025 the name changed to "tklr", the database to SQLite3 and the interface to Click (CLI) and Textual. Features have changed over the years but the text based interface and basic format of the reminders has changed very little. The goal has always been to be the Swiss Army Knife of tools for managing reminders.
45
+
46
+ ## Reminders
47
+
48
+ _tklr_ offers a simple way to manage your events, tasks and other reminders.
49
+
50
+ Rather than filling out fields in a form to create or edit reminders, a simple text-based format is used. Each reminder in _tklr_ begins with a _type character_ followed by the _subject_ of the reminder and then, perhaps, by one or more _@key value_ pairs to specify other attributes of the reminder. Mnemonics are used to make the keys easy to remember, e.g, @s for scheduled datetime, @l for location, @d for description and so forth.
51
+
52
+ The 4 types of reminders in _tklr_ with their associated type characters:
53
+
54
+ | type | char |
55
+ | ------- | ---- |
56
+ | event | \* |
57
+ | task | ~ |
58
+ | project | ^ |
59
+ | goal | + |
60
+ | note | % |
61
+ | draft | ? |
62
+
63
+ ### examples
64
+
65
+ - A _task_ (~) reminder to pick up milk.
66
+
67
+ ~ pick up milk
68
+
69
+ - An _event_ (\*) reminder to have lunch with Ed starting (@s) next Tuesday at 12pm with an extent (@e) of 1 hour and 30 minutes, i.e., lasting from 12pm until 1:30pm.
70
+
71
+ * Lunch with Ed @s tue 12p @e 1h30m
72
+
73
+ - A _note_ (%) reminder of a favorite Churchill quotation with the quote itself as the details (@d).
74
+
75
+ % Give me a pig - Churchill @d Dogs look up at
76
+ you. Cats look down at you. Give me a pig - they
77
+ look you in the eye and treat you as an equal.
78
+
79
+ The _subject_, "Give me a pig - Churchill" in this example, follows the type character and is meant to be brief - analogous to the subject of an email. The optional _details_ follows the "@d" and is meant to be more expansive - analogous to the body of an email.
80
+
81
+ - A _project_ (^) reminder to build a dog house with component tasks (@~).
82
+
83
+ ^ Build dog house
84
+ @~ pick up materials &r 1 &e 4h
85
+ @~ cut pieces &r 2: 1 &e 3h
86
+ @~ assemble &r 3: 2 &e 2h
87
+ @~ sand &r 4: 3 &e 1h
88
+ @~ paint &r 5: 4 &e 4h
89
+
90
+ The "&r X: Y" entries set "X" as the label for the task and the task labeled "Y" as a prerequisite. E.g., "&r 3: 2" establishes "3" as the label for assemble and "2" (cut pieces) as a prerequisite. The "&e _extent_" entries give estimates of the times required to complete the various tasks.
91
+
92
+ - A _draft_ reminder, **!**: meet Alex for coffee Friday.
93
+
94
+ ! Coffee with Alex @s fri @e 1h
95
+
96
+ This can be changed to an event when the details are confirmed by replacing the **!** with an **\*** and adding the time to `@s`. This _draft_ will appear highlighted on the current day until you make the changes to complete it.
97
+
98
+ ### Simple repetition
99
+
100
+ - An appointment (_event_) for a dental exam and cleaning at 2pm on Feb 5 and then again, **@+**, at 9am on Sep 3.
101
+
102
+ * dental exam and cleaning @s 2p feb 5 @e 45m @+ 9am Sep 3
103
+
104
+ - A reminder (_task_) to fill the bird feeders starting Friday of the current week and repeat (do over) thereafter 4 days after the previous completion.
105
+
106
+ ~ fill bird feeders @s fri @o 4d
107
+
108
+ ### More complex repetition
109
+
110
+ - The full flexibility of the superb Python _dateutil_ package is supported. Consider, for example, a reminder for Presidential election day which starts in November, 2020 and repeats every 4 years on the first Tuesday after a Monday in November (a Tuesday whose month day falls between 2 and 8 in the 11th month). In _tklr_, this event would be
111
+
112
+ - * Presidential election day @s nov 1 2020 @r y &i 4
113
+ &w TU &m 2, 3, 4, 5, 6, 7, 8 &M 11
114
+
115
+ ## Details
116
+
117
+ ### Dates and times
118
+
119
+ Suppose it is Monday, September 15 2025 in the US/Eastern timezone. When a datetime is entered it is interpreted _relative_ to the current date, time and timezone. When entering the scheduled datetime for a reminder using `@s`, the following table illustrates how the entries would be interpreted
120
+
121
+ | @s entry | scheduled datetime |
122
+ | ------------------ | ------------------- |
123
+ | @s wed | 25-09-17 |
124
+ | @s 9a | 25-09-15 9:00am EST |
125
+ | @s 9a fri | 25-09-19 9:00am EST |
126
+ | @s 9a 23 z none | 25-09-23 9:00am |
127
+ | @s 3p z US/Pacific | 25-09-15 3:00pm PST |
128
+ | @s 13h 23 z CET | 25-09-23 13:00 CET |
129
+ | @s 20h 23 z none | 25-09-23 20:00 |
130
+
131
+ Datetimes entered with "z none" and dates are _naive_ - have no timezone information. Datetimes entered with "z TIMEZONE" are interpreted as _aware_ datetimes in TIMEZONE. Datetimes without a "z" entry are also interpreted as _aware_ but in the timezone of the user's computer.
132
+
133
+ When dates and datetimes are recorded, _aware_ datetimes are first converted to UTC time and then stored with a "Z" appended. E.g., the "25-09-15 3:00pm PST" datetime would be recorded as "20250915T2200Z". Dates and _naive_ datetimes are recorded without conversion and without the trailing "Z". When _aware_ datetimes are displayed to the user, they are first converted to the timezone of the user's computer. Thus the "PST" example would be displayed as scheduled for 6pm today in US/Eastern. Dates and _naive_ datetimes are displayed without change in every timezone.
134
+
135
+ When an `@s` scheduled entry specifies a date without a time, i.e., a date instead of a datetime, the interpretation is that the task is due sometime on that day. Specifically, it is not due until `00:00` on that day and not past due until `00:00` on the following day. The interpretation of `@b` and `@u` in this circumstance is similar. For example, if `@s 2025-04-06` is specified with `@b 3d` and `@u 2d` then the task status would change from waiting to pending at `2025-04-03 00:00` and, if not completed, to deleted at `2025-04-09 00:00`.
136
+
137
+ Note that times can only be specified, stored and displayed in hours and minutes - seconds and microseconds are not supported. Internally datetimes are interpreted as having seconds equal to 0.
138
+
139
+ ### Intervals
140
+
141
+ An interval is just a period of time and is entered in _tklr_ using expressions such as
142
+
143
+ | entry | period of time |
144
+ | ----- | ----------------------- |
145
+ | 2h | 2 hours |
146
+ | -2h | - 2 hours |
147
+ | 1w7d | 1 week and 7 days |
148
+ | 2h30m | 2 hours and 30 minutes |
149
+ | 1m27s | 1 minute and 27 seconds |
150
+
151
+ Note that w (weeks), d (days), h (hours), m (minutes) and s (seconds) are the available _units_ for entering _intervals_. Seconds are ignored save for their use in alerts - more on alerts later.
152
+
153
+ An interval, `I`, can be added to a datetime, `T`, to get a datetime, `T + I`, that will be after `T` if `I > 0` and before `T` if `I < 0`. Similarly, one datetime, `A`, can be subtracted from another, `B`, to get an interval, `I = B - A`, with `I > 0` if `B` is after (greater than) `A` and `I < 0` if `B` is before (less than) `A`.
154
+
155
+ ### Scheduled datetimes and related intervals
156
+
157
+ For the discussion that follows, it will be assumed that the current date is `2025-10-01` and that `@s 2025-10-21 10a` so that the _scheduled datetime_ for the illustrative reminder is
158
+
159
+ @s 2025-10-21 10:00am
160
+
161
+ #### extent
162
+
163
+ The entry `@e 2h30m` would set the _extent_ for the reminder to two hours and 30 minutes.
164
+
165
+ If the reminder were an _event_, this would schedule the "busy time" for the event to _extend_ from 10am until 12:30pm.
166
+
167
+ For a task, this same entry would indicate that attention to completing the task should begin no later than 10am and that 2 hours and 30 minutes is the _estimate_ of the time required for completion. The period from 10am until 12:30pm is not displayed as a busy time, however, since the task could be begun before or after 10am and could take more or less than 2 hours and 30 minutes to complete. For a task, both `@s` and `@e` are best regarded as _estimates_.
168
+
169
+ For a project, this same entry would similarly indicate that attention to completing the project should begin no later than 10am and that two hours and 30 minutes is estimated for completion subject to additional times specified in the jobs. A job entry containing `&s 2d &e 3h`, for example, would set the scheduled time for this job to be two days _after_ the `@s` entry for the project and would add three hours to the estimate of total time required for the project.
170
+
171
+ #### begin
172
+
173
+ The entry `@b B` where `B` is a _positive_ interval specifies the date on which the datetime `scheduled - B` falls. For the example, adding `@b 1d12h` would set _begin_ to the date corresponding to
174
+
175
+ 2025-10-21 10am - 1d12h = 2025-10-19 10pm
176
+
177
+ i.e., to `25-10-19`.
178
+
179
+ If the reminder is an event, then the agenda view would display an beginby notice for the event beginning on `25-10-19` and continuing on the `25-10-20`. For an _event_ think of this begin notice as a visual alert.
180
+
181
+ If the reminder is a task, then the task would _not_ appear in the agenda view until `25-10-19`, i.e., it would be hidden before that date.
182
+
183
+ #### wrap
184
+
185
+ The entry `@w BEFORE, AFTER`, where `BEFORE` and `AFTER` are _intervals_, can be used to wrap the _scheduled_ datetime of a reminder. Possible entries and the resulting values of BEFORE and AFTER are illustrated below:
186
+
187
+ | entry | before | after |
188
+ | ---------- | ------ | ---------- |
189
+ | @w 1h, 30m | 1 hour | 30 minutes |
190
+ | @w 1h, | 1 hour | None |
191
+ | @w , 30m | None | 30 minutes |
192
+
193
+ Consider an event with `@s 2025-10-21 10am @e 2h30m`, which starts at 10am and ends at 12:30pm and suppose that it will take an hour to travel to the location of the event and 30 minutes to travel from the event to the next location. The entry `@w 1h, 30m` could be used to indicate these travel periods from 9am until 10am before the event begins and from 12:30pm until 1pm after the event ends.
194
+
195
+ For a task, consider a situation in which the trash is picked up weekly on Monday mornings sometime between 8am and 10am and you would like a reminder to put the trash at the curb to appear in agenda view beginning at 6pm on Sunday and then disappear if marked completed between 6pm Sunday and 10am Monday or, if not marked completed by 10am Monday, then just disappear until the next Sunday. Here's the reminder to do that:
196
+
197
+ ~ trash to curb @s 8a mon @r w @e 15m @w 14h, 2h
198
+
199
+ This reminder for a _task_ will appear weekly from 6pm Sunday until 10am Monday unless marked completed sometime during that interval. Note that the `@w` entry wraps the _scheduled_ datetime but, unlike the case for an _event_, ignores the _extent_.
200
+
201
+ #### alert
202
+
203
+ ### Recurrence
204
+
205
+ #### @r and, by requirement, @s are given
206
+
207
+ When an item is specified with an `@r` entry, an `@s` entry is required and is used as the `DTSTART` entry in the recurrence rule. E.g.,
208
+
209
+ ```python
210
+ * datetime repeating @s 2024-08-07 14:00 @r d &i 2
211
+ ```
212
+
213
+ is serialized (stored) as
214
+
215
+ ```python
216
+ {
217
+ "itemtype": "*",
218
+ "subject": "datetime repeating",
219
+ "rruleset": "DTSTART:20240807T1400Z\nRRULE:FREQ=DAILY;INTERVAL=2",
220
+ }
221
+ ```
222
+
223
+ **Note**: The datetimes generated by the rrulestr correspond to datetimes matching the specification of `@r` which occur **on or after** the datetime specified by `@s`. The datetime corresponding to `@s` itself will only be generated if it matches the specification of `@r`.
224
+
225
+ ### @s is given but not @r
226
+
227
+ On the other hand, if an `@s` entry is specified, but `@r` is not, then the `@s` entry is stored as an `RDATE` in the recurrence rule. E.g.,
228
+
229
+ ```python
230
+ * datetime only @s 2024-08-07 14:00 @e 1h30m
231
+ ```
232
+
233
+ is serialized (stored) as
234
+
235
+ ```python
236
+ {
237
+ "itemtype": "*",
238
+ "subject": "datetime only",
239
+ "e": 5400,
240
+ "rruleset": "RDATE:20240807T1400Z"
241
+ }
242
+ ```
243
+
244
+ The datetime corresponding to `@s` itself is, of course, generated in this case.
245
+
246
+ ### @+ is specified, with or without @r
247
+
248
+ When `@s` is specified, an `@+` entry can be used to specify one or more, comma separated datetimes. When `@r` is given, these datetimes are added to those generated by the `@r` specification. Otherwise, they are added to the datetime specified by `@s`. E.g., is a special case. It is used to specify a datetime that is relative to the current datetime. E.g.,
249
+
250
+ ```python
251
+ * rdates @s 2024-08-07 14:00 @+ 2024-08-09 21:00
252
+ ```
253
+
254
+ would be serialized (stored) as
255
+
256
+ ```python
257
+ {
258
+ "itemtype": "*",
259
+ "subject": "rdates",
260
+ "rruleset": "RDATE:20240807T140000, 20240809T210000"
261
+ }
262
+ ```
263
+
264
+ This option is particularly useful for irregular recurrences such as annual doctor visits. After the initial visit, subsequent visits can simply be added to the `@+` entry of the existing event once the new appointment is made.
265
+
266
+ **Note**: Without `@r`, the `@s` datetime is included in the datetimes generated but with `@r`, it is only used to set the beginning of the recurrence and otherwise ignored.
267
+
268
+ ### Timezone considerations
269
+
270
+ [[timezones.md]]
271
+
272
+ When a datetime is specified, the timezone is assumed to be the local timezone. The datetime is converted to UTC for storage in the database. When a datetime is displayed, it is converted back to the local timezone.
273
+
274
+ This would work perfectly but for _recurrence_ and _daylight savings time_. The recurrence rules are stored in UTC and the datetimes generated by the rules are also in UTC. When these datetimes are displayed, they are converted to the local timezone.
275
+
276
+ ```python
277
+ - fall back @s 2024-11-01 10:00 EST @r d &i 1 &c 4
278
+ ```
279
+
280
+ ```python
281
+ rruleset_str = 'DTSTART:20241101T140000\nRRULE:FREQ=DAILY;INTERVAL=1;COUNT=4'
282
+ item.entry = '- fall back @s 2024-11-01 10:00 EST @r d &i 1 &c 4'
283
+ {
284
+ "itemtype": "-",
285
+ "subject": "fall back",
286
+ "rruleset": "DTSTART:20241101T140000\nRRULE:FREQ=DAILY;INTERVAL=1;COUNT=4"
287
+ }
288
+ Fri 2024-11-01 10:00 EDT -0400
289
+ Sat 2024-11-02 10:00 EDT -0400
290
+ Sun 2024-11-03 09:00 EST -0500
291
+ Mon 2024-11-04 09:00 EST -0500
292
+ ```
293
+
294
+ ### Urgency
295
+
296
+ Since urgency values are used ultimately to give an ordinal ranking of tasks, all that matters is the relative values used to compute the urgency scores. Accordingly, all urgency scores are constrained to fall within the interval from -1.0 to 1.0. The default urgency is 0.0 for a task with no urgency components.
297
+
298
+ There are some situations in which a task will _not_ be displayed in the "urgency list" and there is no need, therefore, to compute its urgency:
299
+
300
+ - Completed tasks are not displayed.
301
+ - Hidden tasks are not displayed. The task is hidden if it has an `@s` entry and an `@b` entry and the date corresponding to `@s - @b` falls sometime after the current date.
302
+ - Waiting tasks are not displayed. A task is waiting if it belongs to a project and has unfinished prerequisites.
303
+ - Only the first _unfinished_ instance of a repeating task is displayed. Subsequent instances are not displayed.
304
+
305
+ There is one other circumstance in which urgency need not be computed. When the _pinned_ status of the task is toggled on in the user interface, the task is treated as if the computed urgency were equal to `1.0` without any actual computations.
306
+
307
+ All other tasks will be displayed and ordered by their computed urgency scores. Many of these computations involve datetimes and/or intervals and it is necessary to understand both are represented by integer numbers of seconds - datetimes by the integer number of seconds _since the epoch_ (1970-01-01 00:00:00 UTC) and intervals by the integer numbers of seconds it spans. E.g., for the datetime "2025-01-01 00:00 UTC" this would be `1735689600` and for the interval "1w" this would be the number of seconds in 1 week, `7*24*60*60 = 604800`. This means that an interval can be subtracted from a datetime to obtain another datetime which is "interval" earlier or added to get a datetime "interval" later. One datetime can also be subtracted from another to get the "interval" between the two, with the sign indicating whether the first is later (positive) or earlier (negative). (Adding datetimes, on the other hand, is meaningless.)
308
+
309
+ Briefly, here is the essence of this method used to compute the urgency scores using "due" as an example. Here is the relevant section from config.toml with the default values:
310
+
311
+ ```toml
312
+ [urgency.due]
313
+ # The "due" urgency increases from 0.0 to "max" as now passes from
314
+ # due - interval to due.
315
+ interval = "1w"
316
+ max = 8.0
317
+ ```
318
+
319
+ The "due" urgency of a task with an `@s` entry is computed from _now_ (the current datetime), _due_ (the datetime specified by `@s`) and the _interval_ and _max_ settings from _urgency.due_. The computation returns:
320
+
321
+ - `0.0`
322
+ if `now < due - interval`
323
+ - `max * (1.0 - (now - due) / interval)`
324
+ if `due - interval < now <= due`
325
+ - `max`
326
+ if `now > due`
327
+
328
+ For a task without an `@s` entry, the "due" urgency is 0.0.
329
+
330
+ Other contributions of the task to urgency are computed similarly. Depending on the configuration settings and the characteristics of the task, the value can be either positive or negative or 0.0 when missing the requisite characteristic(s).
331
+
332
+ Once all the contributions of a task have been computed, they are aggregated into a single urgency value in the following way. The process begins by setting the initial values of variables `Wn = 1.0` and `Wp = 1.0`. Then for each of the urgency contributions, `v`, the value is added to `Wp` if `v > 0` or `abs(v)` is added to `Wn` if `v` negative. Thus either `Wp` or `Wn` is increased by each addition unless `v = 0`. When each contribution has been added, the urgency value of the task is computed as follows:
333
+
334
+ ```python
335
+ urgency = (Wp - Wn) / (Wp + Wn)
336
+ ```
337
+
338
+ Equivalently, urgency can be regarded as a weighted average of `-1.0` and `1.0` with `Wn/(Wn + Wp)` and `Wp/(Wn + Wp)` as the weights:
339
+
340
+ ```python
341
+ urgency = -1.0 * Wn / (Wn + Wp) + 1.0 * Wp / (Wn + Wp) = (Wp - Wn) / (Wn + Wp)
342
+ ```
343
+
344
+ Observations from the weighted average perspective and the fact that `Wn >= 1` and `Wp >= 1`:
345
+
346
+ - `-1.0 < urgency < 1`
347
+ - `urgency = 0.0` if and only if `Wn = Wp`
348
+ - `urgency` is _always increasing_ in `Wp` and _always decreasing_ in `Wn`
349
+ - `urgency` approaches `1.0` as `Wn/Wp` approaches `0.0` - as `Wp` increases relative to `Wn`
350
+ - `urgency` approaches `-1.0` as `Wp/Wn` approaches `0.0` - as `Wn` increases relative to `Wp`
351
+
352
+ Thus positive contributions _always_ increase urgency and negative contributions _always_ decrease urgency. The fact that the urgency derived from contributions is always less than `1.0` means that _pinned_ tasks with `urgency = 1` will always be listed first.
353
+
354
+ ## Getting Started
355
+
356
+ ### Developer Install Guide
357
+
358
+ This guide walks you through setting up a development environment for `tklr` using [`uv`](https://github.com/astral-sh/uv) and a local virtual environment. Eventually the normal python installation procedures using pip or pipx will be available.
359
+
360
+ ### ✅ Step 1: Clone the repository
361
+
362
+ This step will create a directory named _tklr-dgrham_ in your current working directory that contains a clone of the github repository for _tklr_.
363
+
364
+ ```bash
365
+ git clone https://github.com/dagraham/tklr-dgraham.git
366
+ cd tklr-dgraham
367
+ ```
368
+
369
+ ### ✅ Step 2: Install uv (if needed)
370
+
371
+ ```bash
372
+ which uv || curl -LsSf https://astral.sh/uv/install.sh | sh
373
+ ```
374
+
375
+ ### ✅ Step 3: Create a virtual environment with `uv`
376
+
377
+ This will create a `.venv/` directory inside your project to hold all the relevant imports.
378
+
379
+ ```bash
380
+ uv venv
381
+ ```
382
+
383
+ ### ✅ Step 4: Install the project in editable mode
384
+
385
+ ```bash
386
+ uv pip install -e .
387
+ ```
388
+
389
+ ### ✅ Step 5: Use the CLI
390
+
391
+ You have two options for activating the virtual environment for the CLI:
392
+
393
+ #### ☑️ Option 1: Manual activation (every session)
394
+
395
+ ```bash
396
+ source .venv/bin/activate
397
+ ```
398
+
399
+ Then you can run:
400
+
401
+ ```bash
402
+ tklr --version
403
+ tklr add "- test task @s 2025-08-01"
404
+ tklr ui
405
+ ```
406
+
407
+ To deactivate:
408
+
409
+ ```bash
410
+ deactivate
411
+ ```
412
+
413
+ #### ☑️ Option 2: Automatic activation with `direnv` (recommended)
414
+
415
+ ##### 1. Install `direnv`
416
+
417
+ ```bash
418
+ brew install direnv # macOS
419
+ sudo apt install direnv # Ubuntu/Debian
420
+ ```
421
+
422
+ ##### 2. Add the shell hook to your `~/.zshrc` or `~/.bashrc`
423
+
424
+ ```sh
425
+ eval "$(direnv hook zsh)" # or bash
426
+ ```
427
+
428
+ Restart your shell or run `source ~/.zshrc`.
429
+
430
+ ##### 3. In the project directory, create a `.envrc` file
431
+
432
+ ```bash
433
+ echo 'export PATH="$PWD/.venv/bin:$PATH"' > .envrc
434
+ ```
435
+
436
+ ##### 4. Allow it
437
+
438
+ ```bash
439
+ direnv allow
440
+ ```
441
+
442
+ Now every time you `cd` into the project, your environment is activated automatically and, as with the manual option, test your setup with
443
+
444
+ ```bash
445
+ tklr --version
446
+ tklr add "- test task @s 2025-08-01"
447
+ tklr ui
448
+ ```
449
+
450
+ You're now ready to develop, test, and run `tklr` locally with full CLI and UI support.
451
+
452
+ ### ✅ Step 6: Updating your repository
453
+
454
+ To update your local copy of **Tklr** to the latest version:
455
+
456
+ ```bash
457
+ # Navigate to your project directory
458
+ cd ~/Projects/tklr-dgraham # adjust this path as needed
459
+
460
+ # Pull the latest changes from GitHub
461
+ git pull origin master
462
+
463
+ # Reinstall in editable mode (picks up new code and dependencies)
464
+ uv pip install -e .
465
+ ```
466
+
467
+ ### Starting tklr for the first time
468
+
469
+ **Tklr** needs a _home_ directory to store its files - most importantly these two:
470
+
471
+ - _config.toml_: An editable file that holds user configuration settings
472
+ - _tkrl.db_: An _SQLite3_ database file that holds all the records for events, tasks and other reminders created when using _tklr_
473
+
474
+ Any directory can be used for _home_. These are the options:
475
+
476
+ 1. If started using the command `tklr --home <path_to_home>` and the directory `<path_to_home>` exists then _tklr_ will use this directory and, if necessary, create the files `config.toml` and `tklr.db` in this directory.
477
+ 2. If the `--home <path_to_home>` is not passed to _tklr_ then the _home_ will be selected in this order:
478
+
479
+ - If the current working directory contains files named `config.toml` and `tklr.db` then it will be used as _home_
480
+ - Else if the environmental variable `TKLR_HOME` is set and specifies a path to an existing directory then it will be used as _home_
481
+ - Else if the environmental variable `XDG_CONFIG_HOME` is set, and specifies a path to an existing directory which contains a directory named `tklr`, then that directory will be used.
482
+ - Else the directory `~/.config/tklr` will be used.
483
+
484
+ ### Configuration
485
+
486
+ These are the default settings in _config.toml_:
487
+
488
+ <!-- BEGIN CONFIG -->
489
+
490
+ ```toml
491
+ # DO NOT EDIT TITLE
492
+ title = "Tklr Configuration"
493
+
494
+ [ui]
495
+ # theme: str = 'dark' | 'light'
496
+ theme = "dark"
497
+
498
+ # ampm: bool = true | false
499
+ # Use 12 hour AM/PM when true else 24 hour
500
+ ampm = false
501
+
502
+ # dayfirst and yearfirst settings
503
+ # These settings are used to resolve ambiguous date entries involving
504
+ # 2-digit components. E.g., the interpretation of the date "12-10-11"
505
+ # with the various possible settings for dayfirst and yearfirst:
506
+ #
507
+ # dayfirst yearfirst date interpretation standard
508
+ # ======== ========= ======== ============== ========
509
+ # True True 12-10-11 2012-11-10 Y-D-M ??
510
+ # True False 12-10-11 2011-10-12 D-M-Y EU
511
+ # False True 12-10-11 2012-10-11 Y-M-D ISO 8601
512
+ # False False 12-10-11 2011-12-10 M-D-Y US
513
+ #
514
+ # The defaults:
515
+ # dayfirst = false
516
+ # yearfirst = true
517
+ # correspond to the Y-M-D ISO 8601 standard.
518
+
519
+ # dayfirst: bool = true | false
520
+ dayfirst = false
521
+
522
+ # yearfirst: bool = true | false
523
+ yearfirst = true
524
+
525
+ [alerts]
526
+ # dict[str, str]: character -> command_str.
527
+ # E.g., this entry
528
+ # d: '/usr/bin/say -v Alex "[[volm 0.5]] {subject}, {when}"'
529
+ # would, on my macbook, invoke the system voice to speak the subject
530
+ # of the reminder and the time remaining until the scheduled datetime.
531
+ # The character "d" would be associated with this command so that, e.g.,
532
+ # the alert entry "@a 30m, 15m: d" would trigger this command 30
533
+ # minutes before and again 15 minutes before the scheduled datetime.
534
+
535
+
536
+ # ─── Urgency Configuration ─────────────────────────────────────
537
+
538
+ [urgency.due]
539
+ # The "due" urgency increases from 0.0 to "max" as now passes from
540
+ # due - interval to due.
541
+ interval = "1w"
542
+ max = 8.0
543
+
544
+ [urgency.pastdue]
545
+ # The "pastdue" urgency increases from 0.0 to "max" as now passes
546
+ # from due to due + interval.
547
+ interval = "2d"
548
+ max = 2.0
549
+
550
+ [urgency.recent]
551
+ # The "recent" urgency decreases from "max" to 0.0 as now passes
552
+ # from modified to modified + interval.
553
+ interval = "2w"
554
+ max = 4.0
555
+
556
+ [urgency.age]
557
+ # The "age" urgency increases from 0.0 to "max" as now increases
558
+ # from modified to modified + interval.
559
+ interval = "26w"
560
+ max = 10.0
561
+
562
+ [urgency.extent]
563
+ # The "@e extent" urgency increases from 0.0 when extent = "0m" to "max"
564
+ # when extent >= interval.
565
+ interval = "12h"
566
+ max = 4.0
567
+
568
+ [urgency.blocking]
569
+ # The "blocking" urgency increases from 0.0 when blocked = 0 to "max"
570
+ # when blocked >= count. Blocked is the integer count of tasks in a project for which the given task is an unfinished prerequisite.
571
+ count = 3
572
+ max = 6.0
573
+
574
+ [urgency.tags]
575
+ # The "tags" urgency increases from 0.0 when tags = 0 to "max" when
576
+ # when tags >= count. Tags is the count of "@t" entries given in the task.
577
+ count = 3
578
+ max = 3.0
579
+
580
+ [urgency.priority]
581
+ # The "priority" urgency corresponds to the value from "1" to "5" of `@p`
582
+ # specified in the task. E.g, with "@p 3", the value would correspond to
583
+ # the "3" entry below. Absent an entry for "@p", the value would be 0.0.
584
+
585
+ "1" = -5.0
586
+
587
+ "2" = 2.0
588
+
589
+ "3" = 5.0
590
+
591
+ "4" = 8.0
592
+
593
+ "5" = 10.0
594
+
595
+
596
+ # In the default settings, a priority of "1" is the only one that yields
597
+ # a negative value, `-5`, and thus reduces the urgency of the task.
598
+
599
+ [urgency.description]
600
+ # The "description" urgency equals "max" if the task has an "@d" entry and
601
+ # 0.0 otherwise.
602
+ max = 2.0
603
+
604
+ [urgency.project]
605
+ # The "project" urgency equals "max" if the task belongs to a project and
606
+ # 0.0 otherwise.
607
+ max = 3.0
608
+ ```
609
+
610
+ <!-- END CONFIG -->
611
+
612
+ ## Keyboard Shortcuts
613
+
614
+ | Key | Context | Action |
615
+ | --------- | --------------- | ---------------------------- |
616
+ | `a` … `z` | Agenda/List | Show details for tagged item |
617
+ | `ctrl+e` | Details | Edit selected item |
618
+ | `ctrl+f` | Details (task) | Finish task / occurrence |
619
+ | `ctrl+n` | Anywhere | Create new item |
620
+ | `ctrl+r` | Details (recur) | Show repetitions |
621
+ | `ctrl+p` | Details (task) | Toggle pin |
622
+ | `ctrl+t` | Details | Touch (update modified time) |
623
+ | `escape` | Any | Back / Close screen |
624
+ | `?` | Any | Show help |