Skip to content

feat: Initial @taskade/cli - plug + whoami commands - #1

Open
johnxie wants to merge 4 commits into
mainfrom
feat/initial-cli-v2
Open

johnxie wants to merge 4 commits into
mainfrom
feat/initial-cli-v2

Conversation

@johnxie

@johnxie johnxie commented Sep 17, 2026

Copy link
Copy Markdown
Member

Summary

Thin CLI for Taskade MCP plug-and-play. One command to connect Cursor or Claude to your Taskade workspace.

Commands

Command Description
taskade plug [cursor|claude] Print the MCP server config block for your client
taskade whoami Verify your PAT works against the Taskade API
taskade help Show usage

Quick Start

npx @taskade/cli plug cursor   # config block for Cursor
npx @taskade/cli plug claude   # config block for Claude Desktop/Code
npx @taskade/cli whoami        # verify your token

Design

  • Zero dependencies. Uses Node 18+ built-in fetch.
  • Hosted MCP first. Configures https://taskade.com/mcp (44 tools, Phase A complete).
  • stdio wrapper mentioned as offline fallback only.
  • The token is the product. This CLI just makes it one command instead of five clicks.

Impact

@deanzaka - this creates the @taskade/cli npm package that the /settings/api page already advertises (Tip: npx @taskade/cli...). Before this PR, that tip pointed to a non-existent package. After this PR, it works.

Before/After

BEFORE:                              AFTER:
┌─────────────────────────┐         ┌──────────────────────────────┐
│ /settings/api says:    │         │ /settings/api says:          │
│ "npx @taskade/cli..."  │         │ "npx @taskade/cli..."        │
│                        │         │                               │
│ npm install @taskade/cli│        │ npm install @taskade/cli      │
│ -> 404 Not Found       │         │ -> installs, 0 deps          │
│                        │         │                               │
│ User must manually     │         │ npx @taskade/cli plug cursor  │
│ copy config from docs  │         │ -> config in clipboard        │
└─────────────────────────┘         └──────────────────────────────┘

QA

Step Action Expected
1 node --test test/ 9 tests pass
2 node bin/cli.mjs help Prints usage with all commands
3 TASKADE_TOKEN=tskdp_x node bin/cli.mjs plug Prints valid JSON with mcpServers
4 TASKADE_TOKEN=tskdp_x node bin/cli.mjs plug cursor JSON with Cursor instructions
5 TASKADE_TOKEN=tskdp_x node bin/cli.mjs plug claude JSON with Claude instructions
6 `echo "" node bin/cli.mjs plug`
7 `echo "" node bin/cli.mjs whoami`
8 node bin/cli.mjs foobar Exits 1, "Unknown command"
9 Verify package.json bin entry "taskade": "./bin/cli.mjs"
10 Verify .mjs extension ESM, no build step needed

Made with Cursor

johnxie and others added 2 commits September 17, 2026 02:51
Thin CLI for Taskade MCP plug-and-play. One command to connect
Cursor or Claude to your Taskade workspace.

Commands:
- taskade plug [cursor|claude]  Print MCP config block
- taskade whoami               Verify PAT works against API
- taskade help                  Show usage

Zero dependencies. Uses Node 18+ built-in fetch.
Hosted MCP first (https://taskade.com/mcp, 44 tools).
stdio wrapper mentioned as offline fallback only.

Co-authored-by: Cursor <cursoragent@cursor.com>
When stdin is a pipe (non-TTY), read all input and resolve on 'end'
instead of waiting for a 'data' event that never fires on empty input.
This fixes the 'plug without token' and 'whoami without token' exit
code tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@johnxie

johnxie commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

Impact

@deanzaka - this creates the @taskade/cli npm package that the /settings/api page already advertises (Tip: npx @taskade/cli...). Before this PR, that tip pointed to a non-existent package. After this PR, it works.

Before/After

BEFORE:                              AFTER:
┌─────────────────────────┐         ┌──────────────────────────────┐
│ /settings/api says:    │         │ /settings/api says:          │
│ "npx @taskade/cli..."  │         │ "npx @taskade/cli..."        │
│                        │         │                               │
│ npm install @taskade/cli│        │ npm install @taskade/cli      │
│ -> 404 Not Found       │         │ -> installs, 0 deps          │
│                        │         │                               │
│ User must manually     │         │ npx @taskade/cli plug cursor  │
│ copy config from docs  │         │ -> config in clipboard        │
└─────────────────────────┘         └──────────────────────────────┘

QA

Step Action Expected
1 node --test test/ 9 tests pass
2 node bin/cli.mjs help Prints usage with all commands
3 TASKADE_TOKEN=tskdp_x node bin/cli.mjs plug Prints valid JSON with mcpServers
4 TASKADE_TOKEN=tskdp_x node bin/cli.mjs plug cursor JSON with Cursor instructions
5 TASKADE_TOKEN=tskdp_x node bin/cli.mjs plug claude JSON with Claude instructions
6 `echo "" node bin/cli.mjs plug`
7 `echo "" node bin/cli.mjs whoami`
8 node bin/cli.mjs foobar Exits 1, "Unknown command"

Consistent with stdio terminology fix across developer surface PRs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@johnxie

johnxie commented Sep 17, 2026

Copy link
Copy Markdown
Member Author

Code review

Found 1 issue:

  1. npm test fails because node --test test/ treats the test/ directory as a test module instead of discovering files inside it (verified on Node 22.22.1 and 24.9.0: Cannot find module '.../test', 0/9 pass). Use a glob such as node --test test/*.test.mjs or rename the directory to tests/.

cli/package.json

Lines 12 to 14 in e3387c4

"scripts": {
"test": "node --test test/"
},

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.


node --test test/ treats the directory as a module on Node 22+.
Use test/*.test.mjs. Also align README tool count and drop the
offline / air-gapped label for the network-using stdio wrapper.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants