Todoist CLI
joshukraine/dotfiles
Manage Todoist tasks, projects, labels, filters, sections, comments, reminders, and workspaces via the td CLI.
Guide for adding new CLI commands or subcommands to todoist-cli.
$ npx skills add Doist/todoist-cli --skill add-command -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Doist/todoist-cli add-command --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/Doist/todoist-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/add-command .claude/skills/add-command && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "add-command" agent skill from https://github.com/Doist/todoist-cli/tree/main/.agents/skills/add-command into .claude/skills/add-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-command", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/Doist/todoist-cli/tree/main/.agents/skills/add-commandType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add Doist/todoist-cli --skill add-command -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Doist/todoist-cli add-command --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Doist/todoist-cli.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/add-command .agents/skills/add-command && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "add-command" agent skill from https://github.com/Doist/todoist-cli/tree/main/.agents/skills/add-command into .agents/skills/add-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-command", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Doist/todoist-cli --skill add-command -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Doist/todoist-cli add-command --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Doist/todoist-cli.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/add-command .cursor/skills/add-command && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "add-command" agent skill from https://github.com/Doist/todoist-cli/tree/main/.agents/skills/add-command into .cursor/skills/add-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-command", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/Doist/todoist-cli.git --path .agents/skills/add-command--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add Doist/todoist-cli --skill add-command -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Doist/todoist-cli add-command --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Doist/todoist-cli.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/add-command .gemini/skills/add-command && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "add-command" agent skill from https://github.com/Doist/todoist-cli/tree/main/.agents/skills/add-command into .gemini/skills/add-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-command", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install Doist/todoist-cli add-commandInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add Doist/todoist-cli --skill add-command -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Doist/todoist-cli.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/add-command .github/skills/add-command && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "add-command" agent skill from https://github.com/Doist/todoist-cli/tree/main/.agents/skills/add-command into .github/skills/add-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-command", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add Doist/todoist-cli --skill add-command -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Doist/todoist-cli add-command --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Doist/todoist-cli.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/add-command .opencode/skills/add-command && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "add-command" agent skill from https://github.com/Doist/todoist-cli/tree/main/.agents/skills/add-command into .opencode/skills/add-command/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "add-command", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
add-commandGuide for adding new CLI commands or subcommands to todoist-cli.
Add Command is an agent skill from Doist/todoist-cli. Guide for adding new CLI commands or subcommands to todoist-cli. Use when implementing new SDK endpoints, adding subcommands to existing command groups, or extending CLI functionality.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It works with Todoist. The repository describes itself as: Command-line interface for Todoist. The licence is MIT.
10 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit b8c9598. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
trevinsays.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Add Command loads about 2.9k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 1,197 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from Doist/todoist-cli at commit b8c9598, republished under its MIT licence (© Doist). 1,197 words, ~2,888 tokens.
.claude/skills/add-command/SKILL.md (or your agent's skills folder).Follow this checklist when adding new commands. Each step references the exact file to modify.
src/__tests__/helpers/mock-api.ts)Add a mock for each new SDK method in createMockApi(). Place it in the correct entity group.
.mockResolvedValue({ results: [], nextCursor: null }) or appropriate empty defaultvi.fn() (no default return needed)src/lib/api/core.ts)Add an entry to API_SPINNER_MESSAGES for each new SDK method.
Color convention:
blue — read/fetch operationsgreen — create/join operationsyellow — update/delete/archive mutationssrc/lib/permissions.ts)If the new command uses a read-only SDK method (e.g., getXxx, listXxx), add it to the KNOWN_SAFE_API_METHODS set. This set uses a default-deny approach: any method not listed is treated as mutating and will be blocked when the CLI is authenticated with a read-only OAuth token (td auth login --read-only).
KNOWN_SAFE_API_METHODSEvery new command should satisfy these properties. They ensure the CLI works well for both humans and AI agents. See 7 Principles for Agent-Friendly CLIs for background.
Non-interactive by default — All input via flags, positional args, or --stdin. Never use readline, prompt(), or block waiting for TTY input. When a required argument is missing, call cmd.help() and return — don't prompt.
Structured, parseable output — Data commands must support --json (and --ndjson for lists). Results go to stdout, diagnostics to stderr. Spinners auto-suppress when !process.stdout.isTTY (see src/lib/spinner.ts). Exit code 0 on success, non-zero on failure.
Fail fast with actionable errors — Use CliError with a specific error code, a message naming the exact problem, and hints that include correct invocation syntax, valid values, or example commands. Validate all inputs before making API calls.
Safe retries and explicit mutation boundaries — Mutating commands support --dry-run. Destructive + irreversible commands require --yes. Create commands return the entity ID (use isQuiet() for bare ID output for scripting, e.g. id=$(td task add "Buy milk" -q)).
Progressive help discovery — Parent command groups include .addHelpText('after', ...) with 2–3 concrete examples. Every .description() is a clear one-line purpose statement. When a required positional arg is missing, show help via cmd.help().
Composable and predictable structure — Use consistent subcommand verbs (list/view/create/update/delete/browse). Use consistent flag names across entities (--project <ref>, --json, --dry-run, --yes, --limit, --cursor, --all). Support --stdin for text content where applicable (see readStdin() in src/lib/stdin.ts).
Bounded, high-signal responses — List commands use paginate() from src/lib/pagination.ts with --limit <n>, --cursor, and --all flags. When results are truncated, formatNextCursorFooter() tells the user how to fetch more. JSON output uses formatJson() or formatPaginatedJson() to return essential fields by default, passing the --full flag for complete output.
src/commands/<entity>/)Commands with multiple subcommands use a folder-based structure:
src/commands/<entity>/
index.ts # registerXxxCommand — creates parent cmd, wires subcommands
list.ts # async function listXxx(...) — one file per subcommand
view.ts # async function viewXxx(...)
create.ts # async function createXxx(...)
helpers.ts # shared constants/utilities used by multiple subcommands (optional)registerXxxCommand../../lib/ for lib imports. No Commander imports (only index.ts uses Commander).Single-subcommand commands (e.g., add.ts, today.ts) remain as flat files.
src/commands/<entity>/<action>.ts with the handler functionsrc/commands/<entity>/index.ts| Command type | Flags |
|---|---|
| Read-only | --json (and --ndjson for lists) |
| Mutating (returns entity) | --json (use formatJson), --dry-run |
| Mutating (no return) | --dry-run |
| Destructive + irreversible | --yes, --dry-run |
| Reversible (archive/unarchive) | --dry-run (no --yes) |
| List (paginated) | --limit <n>, --cursor, --all, --json, --ndjson |
| List (non-paginated) | --json, --ndjson |
The --quiet / -q flag suppresses success messages on mutations. Create commands in quiet mode print only the bare entity ID for scripting (e.g., id=$(td task add "Buy milk" -q)).
Always use CliError from src/lib/errors.ts instead of bare throw new Error(...). This ensures structured error output in JSON mode and consistent formatting in text mode.
import { CliError } from '../../lib/errors.js'
throw new CliError('ERROR_CODE', 'User-facing message', ['Optional hint'])When adding a new error code, add it to the ErrorCode type in src/lib/errors.ts under the appropriate category. The type provides intellisense for known codes while accepting any string for dynamic codes.
To make errors actionable for agents:
message must name the specific problem (not generic "invalid input")hints array should include at least one of: correct invocation syntax, valid values, or a working example commandCliError('CONFLICTING_OPTIONS', ...) immediatelyresolveXxxRef(api, ref) — when the user knows the entity by name (projects, tasks, labels). Add new wrappers in refs.ts — resolveRef is private.lenientIdRef(ref, 'entity') — when there is no list endpoint for lookup, or the user can't access the entity yet (e.g., comments, reminders, joining an unjoined project)resolveSectionId, resolveParentTaskId, resolveWorkspaceRef) — when resolving a name within a parent context (e.g., a section name within a specific project). Each has custom logic in refs.ts.const myCmd = parent
.command('my-action [ref]')
.description('Do something')
.option('--json', 'Output as JSON')
.option('--dry-run', 'Preview what would happen without executing')
.action((ref, options) => {
if (!ref) {
myCmd.help()
return
}
return myAction(ref, options)
})The variable assignment (const myCmd = ...) is needed so the .action() callback can call myCmd.help() when the argument is missing.
Help text quality:
registerXxxCommand function) should include .addHelpText('after', ...) with 2–3 concrete invocation examples.description() string should be a clear one-line purpose — agents read this to decide which subcommand to callif (!ref) { cmd.help(); return } pattern ensures the command never blocks when a required argument is missingsrc/lib/output.ts)The CLI supports accessible mode via isAccessible() (checks TD_ACCESSIBLE=1 or --accessible flag). When adding output that uses color or visual elements, consider whether information is conveyed only by color or decoration.
formatHealthStatus adds [+], [!], [!!] prefixes.====---- becomes "equals equals equals equals dash dash dash dash"). Show only the numeric value instead.★ only in accessible mode since the yellow color already signals it visually.ON_TRACK, COMPLETED are self-explanatory — color just reinforces them. Still consider adding indicator prefixes for severity.chalk.dim() for secondary info is fine — screen readers ignore styling.import { isAccessible } from '../lib/output.js'
// For color-coded values: add text prefix in accessible mode
const a11y = isAccessible()
const prefix = a11y ? '[!] ' : ''
console.log(chalk.yellow(`${prefix}AT_RISK`))
// For visual bars: skip entirely in accessible mode
if (isAccessible()) {
console.log(`${percent}%`)
} else {
console.log(`[${'='.repeat(filled)}${'-'.repeat(empty)}] ${percent}%`)
}If adding a new shared formatter to output.ts, use Record<ExactType, ...> rather than Record<string, ...> so the compiler catches missing variants.
src/__tests__/<entity>.test.ts)Follow the existing pattern: mock getApi, use program.parseAsync().
Always test:
INVALID_REF rejection for lenientIdRef commands (plain text like "Planning" should fail)--dry-run for mutating commands (API method should NOT be called, preview text shown)--json output where applicablesrc/lib/skills/content.ts)Update SKILL_CONTENT with examples for the new command. Update relevant sections:
### Section block--json list if the command returns an entity--dry-run list if applicableAfter all code changes are complete:
npm run sync:skillThis builds the project and regenerates skills/todoist-cli/SKILL.md from the compiled skill content. The regenerated file must be committed. CI will fail (npm run check:skill-sync) if it is out of sync.
npm run type-check
npm test
npm run check© Doist, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/add-command of Doist/todoist-cli.
Open the folder on GitHubat commit b8c9598
We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in Doist/todoist-cli, which our catalogue first saw on October 7, 2026.
Add Command next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Add Command this skillDoist/todoist-cli | 316 | 1 repos | ~2.9k | Automated safety check: Pass | MIT | |
| Todoist CLIjoshukraine/dotfiles | 429 | 1 repos | ~6.9k | Automated safety check: Pass | MIT | |
| Migrate Doctorsmixs/agent-second-brain | 391 | — | ~904 | Automated safety check: Notes | MIT | |
| Action Items Todoistmgonto/executive-assistant-skills | 118 | — | ~3.8k | Automated safety check: Notes | None | |
| Executive Digestmgonto/executive-assistant-skills | 118 | — | ~2.6k | Automated safety check: Notes | None | |
| Todoist Due Draftsmgonto/executive-assistant-skills | 118 | — | ~1.6k | Automated safety check: Notes | None |
joshukraine/dotfiles
Manage Todoist tasks, projects, labels, filters, sections, comments, reminders, and workspaces via the td CLI.
smixs/agent-second-brain
Diagnose and repair a broken or non-standard agent-second-brain install/migration.
mgonto/executive-assistant-skills
Extract action items from today's Granola/Grain meetings, create Todoist tasks, complete fulfilled tasks, and draft meeting-triggered follow-up emails.
mgonto/executive-assistant-skills
Generate the daily executive digest — a single WhatsApp summary of everything needing attention: stalled scheduling, pending intros, unanswered emails, promised follow-ups, open Todoist tasks, and…
mgonto/executive-assistant-skills
Check Todoist for tasks due today (and overdue) that involve pinging, emailing, or following up with someone.
intellectronica/agent-skills
This skill provides instructions for interacting with Todoist using the td CLI tool.
Works with
Guide for adding new CLI commands or subcommands to todoist-cli. Add Command is an agent skill from Doist/todoist-cli. Guide for adding new CLI commands or subcommands to todoist-cli.
Add Command fits situations like: implementing new SDK endpoints; adding subcommands to existing command groups; extending CLI functionality.
Run `npx skills add Doist/todoist-cli --skill add-command -a claude-code`. Or copy the skill folder (.agents/skills/add-command in Doist/todoist-cli) into .claude/skills/add-command in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Doist/todoist-cli --skill add-command -a codex`. Or copy the skill folder (.agents/skills/add-command in Doist/todoist-cli) into .agents/skills/add-command in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Doist/todoist-cli --skill add-command -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-command, .gemini/skills/add-command, .github/skills/add-command and .opencode/skills/add-command in your project.
Going by SKILL.md and its folder, Add Command needs the command-line tools its instructions call (npm).
SKILL.md names 1 domain. As links in the text: trevinsays.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Add Command is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Add Command: Todoist CLI (joshukraine/dotfiles, 429 stars), Migrate Doctor (smixs/agent-second-brain, 391 stars), Action Items Todoist (mgonto/executive-assistant-skills, 118 stars) and Executive Digest (mgonto/executive-assistant-skills, 118 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Doist (a GitHub organization) maintains it in Doist/todoist-cli, which has 316 GitHub stars. The repository was last updated on October 7, 2026.
Source: Doist/todoist-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.