@mindtnv/todoist-cli 0.2.0

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +275 -0
  3. package/dist/index.js +7998 -0
  4. package/package.json +56 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mindtnv
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.
package/README.md ADDED
@@ -0,0 +1,275 @@
1
+ <p align="center">
2
+ <h1 align="center">todoist-cli</h1>
3
+ <p align="center">A fast, keyboard-driven Todoist client for the terminal</p>
4
+ </p>
5
+
6
+ <p align="center">
7
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT"></a>
8
+ <img src="https://img.shields.io/badge/runtime-Bun-f9f1e1" alt="Bun">
9
+ <img src="https://img.shields.io/badge/version-0.2.0-green" alt="Version">
10
+ </p>
11
+
12
+ ---
13
+
14
+ Two ways to use it: a **full interactive TUI** with vim-style navigation, or **scriptable CLI commands** that pipe and compose with other tools.
15
+
16
+ ## Features
17
+
18
+ - **Interactive TUI** with sidebar, multi-select, and command palette
19
+ - **Quick-add** with natural language — `todoist a "Buy milk tomorrow #Shopping p1 @errands"`
20
+ - **Vim-style navigation** — `j`/`k`, `gg`/`G`, `/` to search
21
+ - **Optimistic UI** — actions feel instant, synced in the background
22
+ - **10-second undo** for destructive actions (complete, delete, move)
23
+ - **Pipe-friendly output** — `--json`, `--csv`, `--tsv`, `--quiet` for scripting
24
+ - **Eisenhower matrix**, weekly review, productivity stats
25
+ - **Saved filters** registered as top-level commands
26
+
27
+ ## Installation
28
+
29
+ ### Prerequisites
30
+
31
+ - [Bun](https://bun.sh) v1.0+
32
+ - A [Todoist](https://todoist.com) account
33
+
34
+ ### From source
35
+
36
+ ```bash
37
+ git clone https://github.com/your-username/todoist-cli.git
38
+ cd todoist-cli
39
+ bun install
40
+ bun link # makes `todoist` available globally
41
+ ```
42
+
43
+ ### Authentication
44
+
45
+ ```bash
46
+ todoist auth
47
+ # Paste your API token from https://todoist.com/app/settings/integrations/developer
48
+ ```
49
+
50
+ Or set the environment variable:
51
+
52
+ ```bash
53
+ export TODOIST_API_TOKEN="your-token-here"
54
+ ```
55
+
56
+ ## Quick Start
57
+
58
+ ```bash
59
+ # See today's tasks
60
+ todoist today
61
+
62
+ # Add a task with natural language
63
+ todoist a "Review PR tomorrow #Work p3 @code-review"
64
+
65
+ # Launch interactive TUI
66
+ todoist ui
67
+ ```
68
+
69
+ ## CLI Commands
70
+
71
+ ### Shortcuts
72
+
73
+ | Command | Description |
74
+ |---------|-------------|
75
+ | `todoist today` | Today's and overdue tasks, sorted by priority |
76
+ | `todoist inbox` | Inbox tasks |
77
+ | `todoist next` | Single highest-priority actionable task |
78
+ | `todoist upcoming` | Next 7 days, grouped by date |
79
+ | `todoist overdue` | Overdue tasks, oldest first |
80
+ | `todoist deadlines` | Tasks with upcoming deadlines (default 14 days) |
81
+ | `todoist search <query>` | Search tasks by text |
82
+ | `todoist a "<text>"` | Quick-add a task |
83
+ | `todoist ui` | Launch interactive TUI |
84
+
85
+ ### Task Management
86
+
87
+ ```bash
88
+ todoist task add "Buy groceries" # Add a task
89
+ todoist task add # Interactive mode (guided prompts)
90
+ todoist task list # List all tasks
91
+ todoist task list --filter "p1 & today" # Filter with Todoist syntax
92
+ todoist task list --tree # Hierarchical tree view
93
+ todoist task show <id> # Full task details with comments
94
+ todoist task complete <id> # Complete a task
95
+ todoist task update <id> --due tomorrow # Update due date
96
+ todoist task move <id> --project Work # Move to another project
97
+ todoist task delete <id> # Delete a task
98
+ ```
99
+
100
+ ### Projects, Labels, Sections
101
+
102
+ ```bash
103
+ todoist project list # List projects
104
+ todoist project show "Work" # Project details with sections
105
+ todoist label list # List labels
106
+ todoist section list -P "Work" # Sections in a project
107
+ ```
108
+
109
+ ### Other Commands
110
+
111
+ | Command | Description |
112
+ |---------|-------------|
113
+ | `todoist matrix` | Eisenhower priority matrix |
114
+ | `todoist review` | Interactive GTD weekly review |
115
+ | `todoist stats` | Productivity statistics and karma |
116
+ | `todoist completed` | Recently completed tasks |
117
+ | `todoist log` | Activity log |
118
+ | `todoist template save <id> <name>` | Save task as template |
119
+ | `todoist filter save <name> <query>` | Save a reusable filter |
120
+ | `todoist completion <shell>` | Shell completions (bash/zsh/fish) |
121
+
122
+ ## Quick-Add Syntax
123
+
124
+ The `todoist a` command parses smart syntax inline:
125
+
126
+ ```
127
+ todoist a "Buy milk tomorrow #Shopping p1 @errands //Groceries {2026-03-15}"
128
+ ```
129
+
130
+ | Token | Meaning | Example |
131
+ |-------|---------|---------|
132
+ | `p1`–`p4` | Priority (1=normal, 4=urgent) | `p3` |
133
+ | `#Name` | Project | `#Work` |
134
+ | `@name` | Label (multiple allowed) | `@errands @personal` |
135
+ | `//Name` | Section | `//Groceries` |
136
+ | `{YYYY-MM-DD}` | Deadline | `{2026-03-15}` |
137
+ | Date words | Due date | `today`, `tomorrow`, `next week`, `monday` |
138
+
139
+ Preview without creating:
140
+
141
+ ```bash
142
+ todoist a "Buy milk tomorrow #Shopping p1" --dry-run
143
+ ```
144
+
145
+ ## Output Formats
146
+
147
+ All list commands support multiple output modes for scripting:
148
+
149
+ ```bash
150
+ todoist today --json "id,content,priority" # JSON with selected fields
151
+ todoist today --csv # CSV format
152
+ todoist today --tsv # TSV format
153
+ todoist today -q # IDs only (one per line)
154
+ todoist task list --count # Just the count
155
+ todoist inbox --watch 10 # Auto-refresh every 10s
156
+ ```
157
+
158
+ ### Piping Examples
159
+
160
+ ```bash
161
+ # Complete all overdue p4 tasks
162
+ todoist task list --filter "overdue & p4" -q | todoist task complete -
163
+
164
+ # Export today's tasks
165
+ todoist today --csv > today.csv
166
+
167
+ # Batch create from file
168
+ todoist task add --batch < tasks.txt
169
+
170
+ # Pipe IDs between commands
171
+ todoist search "meeting" -q | xargs todoist task complete
172
+ ```
173
+
174
+ ## Interactive TUI
175
+
176
+ Launch with `todoist ui`. Press `?` for the full help overlay.
177
+
178
+ ### Key Bindings
179
+
180
+ <details>
181
+ <summary><strong>Navigation</strong></summary>
182
+
183
+ | Key | Action |
184
+ |-----|--------|
185
+ | `j` / `k` | Move down / up |
186
+ | `gg` / `G` | First / last task |
187
+ | `Ctrl-d` / `Ctrl-u` | Page down / up |
188
+ | `Tab` | Switch sidebar / task panel |
189
+ | `Enter` | Open task detail |
190
+ | `Esc` | Go back / clear selection |
191
+
192
+ </details>
193
+
194
+ <details>
195
+ <summary><strong>Task Actions</strong></summary>
196
+
197
+ | Key | Action |
198
+ |-----|--------|
199
+ | `a` | Quick-add task (with live preview) |
200
+ | `N` | New task (full editor modal) |
201
+ | `A` | Add subtask |
202
+ | `e` | Edit task |
203
+ | `c` | Complete task |
204
+ | `d` | Delete task |
205
+ | `1`–`4` | Set priority |
206
+ | `t` | Set due date |
207
+ | `D` | Set deadline |
208
+ | `m` | Move to project |
209
+ | `l` | Edit labels |
210
+ | `u` | Undo last action (10s window) |
211
+ | `r` | Refresh from API |
212
+ | `o` | Open in browser |
213
+
214
+ </details>
215
+
216
+ <details>
217
+ <summary><strong>Selection & Search</strong></summary>
218
+
219
+ | Key | Action |
220
+ |-----|--------|
221
+ | `Space` | Toggle select |
222
+ | `v` | Range select |
223
+ | `Ctrl-a` | Select all |
224
+ | `Ctrl-n` | Clear selection |
225
+ | `/` | Fuzzy search |
226
+ | `f` | API filter query |
227
+ | `s` | Sort menu |
228
+ | `:` | Command palette |
229
+ | `?` | Help overlay |
230
+ | `q` | Quit |
231
+
232
+ </details>
233
+
234
+ All task actions work on multi-selected tasks too — select with `Space` or `v`, then `c`/`d`/`1`-`4`/`t`/`m` to operate in bulk.
235
+
236
+ ## Configuration
237
+
238
+ Config file: `~/.config/todoist-cli/config.toml`
239
+
240
+ ```toml
241
+ [auth]
242
+ api_token = "your-token"
243
+
244
+ [defaults]
245
+ project = "Work" # Default project for new tasks
246
+ priority = 2 # Default priority (1-4)
247
+ labels = ["routine"] # Default labels
248
+
249
+ [filters]
250
+ work = "p1 & #Work" # Available as: todoist work
251
+ urgent = "p4 & today" # Available as: todoist urgent
252
+ ```
253
+
254
+ Saved filters become top-level commands — `todoist work` runs `p1 & #Work`.
255
+
256
+ ## Shell Completions
257
+
258
+ ```bash
259
+ # Bash
260
+ eval "$(todoist completion bash)"
261
+
262
+ # Zsh (add to .zshrc)
263
+ todoist completion zsh > ~/.zfunc/_todoist
264
+
265
+ # Fish
266
+ todoist completion fish | source
267
+ ```
268
+
269
+ ## Contributing
270
+
271
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines.
272
+
273
+ ## License
274
+
275
+ [MIT](./LICENSE)