Introduction
TaskLite is a CLI task manager built with Haskell and SQLite.
$ tl add Buy milk +groceries
π Added task "Buy milk" with id "01dd62xryn5fnzjgynkcy06spb"
$ tl add Go running
π Added task "Go running" with id "01dd62yjtrtmaph23knff6mbsj"
$ tl
Id Prio Opened UTC Body
pb 2 2019-06-12 Buy milk +groceries
sj 0 2019-06-12 Go running
$ tl do pb
β
Finished task "Buy milk" with id "01dd62xryn5fnzjgynkcy06spb"
The Code is available on GitHub.
For help please come visit us on one of the following sites:
Latest Versions
- CLI version: 0.3.0.0
- App version: 0.3.0.0
Installation
Check out the following pages for instructions on how to install the different versions of TaskLite.
Updating
When you update to a newer version of TaskLite, all your data will automatically migrated to the latest version. This also works if you skip a few releases.
Nevertheless, it's highly recommended to run tasklite backup
before installing a new version.
Also be aware that rollbacks are currently not supported.
CLI Tool
Prebuilt Binaries
MacOS
Install it via my Homebrew tap:
brew cask install ad-si/tap/tasklite
You can also get this (and previous) versions from the releases page.
Make sure to download the artifacts with curl
or wget
as macOS prevents the execution of files downloaded via a browser.
Furthermore you can get the latest CI builds on GitHub's Actions page. They are quite stable since only tested and production ready code gets merged into the master branch.
Linux
You can get the latest versions on GitHub's Releases page.
Furthermore you can get the latest CI builds on GitHub's Actions page. They are quite stable since only tested and production ready code gets merged into the master branch.
Prebuilt Docker Image
Another easy way to get started is using the prebuilt Docker image:
docker run --rm adius/tasklite sh
tasklite help
When exiting the container all data will be discarded.
For repeated local usage run following command,
but make sure to replace $TASKLITE_PATH
with the path to your
TaskLite installation as defined in your config.yaml
file.
Per default it's created in the XDG base directory:
$HOME/.local/share/tasklite
.
docker run \
--rm \
--volume "$TASKLITE_PATH":/root/.local/share/tasklite \
adius/tasklite
To make it easier to use, create an alias like:
alias tl="docker run β¦"
Providing your own config.yaml
file to the docker container
is not yet supported.
From Source
To build TaskLite from source, you need to install Stack first.
git clone https://github.com/ad-si/TaskLite
cd TaskLite
stack install tasklite-core
To test the installation run:
tasklite help
Configuration
It's a good idea to customize your config file
at ~/.config/tasklite/config.yaml
afterwards.
Check out the example config file for infos about available settings.
Desktop App
Native GTK App
Attention: This is still early alpha
A few dependencies must be available to build the app. To install them on macOS run:
brew install \
gtk+3 \
libffi \
gobject-introspection \
gdk-pixbuf
git clone https://github.com/ad-si/TaskLite
cd TaskLite
stack install tasklite-app
It might be necessary to add the package "libffi" to the pkg-config search path before installation. For example with fish:
set -x PKG_CONFIG_PATH /usr/local/opt/libffi/lib/pkgconfig
Start it with:
tasklite-app
DB Browser for SQLite
Alternatively you can use the DB Browser for SQLite to view and modify your tasks directly in the SQLite database.
Web App
Datasette
The web app is currently based on Datasette and can only be used to view tasks, but not to create new ones.
In combination with the Docker container the web frontend for the SQLite database can be served in following way:
docker run \
--rm \
--entrypoint datasette \
--publish 8001:8001 \
--volume ~/TaskLite:/root/tasklite \
--volume "$PWD"/datasette:/root/datasette \
adius/tasklite \
serve \
--host 0.0.0.0 \
--metadata /root/datasette/metadata.json \
--reload \
/root/tasklite/main.db
Attention: Make sure that the IP address matches with your host's.
There is a predefined query for a tl head
like overview:
http://0.0.0.0:8001/main/tasks_pretty
Generate custom view by appending the SQL query to http://0.0.0.0:8001/main?sql=. For example http://0.0.0.0:8001/main?sql=select%20\*%20from%20tasks.
Some example views:
Equivalent to tl head
:
select substr(ulid,22) as ulid,priority,body,due_utc,
replace(tags,',',', ') as tags,notes,user
from tasks_view
where closed_utc is null
order by priority desc, due_utc asc, ulid desc
limit 50
Make sure to bookmark the views for easy access.
SQLite Web
Another way to host a simple web frontend is SQLite Web. While it's more bare bones than Datasette, it has the advantage that it also allows you to modify data.
docker run -it --rm \
-p 8080:8080 \
-v ~/TaskLite:/data \
-e SQLITE_DATABASE=main.db \
coleifer/sqlite-web
FAQs
Why another CLI task manager?
Answer:
Taskwarrior has been the gold standard for CLI task managers so far. However, I repeatedly lost tasks due to weird bugs and syncing issues. I also found several UI decisions inept and wanted something with a better workflow. But probably most importantly I couldn't see myself contributing to a C++ project. I had been working with C++ at university and it wasn't pleasant.
To sum it up: I finally wanted something which I could fully own and use until the end of days. That means:
- Does not suddenly get bought by a bigger fish and get closed down or made unusable (looking at you Wunderlist)
- Is written in a high-performance programming language, yet gives me lot's of guarantees about the code's stability and makes it easy for other developers to contribute
- Free software
- With a stable, future proof, powerful, and fast backend (currently SQLite, but support for plain files and Git is planned)
Why not Org-mode style?
Answer:
I don't like Org-mode's' unstructured combination of outlining, notes and tasks. Furthermore I don't like interactive document editing UIs in the terminal. I prefer REPL style apps which adhere to UNIX conventions and let me compose them easily with other CLI tools.
This, however, is just a personal preference and otherwise Org-mode is certainly a good solution. Also check out Smos, which is another powerful tree-based editor with extra focus on Getting Things Done.
What are your long term goals?
Answer:
For the product roadmap check out the dedicated page for it
However, this project is not just about the product, but just as well about the underlying values. Big companies are good at offering you fancy products without clarifying any of the adjacent issues which are crucial for an outstanding user experience beyond the product itself:
- Will this service also be available in the future?
- What are your incentives to keep this service alive?
- What happens if the company dies?
- Can I export my data in a practical format?
- Who has data sovereignty?
- How do you share / sell my data?
- β¦
Will this service also be available in the future?
Answer:
The code is completely free open source software and compiling and using it is straight forward. Whatever happens to me, TaskLite will always be available in this way.
What are your incentives to keep this service alive?
Answer:
I'm using it daily and it has become something like my second brain. Since I'm not interested in abandoning my brain, it will be maintained and further developed in the future.
What happens if you die?
Answer:
A good friend has access to the repository and can transfer it to the community.
Can I export my data in a practical format?
Answer:
Not locking you in is one of the most important aspects of TaskLite. Therefore it supports numerous export formats:
- NDJSON - One JSON object per task
- CSV
- SQL
- Direct access to the SQLite database
For more information check out the export documentation
Who has data sovereignty?
Answer:
All your data is stored in your TaskLite database on your computer. No analytics data or data of any other kind gets transfered to a third party during the usage of TaskLite.
How do you share / sell my data?
Answer:
We do not have access to any of your data!
Roadmap
There is no time frame when the following enhancements will be implemented since the amount of time I can spare to work on TaskLite fluctuates heavily.
However, I'm using it daily and it has become something like my second brain. Since I'm not interested in abandoning my brain, rest assured that there will be steady progress on this in the future.
The enhancements are roughly listed with descending priority.
Feature Parity with Taskwarrior
Since TaskLite started out as a replacement for Taskwarrior, one of my main goals is to reach feature parity with it. Some of the major features still missing:
- Hooks
- History View
- Burndown Chart
- Calendar View
Check out the page "Differences to Taskwarrior" for a detailed comparison.
Tasklite Core
Currently the core of TaskLite and the CLI are somewhat mixed up in the code. I'd like to split them up, so that TaskLite Core can be used as a library in other applications which need to manage internal tasks / queues.
Check out the page Haskell API for Programmatic Usage for more information.
Server and Webapp
I'd like to be able to run TaskLite on a cheap v-server in a dedicated server mode and have it host a simple REST API, and an Elm webapp consuming it.
This would then be a good way to casually browse and edit the tasks in a more graphical way.
Syncing
There is no concrete plan for native synchronization support yet. I've been using Dropbox for synchronizing the TaskLite database among several computers, which has worked astonishingly well so far.
Another good solution could be Litestream, which continuously streams SQLite changes to S3-compatible storage.
Desktop App
While there is already a prototype included in the code, I currently don't plan to further work on it any time soon.
Concepts
States
Instead of allowing one to explicitly set a state, TaskLite infers the current state from several other fields.
There are 2 primary states:
Open
- Waits to be doneClosed
- Nothing left to be done
And 9 exclusive secondary states.
Asleep
- Is hidden because it's not relevant yetAwake
- Has become relevant or will become soonReady
- Is ready to be done (similar to Open)Waiting
- It's still unclear if the task needs to be done or really has been done. Regular checks are necessary until situation clears up.Review
- It's necessary to check if the task can finally be started or if it has finally been completed.Done
- Has been doneObsolete
- Has become obsolete or impossible to finishDeletable
- Not needed anymore and can be deleted (item in the trash)Blocked
- Some other task(s) must be done first. Blockers are stored in a separate table.
Β
State\Field | awake_utc | ready_utc | waiting_utc | review_utc | closed_utc | state |
---|---|---|---|---|---|---|
Open | β | β | β | β | β | β |
ββAsleep | > now | > now or β | β | β | β | β |
ββAwake | < now | > now or β | β | β | β | β |
ββReady | < now or β | < now | β | β | β | β |
ββWaiting | β | β | < now | > now or β | β | β |
ββReview | β | β | β | < now | β | β |
ββBlocked | β | β | β | β | β | β |
Closed | β | β | β | β | β | β |
ββDone | β | β | β | β | β | Done |
ββObsolete | β | β | β | β | β | Obsolete |
ββDeletable | β | β | β | β | β | Deletable |
Legend:
- β = Set
- β = Not set
- β = Maybe set
Tertiary states:
Repeating
- If this task get completed, a duplicate will be created with the specified time offset. I.e. subsequent tasks get delayed (e.g. mowing the lawn)Recurring
- Task which needs to be done every day, week, etc. I.e. missed completions must be caught up immediately. (e.g. paying rent) The number of tasks which will be created in advance can be set via a config.Frozen
- Was previously repeating or recurring but has been stopped for the time being.
State\Field | group_ulid | repetition_duration | recurrence_duration |
---|---|---|---|
Repeating | β | β | β |
Recurring | β | β | β |
Frozen | β | β | β |
A task is either recurring or repeating, but can't be both at the same time. For more information and examples check out the corresponding documentation page
Priority
The priority of a task is a decimal number between negative and positive inifity. It is automatically calculated based on the age, the due date, and several other values.
The idea is that you never have to manually set a priority, because it can be derived accurately from other values. This of course requires you to use the other available meta information adequately!
The exact calculation algorithm can be found
in the taskViewQuery
function in DbSetup.hs.
If you want to adjust the priority of selected tasks manually,
you can use the tl boost [ulid]
command to increase the priority by 1,
or the tl hush [ulid]
command to decrease it by 1.
Notes
A task can have several notes. Each note is identified by an ULID.
$ tl add Buy milk
π Added task "Buy milk" with id "01dpgj8e9ws2dwgvsk5nmrvvg9"
$ tl note 'The vegan one from Super Buy' 01dpgj8e9ws2dwgvsk5nmrvvg9
π Added a note to task "Buy milk" with id "01dpgj8e9ws2dwgvsk5nmrvvg9"
$ tl info 01dpgj8e9ws2dwgvsk5nmrvvg9
awake_utc: null
review_utc: null
state: null
repetition_duration: null
recurrence_duration: null
body: Buy milk
user: adrian
ulid: 01dpgj8e9ws2dwgvsk5nmrvvg9
modified_utc: 2019-10-06 12:59:46
group_ulid: null
closed_utc: null
priority_adjustment: null
metadata: null
waiting_utc: null
ready_utc: null
due_utc: null
priority: 1.0
tags:
notes:
- note: The vegan one from Super Buy
ulid: 01dpgjf35pq74gchsgtcd6fgsa
Repetition and Recurrence
The difference between repetition and recurrence is the reference point from which future tasks are calculated from.
For repetition, it's the closing datetime. E.g. if a task gets completed, a duplicate will be created with the specified time offset added to the closing datetime. Check out the "Mow the law" example below for more details.
Recurring tasks are tasks which need to be done every day, week, etc. and must not be delayed. I.e. missed completions must be caught up immediately. Check out the "Pay the rent" example below for more details.
A task is either recurring or repeating, but can't be both at the same time. For both repetition and recurrence series, only the currently active task exists and subsequent tasks will be created on demand, once the current task is closed.
Example for Repetition
$ tl add Mow the lawn due:2020-10-01
π Added task "Mow the lawn" with id "01eme2w9pqbmgme5zcwr9hpfbc"
$ tl repeat P1M 01eme2w9pqbmgme5zcwr9hpfbc
π
Set repeat duration of task "Mow the lawn"
with id "01eme2w9pqbmgme5zcwr9hpfbc" to "P1M"
$ tl info 01eme2w9pqbmgme5zcwr9hpfbc
Mow the lawn
State: Open
Priority: 12.0
ULID: 01eme2w9pqbmgme5zcwr9hpfbc
π
Due 2020-10-01 00:00:00
β¬
π Created 2020-10-12 09:39:48
β¬
βοΈ Modified 2020-10-12 09:39:58
Repetition Duration: P1M
Group Ulid: 01eme2wm3e4wcwacnw9ha7ffs1
User: adrian
$ tl do 01eme2w9pqbmgme5zcwr9hpfbc
β
Finished task "Mow the lawn" with id "01eme2w9pqbmgme5zcwr9hpfbc"
β‘οΈ Created next task "Mow the lawn"
in repetition series "01eme2wm3e4wcwacnw9ha7ffs1"
with id "01eme2xe4vjv3yd3gkg0a9y8j8"
$ tl info 01eme2xe4vjv3yd3gkg0a9y8j8
Mow the lawn
State: Open
Priority: 3.0
ULID: 01eme2xe4vjv3yd3gkg0a9y8j8
βοΈ Modified 2020-10-12 09:39:58
β¬
π Created 2020-10-12 09:40:25
β¬
π
Due 2020-11-12 09:39:58
Repetition Duration: P1M
Group Ulid: 01eme2wm3e4wcwacnw9ha7ffs1
User: adrian
Example for Recurrence
$ tl add Pay rent due:2020-10-01
π Added task "Pay rent" with id "01eme47dje7bpkmz01s5xdtw15"
$ tl recur P1M 01eme47dje7bpkmz01s5xdtw15
π
Set recurrence duration of task "Pay rent"
with id "01eme47dje7bpkmz01s5xdtw15" to "P1M"
$ tl info 01eme47dje7bpkmz01s5xdtw15
Pay rent
State: Open
Priority: 12.0
ULID: 01eme47dje7bpkmz01s5xdtw15
π
Due 2020-10-01 00:00:00
β¬
π Created 2020-10-12 10:03:21
β¬
βοΈ Modified 2020-10-12 10:03:32
Recurrence Duration: P1M
Group Ulid: 01eme47s0yy848wvbsyxh9mpj6
User: adrian
$ tl do 01eme47dje7bpkmz01s5xdtw15
β
Finished task "Pay rent" with id "01eme47dje7bpkmz01s5xdtw15"
β‘οΈ Created next task "Pay rent"
in recurrence series "01eme47s0yy848wvbsyxh9mpj6"
with id "01eme487qmxj7jm4mtn5n59nbg"
$ tl info 01eme487qmxj7jm4mtn5n59nbg
Pay rent
State: Open
Priority: 3.0
ULID: 01eme487qmxj7jm4mtn5n59nbg
βοΈ Modified 2020-10-12 10:03:32
β¬
π Created 2020-10-12 10:03:47
β¬
π
Due 2020-11-01 00:00:00
Recurrence Duration: P1M
Group Ulid: 01eme47s0yy848wvbsyxh9mpj6
User: adrian
Import / Migration
This is a best effort list on how to import your tasks from other task managers to TaskLite.
YAML File
If you have all you tasks in one YAML file like this:
- id: 123
body: Buy milk
tags: [groceries]
- id: 456
body: Go running
tags: [sport]
Run following command to import it. Be sure to make yaml2json available in your path and to install jq first.
cat tasks.yaml \
| yaml2json \
| jq -c '.[]' \
| while read -r task
do
echo "$task" | tasklite importjson
done
Taskwarrior
TaskLite supports all fields of Taskwarrior's export format. Therefore migration is really simple:
task export rc.json.array=off \
| while read -r task; \
do echo $task | tasklite importjson; \
done
Google Tasks
There is currently no proper way to export tasks.
A workaround is:
- Open the standalone view of Google Tasks
- Select all text with
cmd + a
and copy it - Paste it in a text editor
- Format it properly
- Import it with a
while
loop as seen in the Taskwarrior section
Google Keep
You can export all tasks / notes from Google Keep via Google Takeout.
It provides a Takeout/Keep
directory
with one .html
and .json
file per task.
To import the .json
files,
change into the directory and run following command:
find . -iname '*.json' \
| while read -r task
do
jq -c \
'.textContent as $txt
| .labels as $lbls
| .title as $title
| (if .isArchived then "done"
elif .isTrashed then "deletable"
else null
end) as $state
| {
utc: .userEditedTimestampUsec,
body: ((if $title and $title != "" then $title else $txt end)
+ (if .listContent
then "\n\n" +
(
.listContent
| map("- [" + (if .isChecked then "x" else " " end) + "] "
+ .text)
| join("\n")
)
else ""
end))
}
| if $lbls then . + {tags: ($lbls | map(.name))} else . end
| if $title and $title != "" and $txt and $txt != ""
then . + {notes: [{body: $txt}]}
else .
end
| if $state then . + {state: $state} else . end
' \
"$task" \
| tl importjson
done
The title of the Google Keep note becomes the body of the task and the note itself becomes a TaskLite note attached to the task. A list of sub-tasks will be converted to a GitHub Flavored Markdown task list.
Telegram
Telegram's "Saved Messages" -- a.k.a. messages to oneself -- are a pretty convenient inbox. Here is how to move them to TaskLite afterwards:
- Install Telegram Desktop
- Go to "Saved Messages"
- Click on 3 dots in the upper right corner
- Deselect all additional media and select "JSON" as output format
- Approve download on a mobile device
- Download the JSON file and clean it up
- Import data as described in the section for YAML files
- Clear chat history on Telegram
Hooks
Hooks can either be specified via the config file or via hook files. But make sure that all hook files are executable, otherwise they won't be picked up by TaskLite.
Following stages are available:
pre-launch
- After reading all configs, but before any TaskLite code is executed. Can be used to prevent execution of TaskLite.post-launch
- After reading CLI arguments, setting up the database and running all migrations.pre-add
- Right before adding a new task. Can be used to prevent addition of task.post-add
- After new task was added.pre-modify
- Right before a task gets modified. Can be used to prevent modification of task.post-modify
- After task was modified.pre-exit
- Pre printing resultspost-exit
- Last thing before program termination
The hooks receive data from TaskLite via stdin. Possible fields are:
{
arguments: [β¦], // Command line arguments (after `tasklite`)
taskOriginal: {}, // Task before any modifications by TaskLite
taskModified: {}, // Modified task
}
After execution, every called hook must print a JSON object to stdout (even if it's empty). All fields of the JSON are optional.
Explanation of possible values:
{
message: "β¦", // A message to display on stdout
taskModified: "β¦", // New version of the task as computed by your script
tasksToAdd: [β¦], // Additional tasks to add
}
Hooks can write to stderr at any time, but it is not recommended.
Rather write a {message: ''}
object to stdout and
let TaskLite print the message with improved formatting and coloring.
Legend:
- β = Not available
->
= Must return following object (fields optional) on stdout
Event | Input | Success (exitcode == 0) |
Error (exitcode != 0) |
---|---|---|---|
pre‑launch |
β | -> { message: "β¦", } |
-> {message: "β¦"}Processing terminates |
post‑launch |
{ arguments: [β¦] } |
{ message: "β¦" } |
{stderr: "β¦"}Processing terminates |
pre‑add |
{ arguments: [β¦], taskToAdd: {} } |
{ taskToAdd: {}, message: "β¦" } |
{stderr: "β¦"}Processing terminates |
post‑add |
{ arguments: [β¦], taskAdded: {} } |
{ message: "β¦" } |
{stderr: "β¦"}Processing terminates |
pre‑modify |
{ arguments: [β¦], taskOriginal: {} } |
{ taskModified: {}, message: "β¦" } |
{stderr: "β¦"}Processing terminates |
post‑modify |
{ arguments: [β¦], taskOriginal: {}, taskModified: {} } |
{ taskModified: {}, message: "β¦" } |
{stderr: "β¦"}Processing terminates |
pre‑exit |
{} |
{ message: "β¦" } |
{stderr: "β¦"}Processing terminates |
post‑exit |
{} |
{ message: "β¦" } |
{stderr: "β¦"}Processing terminates |
Β
To see the JSON for a single task run:
tl ndjson | head -n 1 | jq
Usage
While the CLI interface is the main interface of TaskLite, it also supports several others (with varying amount of features).
Check out the following pages for more details.
CLI Tool
Add
To add a task run:
tl add Improve the TaskLite manual
It is also possible to immediately add tags when creating a task:
tl add Improve the TaskLite manual +tasklite +pc
And even to set certain fields:
tl add Buy milk +groceries due:2020-09-01 created:2020-08-27
Attention: The tags and special commands must be the last parameters, but their order doesn't matter.
Help
For a full overview of all supported subcommands run:
tasklite help
Context / Views
There is no first class support for views (or "context" in GTD slang), because it can be easily implemented with aliases / custom CLI commands and the SQL query API.
For example I have following work
command in my $PATH
:
#! /usr/bin/env bash
tasklite query \
"(tags is null or tags not like '%feram%') \
and state is 'Open' \
order by priority desc, due_utc asc, ulid desc \
limit 10"
Analyze and Filter Tasks
In order to further analyze and filter tasks TaskLite includes the
ndjson
command, which prints all tasks as newline delimited JSON objects.
This output can then easily be analyzed and filtered with standard UNIX tools. E.g. following example prints all tasks related to music:
tl ndjson | grep 'music' | jq
Import
TaskLite features a comprehensive and robust JSON importer.
For example to import a GitHub issue simply run:
curl https://api.github.com/repos/$OWNER/$REPO/issues/$NUM | tl import
Or to import a task from TaskWarrior:
task 123 export | tl import
In order to avoid data loss of fields which aren't directly
supported by TaskLite, the whole imported JSON object is also stored
in TaskLite's task metadata
field.
However, if the original JSON object already has a metadata
field,
its value is used instead.
Attention:
An import object's tags
field must be of type [string]
,
while a notes
field must be of type {ulid?: string, body: string}
.
Warning: TaskLite does not properly support importing tasks which were created before 1970. While they can be imported, the creation date is set to 1970-01-01.
Export
Use one of following commands:
tl csv
tl ndjson
tl backup
- Creates a backup at$TaskLiteDir/backups/YYYY-MM-DDtHHMM.db
Custom Views
The export commands in combination with other common CLI tools like csvkit can also be used for custom views of tasks.
tl csv \
| csvgrep --column tags --match tasklite \
| head -n 6 \
| csvcut --columns ulid,body,tags \
| csvlook --max-column-width 30
yields
| ulid | body | tags |
| -------------------------- | ------------------------------ | -------- |
| 01chk64zwwjyybanvk7016hyyg | Add a burndown chart view | tasklite |
| 01chk6c08h70xra2awd8dngtr7 | Add multi user support | tasklite |
| 01chk6dxaxttwfyg019d3g3sze | Add a statistics view | tasklite |
| 01chk6f3sq1mrskgkt1046fz7q | Add a calendar view | tasklite |
| 01chk6vnm30ttvwc1qkasjaktm | Publish the TaskLite git re... | tasklite |
Metadata
The metadata field allows you to store additional data for each task which is not yet covered by TaskLite's core fields. It is stored as a JSON object and therefore supports all JSON datatypes.
This is similar to Taskwarrior's User Defined Attributes.
Metadata is especially useful for importing and migrating external tasks without losing any information.
If you, for example, want to import following task.json
file,
you will notice that it contains a field kanban-state
, which has
no equivalent in TaskLite:
{
"created_at": "2020-02-08T20:02:32Z",
"body": "Buy milk",
"kanban-state": "backlog"
}
However, you can still simply import it, as the additional field will be stored in the metadata object:
$ tl import < task.json
π₯ Imported task "Buy milk" with ulid "01e0k6a1p00002zgzc0845vayw"
Inspecting it:
$ tl info 01e0k6a1p00002zgzc0845vayw
awake_utc: null
review_utc: null
state: null
repetition_duration: null
recurrence_duration: null
body: Buy milk
user: adrian
ulid: 01e0k6a1p00002zgzc0845vayw
modified_utc: 1970-01-01T00:00:00Z
group_ulid: null
closed_utc: null
priority_adjustment: null
metadata:
body: Buy milk
kanban-state: backlog
created_at: 2020-02-08T20:02:32Z
waiting_utc: null
ready_utc: null
due_utc: null
priority: 0.0
tags:
notes:
To access the the metadata key programmatically you can do following:
$ tl ndjson \
| grep 01e0k6a1p00002zgzc0845vayw \
| jq -r '.metadata["kanban-state"]'
backlog
Or leverage SQL:
$ tl runsql "
select json_extract(metadata, '\$.kanban-state')
from tasks
where ulid == '01e0k6a1p00002zgzc0845vayw'
" \
| tail -n 1
backlog
This can also be used to update metadata fields:
tl runsql "
update tasks
set metadata=(
select json_set(tasks.metadata, '$.kanban-state', 'sprint')
from tasks
where ulid == '01e0k6a1p00002zgzc0845vayw'
)
where ulid == '01e0k6a1p00002zgzc0845vayw'
"
Β
Soon TaskLite will also support a dedicated metadata
command like:
tl metadata get kanban-state 01e0k6a1p00002zgzc0845vayw
and
tl metadata set kanban-state sprint 01e0k6a1p00002zgzc0845vayw
Desktop App
The desktop app is still very early alpha and can currently only list the tasks. It's implemented with a declarative Haskell wrapper for GTK.
Web App
The web app is currently provided by Datasette.
REST API
The REST API is currently provided by Datasette.
All web views can be configured to deliver JSON
by simply changing the file extension in the URL to .json
.
For example:
curl --location http://0.0.0.0:8001/main/tasks_view.json
Haskell API for Programmatic Usage
While TaskLite is primarily a tool to manage your personal tasks, it can also be used as a dependency of other programms.
For example as a queue for processing tasks or a backend for a bookmarking service.
Automation
The real power of TaskLite gets unlocked when it's set up to be tightly integrated with other apps. This section contains several examples of how it can work together with other systems and services.
Folder Actions on MacOS
Folder actions are a feature on macOS to execute some code when files are added to a specific directory.
This can for example be used to import all Email files (.eml
)
which are saved in a directory.
Setup
-
Open Automator and create a new Folder Action:
-
Specify the directory via the select field at the top
-
Add a "Run Shell Script" block with following bash code:
set -euo pipefail input=$(cat -) result=$(/Users/adrian/.local/bin/tasklite import "$input" 2>&1 || true) resultNorm=${result//[^a-zA-Z0-9 \/:.]/ } osascript -e \ "display notification \"${resultNorm:0:80}\" with title \"Email was imported into TaskLite\""
-
Save the folder action
Differences to Taskwarrior
General
-
Simpler
Taskwarrior has several redundant features and unnecessarily re-implements shell features like aliases. -
More Robust & Stable
Taskwarrior is plagued by numerous bugs due to its unnecessary complexity and non-optimal choice of programming languages. TaskLite's simple structure and Haskell's excellent correctness guarantees, however, yield a stable and robust piece of software. -
Faster
Haskell plus SQLite delivers excellent performance. Check out the section about performance for a simple benchmark. -
More Powerful
As all tasks are stored in an SQLite database, so you can use the most daring SQL queries to extract hidden insights. E.g. What is the average completion time for a task created on Monday tagged "sprint7" created by user "john-evil"?Furthermore, extensive tooling is available for SQLite to supercharge your TaskLite installation. For example Datasette as an instant REST API, or DB Browser for SQLite to view, manipulate, and plot your tasks in a GUI.
Other 3rd party tools to edit SQLite databases are:
Command Comparison
TW Command | TL Command | Description & Differences |
---|---|---|
add | add | Add a new task |
annotate | note | Add a note / comment / annotation to a task |
append | - | Append words to a task description |
calc | - | Expression calculator |
config | config | TL only displays it, TW allows modification |
context | - | Manage contexts. TL uses tags instead. |
count | count | Count the tasks matching a filter |
delete | trash | Mark a task as deletable |
denotate | unnote | Remove an annotation from a task |
done | do | Complete a task |
duplicate | duplicate | Clone an existing task |
edit | edit | Launch your text editor to modify a task |
execute | - | Execute an external command |
export | ndjson | Export tasks in NDJSON instead of JSON format |
help | help | Show high-level help, a cheat-sheet |
import | import | Additionally to JSON supports Email files (.eml) |
log | log | Record an already-completed task |
logo | - | Show the Taskwarrior logo |
modify | - | Modify one or more tasks |
prepend | - | Prepend words to a task description |
purge | delete | Completely remove task, rather than just change status |
start | start | Start working on a task, make active |
stop | stop | Stop working on a task, no longer active |
synchronize | - | Syncs tasks with Taskserver |
undo | - | Revert last change |
version | version | Version details and copyright |
active | - | Started tasks |
all | all | Pending, completed and deleted tasks |
blocked | - | Tasks that are blocked by other tasks |
blocking | - | Tasks that block other tasks |
completed | done | Tasks that have been completed |
list | open | Pending tasks |
long | - | Pending tasks, long form |
ls | - | Pending tasks, short form |
minimal | - | Pending tasks, minimal form |
newest | new | Most recent pending tasks |
next | head | Most urgent tasks |
oldest | - | Oldest pending tasks |
overdue | overdue | Overdue tasks |
ready | ready | Pending, unblocked, scheduled tasks |
recurring | recurring | Pending recurring tasks |
unblocked | - | Tasks that are not blocked |
waiting | waiting | Hidden, waiting tasks |
burndown.daily | - | Burndown chart, by day |
burndown.monthly | - | Burndown chart, by month |
burndown.weekly | - | Burndown chart, by week |
calendar | - | Calendar and holidays |
colors | - | Demonstrates all supported colors |
columns | - | List of report columns and supported formats |
commands | help | List of commands, with their behaviors |
diagnostics | - | Show diagnostics, for troubleshooting |
ghistory.annual | - | History graph, by year |
ghistory.monthly | - | History graph, by month |
ghistory.weekly | - | History graph, by week |
ghistory.daily | - | History graph, by day |
history.annual | - | History report, by year |
history.monthly | - | History report, by month |
history.weekly | - | History report, by week |
history.daily | - | History report, by day |
ids | - | Filtered list of task IDs |
information | info | All attributes shown |
projects | projects | List of projects (project in TL = active tag) |
reports | help | List of available reports |
show | config | Filtered list of configuration settings |
stats | stats | Filtered statistics |
summary | projects | Filtered project summary |
tags | tags | Filtered list of tags |
timesheet | - | Weekly timesheet report |
udas | - | Details of all defined UDAs |
uuids | - | Filtered list of UUIDs |
_aliases | - | List of active aliases |
_columns | - | List of supported columns |
_commands | - | List of supported commands |
_config | - | List of confguration setting names |
_context | - | List of defined context names |
_get | - | DOM accessor |
_ids | - | Filtered list of task IDs |
_projects | - | Filtered list of project names |
_show | - | List of name=value configuration settings |
_tags | - | Filtered list of tags in use |
_udas | - | List of configured UDA names |
_unique | - | List of unique values for the specified attribute |
_urgency | - | Filtered list of task urgencies |
_uuids | - | Filtered list of pending UUIDs |
_version | - | Task version (and optional git commit) |
_zshattributes | - | Zsh formatted task attribute list |
_zshcommands | - | Zsh formatted command list |
_zshids | - | Zsh formatted ID list |
_zshuuids | - | Zsh formatted UUID list |
- | random | Show a random open task |
Performance
Coming soon!
Development
Main technologies:
- Programming language: Haskell
- Dependency management: Stack
- Backend: SQLite
- Database access: Beam
- Command line parsing: Optparse Applicative
- Formatting: Prettyprinter
- Prelude: Protolude
- IDs: ULID
- Desktop App: Declarative GTK
Check out the makefile for all development tasks
Generate Screenshots
Use asciinema to generate the terminal recording:
asciinema rec \
--title 'TaskLite Help Page' \
--command 'tasklite help' \
--overwrite \
screenshots/recording.json
asciinema rec \
--title 'TaskLite "withtag" Command' \
--command 'tasklite withtag tasklite' \
--overwrite \
screenshots/withtag.json
Change the size of the terminal in the recording.json file to:
"width": 80,
"height": 86,
Then use svg-term to generate the SVG image:
svg-term \
--no-cursor \
--at 99999 \
--window \
--term iterm2 \
--profile ~/dotfiles/terminal/adius.itermcolors \
< screenshots/recording.json \
> screenshots/recording.svg
Ghcid
Ghcid with color output for GHC 8.4 (probably obsolete in 8.6):
ghcid \
--command="stack ghci --ghci-options=-fdiagnostics-color=always"
Hlint
hlint \
--ignore="Redundant do" \
--ignore="Use list literal" \
--ignore="Use String" \
--ignore="Redundant bracket" \
--ignore="Use camelCase" \
.
Webapp
Build Images
Build base image for webapp runtime image:
docker build \
--file tasklite-core/dockerfiles/haskell-datasette \
--tag haskell-datasette \
dockerfiles
Build runtime image:
stack image container
docker tag adius/tasklite-tasklite:latest adius/tasklite:latest
Deployment
On Google Cloud:
docker tag adius/tasklite-tasklite:latest gcr.io/deploy-219812/tasklite:latest
docker push gcr.io/deploy-219812/tasklite:latest
kubectl create -f kubernetes/deployment.yaml
kubectl port-forward tasklite-deployment-77884ff4f6-66sjf 8001
Open 127.0.0.1:8001
docker build \
--file dockerfiles/nginx-proxy \
--tag gcr.io/deploy-219812/nginx-proxy:latest \
dockerfiles; \
and docker push gcr.io/deploy-219812/nginx-proxy:latest; \
and kubectl replace --filename kubernetes/deployment.yaml --force; \
and sleep 8;
and kubectl port-forward \
(kubectl get pods --selector app=tasklite --output name) 8080
Afterwards change the health check URL to /healthcheck
for the load balancer at
https://console.cloud.google.com/compute/healthChecks.
Changelog
This document lists all changes to the functionality of TaskLite.
2020-03-01 - 0.3.0.0
- Add
edit
command to edit YAML version of task in$EDITOR
(1add89e) - Add several
un*
commands to erase fields (0f09c3d) - Only execute trigger to set
closed_utc
after state changed (395a8e0) - Show descriptive variable names in brief help text (10f8cf6)
- Hide aliases from main help (c52df72)
- Display alias errors even with subarguments (c52df72)
- Fix parsing of timestamp part in ULIDs for small timestamp values (258df47)
- Also display full version slug with
tl version
(0c292d1) - Remove unnecessary import logging (c04b894)
- Add git hash to the version string (5f7b1ef)
- Create config directory if it does not exist (8d0657c)
2019-10-04 - 0.2.2.0
- Support optional filter expression after "count" command (61e87b7)
- Automatically create a config file if it doesn't exist (7407f87)
2019-07-14 - 0.2.1.0
- Fix creation of Docker image, extend documentation accordingly (fa4cad3)
2019-06-13 - 0.2.0.0
- Initial release
Related
If TaskLite isn't your cup of tea, maybe one of the other free task managers fits the bill:
Name | Description |
---|---|
Buku | Store and manage your bookmarks from the command line |
CommitTasks | Combination between git commit and todo list |
Dstask | Single binary CLI todo manager with git sync and markdown notes |
Eagle | Minimalistic todo app for command line |
Etm | Event and task manager |
Eureka | CLI tool to input and store ideas without leaving the terminal |
Ff | A distributed note taker and task manager |
git-pending | Git plugin to list TODO, FIXME, β¦ comments in a repository |
nb | CLI note-taking, bookmarking, archiving, and knowledge base app |
Org mode | Notes and todo lists powered by an Emacs based plain-text system |
Pomoday | Keyboard only task management web app |
Smos | Purely functional semantic tree-based editor (like Org mode) |
t | Minimal command-line todo list manager |
Taskbook | Tasks, boards & notes for the command-line habitat |
Taskell | Command line Kanban board / task management |
Taskwarrior | Command line task management |
Todo.txt | Simple and extensible shell script for managing a todotxt file |
Toodles | Project management from the TODO's in your codebase |
Tracli | Command line app that tracks your time |
Ultralist | Open source task management system for the command line |
Unfog | A simple CLI task and time manager |
Work | CLI TODO app written with Rust and SQLite |
Yokadi | Command line oriented, SQLite powered todo list |
Comparison
Status on 2020-03-02:
Nr | Name | Stars | Commits | Contrib. | Code | 1. Commit |
---|---|---|---|---|---|---|
1 | Taskbook | 7449 | 227 | 25 | JavaScript | 2018β02β12 |
2 | Todo.txt | 3907 | 444 | 42 | Shell | 2009β03β05 |
3 | Buku | 3396 | 1699 | 52 | Python | 2015β11β02 |
4 | Org mode | ~3000 | 22935 | 543 | EmacsLisp | 2003β01β01 |
5 | nb | 2035 | 3420 | 3 | Shell | 2014-11-12 |
6 | Taskwarrior | 1145 | 9016 | 83 | C++ | 2008β04β19 |
7 | Toodles | 944 | 207 | 13 | Haskell | 2018β09β04 |
8 | Taskell | 834 | 989 | 7 | Haskell | 2017β11β15 |
9 | Ultralist | 707 | 356 | 15 | Go | 2016β04β23 |
10 | t | 632 | 97 | 9 | Python | 2009-08-26 |
11 | Pomoday | 443 | 149 | 12 | TypeScript | 2019β10β24 |
12 | CommitTasks | 290 | 94 | 4 | JavaScript | 2018β08β17 |
13 | git-pending | 257 | 37 | 2 | JavaScript | 2019β06β17 |
14 | Eureka | 161 | 147 | 7 | Rust | 2017β11β20 |
15 | Ff | 128 | 775 | 9 | Haskell | 2017β12β29 |
16 | Dstask | 125 | 479 | 2 | Go | 2018-12-08 |
17 | Yokadi | 113 | 1159 | 12 | Python | 2008β08β24 |
18 | Smos | 113 | 797 | 5 | Haskell | 2018β07β29 |
19 | Unfog | 49 | 104 | 1 | Haskell | 2019β10β22 |
20 | TaskLite | 44 | 234 | 1 | Haskell | 2018β06β04 |
21 | Tracli | 33 | 56 | 2 | JavaScript | 2019β07β15 |
22 | Etm | 13 | 3203 | 2 | Python | 2017β09β02 |
23 | Work | 12 | 65 | 1 | Rust | 2020β07β15 |
24 | Eagle | 10 | 46 | 1 | Python | 2018β10β28 |
Commercial
For completeness sake here is also a list of popular commercial apps and SaaS providers:
- Asana - Your teamβs goals, plans, tasks, files together in one shared space.
- Google Keep - Hybrid note taking and todo app.
- Jira - Bug- & issue-tracking and project-management service.
- Microsoft TODO - Cloud based task management application.
- Nirvana - To-do app available on macOS, Android, Windows, and web.
- Remember The Milk - Web based task- and time-management.
- Tasker - Tool for managing tasks, processes and employees.
- TaskPaper - Plain text to-do lists (macOS app).
- Things - Personal task manager to achieve your goals (Apple only).
- Todoist - SaaS to-do list to organize work and life.
- Trello - Web based Kanban list-making application.