Todoist CLI¶
Source: sachaos/todoist Todoist CLI Client. I ❤️ Todoist and CLI.
sachaos/todoist is a CLI for Todoist written in Golang and available on GitHub.
Contents¶
- Installation
- Register API token
- Sync
- Usage
- [[#
list --filter
|list --filter
]] - Config
- Use with peco/fzf
- Enable shell completion
Installation¶
To install can use Homebrew (Unix):
brew tap sachaos/todoist
brew install todoist
or use Docker:
git clone https://github.com/sachaos/todoist.git
cd todoist
make docker-build token=<TODOIST_API_TOKEN>
make docker-run
Register API token¶
When you run todoist
for the first time, you will be asked your Todoist API Token.
Input Todoist API token and register it.
In order to get your API token go to https://todoist.com/prefs/integrations.
Sync¶
After you register your API token, you should sync with \sync
sub-command:
todoist sync
Usage¶
todoist --help
NAME:
todoist - Todoist CLI Client
USAGE:
todoist [global options] command [command options] [arguments...]
VERSION:
0.15.0
COMMANDS:
list, l Show all tasks
show Show task detail
completed-list, c-l, cl Show all completed tasks (only premium users)
add, a Add task
modify, m Modify task
close, c Close task
delete, d Delete task
labels Show all labels
projects Show all projects
karma Show karma
sync, s Sync cache
quick, q Quick add a task
help, h Show a list of commands or help for one command
GLOBAL OPTIONS:
--color colorize output
--csv output in CSV format
--debug output logs
--namespace display parent task like namespace
--indent display children task with indent
--project-namespace display parent project like namespace
--help, -h show help
--version, -v print the version
list --filter
¶
You can filter tasks by --filter
option on list
subcommand.
The filter syntax is base on todoist official filter syntax.
Supported filter is here.
e.g. List tasks which over due date and have high priority¶
todoist list --filter '(overdue | today) & p1'
Config¶
Config by default stored in $HOME/.config/todoist/config.json
It has following parameters:
{
"token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", # todoist api token, required
"color": "true" # colorize all output, not required, default false
}
Use with peco/fzf¶
RECOMMENDED
Install peco and load todoist_functions.sh
on your .zshrc
, like below.
fish version is here. ka2n/fish-peco_todoist Thanks @ka2n!
If you would prefer to use fzf instead load todoist_functions_fzf.sh
like below.
source "$GOPATH/src/github.com/sachaos/todoist/todoist_functions.sh"
If Installed via Homebrew¶
If installed via homebrew and using zsh (usually this is added to your .zshrc
, before loading your ZSH plugin manager):
For peco:
source $(brew --prefix)/share/zsh/site-functions/_todoist_peco
For fzf:
source $(brew --prefix)/share/zsh/site-functions/_todoist_fzf
Enable shell completion¶
You can also enable shell completion by adding the following lines to your .bashrc
/.zshrc
files.
# Bash
PROG=todoist source "$GOPATH/src/github.com/urfave/cli/autocomplete/bash_autocomplete"
# Zsh
PROG=todoist source "$GOPATH/src/github.com/urfave/cli/autocomplete/zsh_autocomplete"
Appendix: Related¶
Backlinks:
list from [[Tool-Template]] AND -"Changelog"