ticktick-cli
v1.1.0
Published
CLI wrapper for the TickTick Open API
Maintainers
Readme
TickTick CLI v1
A TypeScript CLI wrapper for the TickTick Open API documented at:
- https://developer.ticktick.com/
- https://developer.ticktick.com/docs#/openapi
v1 covers the documented OAuth flow plus every documented task and project endpoint.
The CLI is available as both ticktick and the short alias tt.
What it covers
- OAuth authorization code flow
- OAuth authorize URL generation
- Daily commands for
today,overdue, andnext - Get, create, update, complete, delete, move, list-completed, and filter task endpoints
- List, get, create, update, delete, and get-data project endpoints
- Raw authenticated request passthrough
- Local config storage for client credentials and access tokens
ticktickanddida365service profiles, with manual base URL overrides when needed
Install
Requires Node.js 18+.
Install from the local repo:
npm install
npm run buildRun locally with:
node dist/bin.js --helpOr install the built CLI globally from this directory:
npm install -g .
ticktick --help
tt --helpOnce published to npm, install it with:
npm install -g ticktick-cli
ticktick --help
tt --helpAll command examples below use ticktick, but tt works the same way.
Configure
The CLI reads config in this order:
- Command flags
- Environment variables
- Local config file
- Built-in defaults
Useful environment variables:
TICKTICK_SERVICE=ticktick
TICKTICK_CLIENT_ID=...
TICKTICK_CLIENT_SECRET=...
TICKTICK_REDIRECT_URI=http://127.0.0.1:18463/callback
TICKTICK_SCOPES="tasks:read tasks:write"
TICKTICK_ACCESS_TOKEN=...
TICKTICK_API_BASE_URL=https://api.ticktick.com
TICKTICK_AUTH_BASE_URL=https://ticktick.com
TICKTICK_CONFIG_FILE=/custom/path/config.jsonDefault local redirect URI:
http://127.0.0.1:18463/callbackYou can also persist config values:
ticktick config set clientId YOUR_CLIENT_ID
ticktick config set clientSecret YOUR_CLIENT_SECRET
ticktick config set redirectUri http://127.0.0.1:18463/callback
ticktick config showAuth
Interactive login:
ticktick auth loginSuccessful auth stores the token in your local config file and masks secrets in the terminal output by default.
If you already have an authorization code:
ticktick auth exchange YOUR_CODEPrint the authorize URL without starting the callback server:
ticktick auth urlCheck current auth state:
ticktick auth statusIf you need the raw token values in the terminal, add --show-secrets to auth login, auth exchange, or auth status.
Clear the stored access token:
ticktick auth logoutExamples
Daily task views:
ticktick today
tt today
ticktick overdue
ticktick next
ticktick task today --jsontoday includes both overdue tasks and tasks due today, with overdue shown first.
List projects:
ticktick project listGet project details:
ticktick project get 6226ff9877acee87727f6bca
ticktick project data 6226ff9877acee87727f6bcaCreate a project:
ticktick project create --name "Inbox" --color "#F18181" --view-mode list --kind TASKCreate a task:
ticktick task create --project-id 6226ff9877acee87727f6bca --title "Ship CLI"Update a task:
ticktick task update 63b7bebb91c0a5474805fcd4 --project-id 6226ff9877acee87727f6bca --priority 3Move one task:
ticktick task move \
--from-project-id 69a850ef1c20d2030e148fdd \
--to-project-id 69a850f41c20d2030e148fdf \
--task-id 69a850f8b9061f374d54a046Filter tasks using JSON:
ticktick task filter --json '{
"projectIds": ["69a850f41c20d2030e148fdf"],
"startDate": "2026-03-01T00:58:20.000+0000",
"endDate": "2026-03-06T10:58:20.000+0000",
"priority": [0],
"tag": ["urgent"],
"status": [0]
}'Move multiple tasks from a file:
ticktick task move --json-file ./moves.jsonPipe JSON into a command:
echo '{"name":"Planning","kind":"TASK"}' | ticktick project createSend a raw authenticated request:
ticktick request GET /open/v1/projectSend a raw request to a full URL without bearer auth:
ticktick request POST https://httpbin.org/post --no-auth --json '{"hello":"world"}'Development
Build the CLI:
npm run buildNotes
- The docs currently show
api.ticktick.comfor most endpoints, butapi.dida365.comin the examples fortask/move,task/completed, andtask/filter. This CLI defaults to the selected service profile and lets you override base URLs explicitly if your account needs something different. - The CLI writes config to a local JSON file under the OS-specific app config directory unless
--config-fileorTICKTICK_CONFIG_FILEis set. - Access tokens and client secrets are stored as plain text in that config file. That keeps the wrapper simple, but it is not a secure keychain integration.
