@doist/twist-cli

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

TypeScript CLI for Twist

此软件包已被标记为弃用

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

原始使用文档
文档目录11 节
  1. Installation
  2. Agent Skills
  3. Uninstallation
  4. Local Setup
  5. Setup
  6. Alternative methods
  7. Auth commands
  8. Usage
  9. Shell Completions
  10. Machine-readable output
  11. Development

Twist CLI

Twist CLI

A command-line interface for Twist.

Installation

npm install -g @doist/twist-cli

Agent Skills

Install skills for your coding agent:

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

Skills are installed to ~/<agent-dir>/skills/twist-cli/SKILL.md (e.g. ~/.claude/ for claude-code, ~/.agents/ for universal, etc.). When updating the CLI, installed skills are updated automatically. The universal agent is compatible with Amp, OpenCode, and other agents that read from ~/.agents/.

tw skill list
tw skill uninstall <agent>

Uninstallation

First, remove any installed agent skills:

tw skill uninstall <agent>

Then uninstall the CLI:

npm uninstall -g @doist/twist-cli

Local Setup

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

This makes the tw command available globally.

Setup

tw auth login

This opens your browser to authenticate with Twist. Once approved, the token is stored in your OS credential manager:

  • macOS: Keychain
  • Windows: Credential Manager
  • Linux: Secret Service/libsecret

If secure storage is unavailable, the CLI warns and falls back to ~/.config/twist-cli/config.json. Existing plaintext tokens are migrated automatically the next time the CLI reads them successfully from the config file. Non-secret settings such as the current workspace remain in the config file.

Alternative methods

Manual token:

tw auth token "your-token"

Environment variable:

export TWIST_API_TOKEN="your-token"

TWIST_API_TOKEN always takes priority over the stored token.

Auth commands

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

Usage

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

References accept IDs (123 or id:123), Twist URLs, or fuzzy names (for workspaces/users).

Run tw --help or tw <command> --help for more options.

Shell Completions

Tab completion is available for bash, zsh, and fish:

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

Restart your shell or source your config file to activate. To remove:

tw completion uninstall

Machine-readable output

All list/view commands support --json and --ndjson flags for scripting:

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

Development

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 是什么?

TypeScript CLI for Twist注意:该包已被作者标记为弃用——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。作者已将其标记为弃用,新项目建议寻找替代方案。