dida365-openapi
一个用于 Dida365 / TickTick OpenAPI 的命令行工具,也附带可供 agent 使用的 skill。
适合两类场景:
- 你自己在终端里创建项目、任务、提醒
- AI agent 通过 CLI 或 skill 调用 Dida365 / TickTick
安装 CLI
推荐直接从 PyPI 安装:
uv tool install dida365-openapi
也可以使用:
pipx install dida365-openapi
安装后可直接使用:
dida365-openapi --help
如果你要看源码或参与开发:
git clone https://github.com/hktkzyx/dida365-openapi.git
安装 Skill
如果你想把它作为 skill 给 agent 使用,可以通过 npx skills 安装仓库里的 skill 目录:
npx skills add https://github.com/hktkzyx/dida365-openapi --skill dida365-openapi
仓库里的 skill 目录是:
skills/dida365-openapi/
获取 OpenAPI 凭据
你需要先在 Dida365 / TickTick 的开发者后台创建应用,拿到:
Client IDClient Secret
开发者入口:
- Dida365:
https://developer.dida365.com/ - TickTick:
https://developer.ticktick.com/
创建应用时,回调地址可填写:
http://127.0.0.1:8788/callback
配置
至少需要这两个环境变量:
DIDA365_CLIENT_IDDIDA365_CLIENT_SECRET
常用可选项:
DIDA365_SERVICE_TYPEdida365/ticktick- 默认
dida365
DIDA365_REDIRECT_URI- 默认
http://127.0.0.1:8788/callback
- 默认
DIDA365_SCOPE- 默认
tasks:read tasks:write
- 默认
DIDA365_TOKEN_FILE- 自定义 token 文件位置
DIDA365_ENV_FILE- 显式指定
.env文件路径
- 显式指定
推荐把配置写到:
~/.config/dida365-openapi/.env
例如:
mkdir -p ~/.config/dida365-openapi
cat > ~/.config/dida365-openapi/.env <<'EOF'
DIDA365_CLIENT_ID=your_client_id
DIDA365_CLIENT_SECRET=your_client_secret
DIDA365_SERVICE_TYPE=dida365
DIDA365_REDIRECT_URI=http://127.0.0.1:8788/callback
EOF
把 your_client_id 和 your_client_secret 替换成你在开发者后台拿到的值。
.env 读取顺序
CLI 会按下面顺序取配置:
- 当前进程环境变量
--env-file /absolute/path/to/.envDIDA365_ENV_FILE=/absolute/path/to/.env~/.config/dida365-openapi/.env- 当前工作目录
.env - 默认值
这意味着:
- 普通用户通常只需要维护
~/.config/dida365-openapi/.env - agent 在不同项目目录下运行时,默认也能复用同一套配置
- 只有多账号或隔离场景,才需要显式传
--env-file
首次认证
有浏览器时:
dida365-openapi auth
无浏览器时:
dida365-openapi auth --manual
认证成功后,token 默认保存在:
~/.config/dida365-openapi/{service_type}-{client_id}.json
常见用法
查看项目:
dida365-openapi projects list
新建项目:
dida365-openapi projects create --name "工作"
查看项目内任务:
dida365-openapi tasks list --project-id your_project_id
创建任务:
dida365-openapi tasks create \
--project-id your_project_id \
--title "写周报"
创建单次提醒:
dida365-openapi remind create \
--title "两分钟后喝水" \
--at "2026-04-08 14:30:00"
创建周期提醒:
dida365-openapi remind create \
--title "每月调仓" \
--at "2026-04-24 09:00:00" \
--repeat-flag "RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=24"
更多参数:
dida365-openapi --help
dida365-openapi tasks --help
dida365-openapi remind create --help
开发者说明
发布到 PyPI / TestPyPI 的维护者说明见:
Metadata
Release files for dida365-openapi 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dida365_openapi-0.1.2.tar.gz | 14.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dida365_openapi-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.6 kB
Release files / dida365_openapi-0.1.2.tar.gz
| Download URL | dida365_openapi-0.1.2.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ec33f435da81aec0c6d7313544310f2b41bd9d1b9c0e2e714a029f4a8143fa0
|
|
BLAKE2b-256 checksum How to use checksums |
6883f98ce1b7fd68a8956136b59425ecc52b967166fb3265b3ac49cdf081c6a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency logRelease files / dida365_openapi-0.1.2-py3-none-any.whl
| Download URL | dida365_openapi-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d74f667193c37c90151a4018a165292aeadea1313c9e23f86155991ec4a7973
|
|
BLAKE2b-256 checksum How to use checksums |
3a4c365ad1bd0885a52714be757c60c2210068ab5d73cd37dad2a906a2c7290f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.
Transparency log