Straightforward guide for extending todoist-cli with new commands or subcommands. You'll reach for this when you're wiring up SDK endpoints to the CLI, adding subcommands to existing command groups, or generally expanding what the tool can do from the command line. The skill points to a detailed markdown guide with the actual implementation steps, so this is more of an entry point than a standalone reference. Useful if you're contributing to the project or maintaining a fork, less so if you're just using the CLI as is. The structure assumes you're already familiar with the codebase and just need the pattern for adding commands consistently.

GitHub stars
217
last updated
Jun 11, 2026

Install

$ npx -y skills add doist/todoist-cli --skill add-command --agent claude-code

Installs into .claude/skills of the current project.

Files

Adding a New CLI Command or Subcommand

Follow this checklist when adding new commands. Each step references the exact file to modify.

1. Mock API (src/test-support/mock-api.ts)

Add a mock for each new SDK method in createMockApi(). Place it in the correct entity group.

  • List/read methods: .mockResolvedValue({ results: [], nextCursor: null }) or appropriate empty default
  • Mutation methods: vi.fn() (no default return needed)

2. Spinner Messages (src/lib/api/core.ts)

Add an entry to API_SPINNER_MESSAGES for each new SDK method.

Color convention:

  • blue — read/fetch operations
  • green — create/join operations
  • yellow — update/delete/archive mutations

3. Read-Only Permissions (src/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).

Sponsors

Details

Repository
github.com/doist/todoist-cli
Categories
Documentation, CLI & Terminal
License
MIT
First seen
Jun 11, 2026

More from doist/todoist-cli

All 2
1dotnet avatarexp-test-maintainabilitydotnet/skillsDetects duplicate boilerplate, copy-paste tests, and structural maintainability issues across .NET test suites. Use when the user asks to reduce repetition, con0skills.sh installs
2dtsola avatarbetter-iconsdtsola/xiaoyaosearchThis gives Claude direct access to Iconify's 200+ icon libraries without you having to dig through documentation or copy-paste SVGs...0skills.sh installs
3dylantarre avatarAnimation Principles - Teaching Othersdylantarre/animation-principlesUse when someone needs to explain animation principles to students, mentees, or team members at various skill levels0skills.sh installs
4electron avatarelectron-chromium-upgradeelectron/electronGuide for performing Chromium version upgrades in the Electron project. Use when working on the roller/chromium/main branch to fix patch conflicts during `e syn0skills.sh installs
5EvanBacon avatarexpo-modulesEvanBacon/apple-healthBuilding great Expo native modules for iOS and Android. Views, APIs, Marshalling, Shared Objects, Expo Documentation, Verifying Expo modules.0skills.sh installs
6firebase avatarfirebase-data-connectfirebase/agent-skillsBuilds and deploys Firebase SQL Connect (aka Firebase Data Connect) backends with PostgreSQL securely. Use when designing schemas with tables and relations, wri0skills.sh installs