add-command

Installation
SKILL.md

Adding a New CLI Command or Subcommand

Follow this checklist when adding new commands. Each step references the exact file to modify.

1. Spinner Messages (src/lib/api.ts)

Add an entry to API_SPINNER_MESSAGES for each new SDK method.

Color convention:

  • blue — read/fetch operations (e.g., loading threads, listing channels)
  • green — create/join operations (e.g., creating a thread, starting a conversation)
  • yellow — update/delete/archive mutations (e.g., muting, deleting, archiving)

2. Read-Only Permissions (src/lib/permissions.ts)

If the new command uses a read-only SDK method (e.g., getXxx, listXxx), add it to the KNOWN_SAFE_API_METHODS set. This set uses a default-deny approach: any method not listed is treated as mutating and will be blocked when the CLI is authenticated with a read-only OAuth token (tw auth login --read-only).

Installs
1
Repository
doist/twist-cli
GitHub Stars
3
First Seen
Aug 16, 2026
add-command — doist/twist-cli