@doist/twist-cli

中文文档
3.1.0发布于 2026/11/11MITTypeScriptES Module近 30 天下载 2175

用于 Twist 的脚本 CLI 类型

此软件包已被标记为弃用

Moved to @todoist/twist-cli. Run: npm uninstall -g @doist/twist-cli && npm install -g @todoist/twist-cli

中文使用文档
文档目录11 节
  1. 安装
  2. 代理技能
  3. 卸载
  4. 本地设置
  5. 设置
  6. 替代方法
  7. Auth 命令
  8. 使用量
  9. 贝壳补全
  10. 机器可读输出
  11. 发展

Twist CLI

旋转 CLI

Twist 的命令行界面 .

安装

npm install -g @doist/twist-cli

代理技能

为您的编码代理安装技能 :

tw skill install claude-code
tw skill install codex
tw skill install cursor
tw skill install gemini
tw skill install pi
tw skill install universal

技能安装到 ~/<agent-dir>/skills/twist-cli/SKILL.md (例如:. ~/.claude/ 为克来德码, ~/.agents/ (为普世等). 在更新CLI时,所安装的技能会被自动更新. 这个 universal 代理与 Amp 、 OpenCode 和其他从 ~/.agents/。 。 。 .

tw skill list
tw skill uninstall <agent>

卸载

首先,删除任何已安装的代理技能:

tw skill uninstall <agent>

然后解开CLI:

npm uninstall -g @doist/twist-cli

本地设置

git clone https://github.com/todoist/twist-cli.git
cd twist-cli
npm install
npm run build
npm link

这使得 tw 命令可在全球范围使用.

设置

tw auth login

此打开您的浏览器以认证 Twist 。 一旦批准,该令牌存储在您的OS证书管理器中:

  • macOS: 键链
  • 窗口: 证书管理器
  • Linux: 特务/libsecret

如果无法安全存储,则CLI会发出警告并返回到 ~/.config/twist-cli/config.json。在下次 CLI 从配置文件中成功读取时, 将自动移出已有的纯文本符号 。 诸如当前工作空间等非秘密设置仍然保留在配置文件中 .

替代方法

手动符号 :

tw auth token "your-token"

环境变量:

export TWIST_API_TOKEN="your-token"

TWIST_API_TOKEN 总是优先于存储的符号.

Auth 命令

tw auth status   # check if authenticated
tw auth logout   # remove saved token

使用量

tw inbox                           # inbox threads
tw inbox --unread                  # unread threads only
tw mentions                        # content mentioning you
tw mentions --since 2026-04-01 --all --json
tw thread view <ref>               # view thread with comments
tw thread view <ref> --comment 123 # view a specific comment
tw thread reply <ref>              # reply to a thread
tw thread rename <ref> "New title" # rename a thread
tw thread update <ref> "New body" # edit a thread's body (first post)
tw conversation unread             # list unread conversations
tw conversation view <ref>         # view conversation messages
tw msg view <ref>                  # view a conversation message
tw search "keyword"                # search across workspace
tw search "keyword" --all          # fetch all result pages
tw react thread <ref> 👍          # add reaction
tw away                            # show away status
tw away set vacation 2026-03-20    # set away until date
tw away clear                      # clear away status
tw groups                          # list groups in a workspace
tw groups view <ref>               # show a group with members
tw groups create "Frontend"        # create a group
tw groups create "FE" --users [email protected],[email protected]
tw groups rename <ref> "New name"  # rename a group
tw groups delete <ref> --yes       # delete a group
tw groups add-user <ref> [email protected] [email protected]
tw groups remove-user <ref> id:123,id:456

参考文献 接受身份证123 或者说 id:123),twist URL,或模糊名称(用于工作空间/用户).

运行 tw --help 或者说 tw <command> --help 更多选择.

贝壳补全

标签完成可以提供:

tw completion install        # prompts for shell
tw completion install bash   # or: zsh, fish

重新启动您的 shell 或源代码您的配置文件以激活 。 要删除 :

tw completion uninstall

机器可读输出

所有列表/视图命令支持 --json 财务报告和审定财务报表 --ndjson 用于脚本的旗帜 :

tw inbox --json                    # JSON array
tw inbox --ndjson                  # newline-delimited JSON
tw inbox --json --full             # include all fields

发展

npm install
npm run build       # compile
npm run dev         # watch mode
npm run type-check  # type check
npm run format      # format code
npm test            # run tests

版本与发布记录

@doist/twist-cli 共发布 127 个版本,首次发布于 2026/01/23;过去 12 个月发布了 127 个版本。

版本发布日期距今
3.1.0latest2026/11/112 天前
3.0.162026/11/112 天前
3.0.152026/10/1925 天前
3.0.142026/10/131 个月前
3.0.132026/09/281 个月前
3.0.122026/09/221 个月前

关于 @doist/twist-cli 的常见问题

@doist/twist-cli 是什么?

用于 Twist 的脚本 CLI 类型注意:该包已被作者标记为弃用——Moved to @todoist/twist-cli. Run: npm uninstall -g @doist/twist-cli && npm install -g @todoist/twist-cli

如何安装 @doist/twist-cli?

在项目目录运行 npm install @doist/twist-cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 tw,可以用 npx tw 直接运行。

@doist/twist-cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@doist/twist-cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@doist/twist-cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@doist/twist-cli 可以商用吗?

@doist/twist-cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@doist/twist-cli 的下载量有多少?

根据 npm 官方下载统计,@doist/twist-cli 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,175 次,日均约 73 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@doist/twist-cli 还在维护吗?

最新版本 3.1.0 发布于 2026/11/11(2 天前);至今共发布 127 个版本,其中过去 12 个月发布了 127 个;首次发布于 2026/01/23。作者已将其标记为弃用,新项目建议寻找替代方案。