@doist/comms-cli 1.9.1 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +2 -2
- package/dist/commands/channel/index.js +15 -15
- package/dist/commands/channel/index.js.map +1 -1
- package/dist/commands/comment/index.js +7 -7
- package/dist/commands/comment/index.js.map +1 -1
- package/dist/commands/conversation/helpers.d.ts +4 -4
- package/dist/commands/conversation/helpers.d.ts.map +1 -1
- package/dist/commands/conversation/helpers.js +57 -36
- package/dist/commands/conversation/helpers.js.map +1 -1
- package/dist/commands/conversation/index.js +12 -12
- package/dist/commands/conversation/index.js.map +1 -1
- package/dist/commands/conversation/view.d.ts.map +1 -1
- package/dist/commands/conversation/view.js +7 -1
- package/dist/commands/conversation/view.js.map +1 -1
- package/dist/commands/groups/index.js +7 -7
- package/dist/commands/groups/index.js.map +1 -1
- package/dist/commands/inbox.js +3 -2
- package/dist/commands/inbox.js.map +1 -1
- package/dist/commands/msg/index.js +7 -7
- package/dist/commands/msg/index.js.map +1 -1
- package/dist/commands/react.js +7 -7
- package/dist/commands/react.js.map +1 -1
- package/dist/commands/search.js +1 -1
- package/dist/commands/thread/index.js +29 -29
- package/dist/commands/thread/index.js.map +1 -1
- package/dist/commands/thread/view.d.ts +1 -1
- package/dist/commands/thread/view.d.ts.map +1 -1
- package/dist/commands/thread/view.js +3 -1
- package/dist/commands/thread/view.js.map +1 -1
- package/dist/commands/view.js +6 -6
- package/dist/commands/view.js.map +1 -1
- package/dist/lib/errors.d.ts +1 -1
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/options.d.ts +2 -0
- package/dist/lib/options.d.ts.map +1 -1
- package/dist/lib/options.js +4 -0
- package/dist/lib/options.js.map +1 -1
- package/dist/lib/refs.js +1 -1
- package/dist/lib/refs.js.map +1 -1
- package/dist/lib/skills/content.d.ts +1 -1
- package/dist/lib/skills/content.d.ts.map +1 -1
- package/dist/lib/skills/content.js +16 -16
- package/package.json +2 -2
|
@@ -3,6 +3,6 @@ export declare const SKILL_DESCRIPTION = "Comms messaging CLI. View and respond
|
|
|
3
3
|
export declare const SKILL_AUTHOR = "Doist";
|
|
4
4
|
export declare const SKILL_LICENSE = "MIT";
|
|
5
5
|
export declare const SKILL_VERSION: string;
|
|
6
|
-
export declare const SKILL_CONTENT = "# Comms CLI (tdc)\n\nAccess Comms messaging via the `tdc` CLI. Use when the user asks about their Comms workspaces, threads, messages, or wants to interact with Comms in any way.\n\n## Setup\n\n```bash\ntdc auth login # OAuth login (standard write scopes)\ntdc auth login --read-only # OAuth login with read-only scope\ntdc auth login --full-access # OAuth login with delete/admin scopes\ntdc auth login --callback-port <n># Override the local OAuth callback port (default 8766)\ntdc auth login --json # Emit a JSON envelope for scripted / agent use\ntdc auth login --ndjson # Emit an NDJSON envelope for scripted / agent use\ntdc auth token # Save API token manually (prompts securely; scope unknown, assumed write-capable)\ntdc auth status # Verify authentication + show mode\ntdc auth status --json # Full status payload as JSON (--ndjson also supported)\ntdc auth status --user <ref> # Target a specific stored account (id, id:<n>, or display name)\ntdc --user <ref> auth <status|logout|token view|refresh-token view> # Equivalent to passing --user after the subcommand; other commands accept the flag but ignore it\ntdc auth logout # Remove saved token and auth metadata\ntdc auth logout --json # Emits `{\"ok\": true}` (--ndjson is silent)\ntdc auth logout --user <ref> # Target a specific stored account; mismatched ref errors with ACCOUNT_NOT_FOUND\ntdc auth token view # Print the saved token to stdout (pipe-safe; refuses if COMMS_API_TOKEN is set)\ntdc auth token view --user <ref> # Print the saved token for a specific stored account\ntdc auth refresh-token view # Print the saved OAuth refresh token to stdout (pipe-safe; OAuth logins only)\ntdc auth refresh-token view --user <ref> # Print the saved OAuth refresh token for a specific stored account\ntdc account [list|current|use <ref>|remove <ref>] # Manage stored accounts; all support --json/--ndjson\n # current's payload is {id, label, authMode, authScope, source:\"config\"} | {source:\"env\"} | {source:\"token-only\"}\ntdc auth login # Re-running auth login with a different OAuth grant adds a NEW account; default stays pinned unless none was set\ntdc workspaces # List available workspaces\ntdc workspace use <ref> # Set current workspace\ntdc completion install # Install shell completions\ntdc config view # Show the current CLI configuration file (token masked)\ntdc config set <key> <value> # Set a user preference (e.g. unarchive-new-threads true)\ntdc doctor # Diagnose CLI setup and environment issues\ntdc update # Update CLI to latest version\ntdc changelog # Show recent changelog entries\ntdc migrate urls <urls> # Translate old twist.com URLs to Comms URLs (needs a Twist token)\n```\n\nOAuth login uses Todoist OAuth for Comms access. The default grant can read Comms data and create/update content or messages. It does not include delete, channel management, or user/workspace write scopes; use `tdc auth login --full-access` only when needed. Stored auth uses the system credential manager when available. If secure storage is unavailable, `tdc` warns and falls back to `~/.config/comms-cli/config.json`. `COMMS_API_TOKEN` always takes priority over the stored token.\n\nIn read-only mode (`tdc auth login --read-only`), commands that modify Comms data (reply, archive, react, delete, etc.) are blocked by the CLI. Externally provided tokens (`COMMS_API_TOKEN` or `tdc auth token`) are treated as unknown scope and assumed write-capable.\n\n## View by URL\n\n```bash\ntdc view <url> # View any Comms entity by URL\n```\n\nRoutes automatically based on URL structure:\n- Message URL \u2192 `tdc msg view`\n- Conversation URL \u2192 `tdc conversation view`\n- Thread+comment URL \u2192 `tdc thread view` (comment ID extracted from URL)\n- Thread URL \u2192 `tdc thread view`\n\nURLs may use either `https://comms.todoist.com/{workspaceId}/...` or `https://comms.todoist.com/a/{workspaceId}/...`.\n\nAll target command flags pass through (e.g. `--json`, `--raw`, `--full`).\n\n## Inbox\n\n```bash\ntdc inbox # Show inbox threads\ntdc inbox --unread # Only unread threads\ntdc inbox --archive-filter all # Show active + done threads\ntdc inbox --archive-filter archived # Show only done threads\ntdc inbox --channel <filter> # Filter by channel name (fuzzy)\ntdc inbox --since <date> # Filter by date (ISO format)\ntdc inbox --limit <n> # Max items (default: 50)\n```\n\n## Threads\n\n```bash\ntdc thread <thread-ref> # View thread (shorthand for view)\ntdc thread view <thread-ref> # View thread with comments\ntdc thread view <ref> --comment <id> # View a specific comment\ntdc thread view <url-with-/c/id> # Comment ID extracted from URL\ntdc thread view <ref> --unread # Show only unread comments\ntdc thread view <ref> --context 3 # Include 3 read comments before unread\ntdc thread view <ref> --limit 20 # Limit number of comments\ntdc thread view <ref> --since <date> # Comments newer than date\ntdc thread view <ref> --raw # Show raw markdown\ntdc thread create <channel-ref> \"Title\" \"content\" # Create a new thread\ntdc thread create <channel-ref> \"Title\" \"content\" --json # Create and return as JSON\ntdc thread create <channel-ref> \"Title\" \"content\" --json --full # Include all thread fields\ntdc thread create <channel-ref> \"Title\" \"content\" --notify 123,456 # Notify specific users and/or groups by ID\ntdc thread create <channel-ref> \"Title\" \"content\" --unarchive # Land thread in author's Inbox (overrides default Comms auto-archive)\ntdc thread create <channel-ref> \"Title\" \"content\" --no-unarchive # Force archive even when userSettings.unarchiveNewThreads=true\ntdc thread create <channel-ref> \"Title\" \"content\" --dry-run # Preview without posting\ntdc thread create <channel-ref> \"Title\" --file ./a.png # Attach a file (repeatable; content optional)\ntdc thread reply <ref> \"content\" # Post a comment (notifies EVERYONE_IN_THREAD by default)\ntdc thread reply <ref> \"content\" --notify EVERYONE # Notify all workspace members\ntdc thread reply <ref> \"content\" --notify 123,id:456 # Notify specific users by ID\ntdc thread reply <ref> \"content\" --notify 123,Cbzzm11ZeYZoJYD4a6rti # Notify a user and a group (group IDs are base58, not numeric)\ntdc thread reply <ref> \"content\" --json # Post and return comment as JSON\ntdc thread reply <ref> \"content\" --json --full # Include all comment fields\ntdc thread reply <ref> \"content\" --close # Reply and close the thread\ntdc thread reply <ref> \"content\" --reopen # Reply and reopen a closed thread\ntdc thread reply <ref> \"content\" --file ./a.png # Attach a file (repeatable; content optional)\ntdc thread done <ref> # Preview thread archive (requires --yes to execute)\ntdc thread done <ref> --yes # Archive thread (mark done)\ntdc thread done <ref> --yes --json # Archive and return status as JSON\ntdc thread mark-read <ref> # Mark a thread read\ntdc thread mark-read <ref> <ref> --yes # Mark multiple threads read\nprintf \"123\\n456\\n\" | tdc thread mark-read --dry-run # Preview bulk mark-read from stdin\ntdc thread mute <ref> # Mute thread for 60 minutes (default)\ntdc thread mute <ref> --minutes 480 # Mute for custom duration\ntdc thread mute <ref> --json # Mute and return { id, mutedUntil } as JSON\ntdc thread mute <ref> --json --full # Mute and return full thread as JSON\ntdc thread unmute <ref> # Unmute a muted thread\ntdc thread unmute <ref> --json # Unmute and return { id, mutedUntil } as JSON\ntdc thread delete <ref> # Preview thread deletion (requires --yes to execute)\ntdc thread delete <ref> --yes # Permanently delete a thread\ntdc thread delete <ref> --yes --json # Delete and return status as JSON\ntdc thread rename <ref> \"New title\" # Rename a thread (change its title)\ntdc thread rename <ref> \"New title\" --json # Rename and return { id, title } as JSON\ntdc thread rename <ref> \"New title\" --json --full # Rename and return full thread as JSON\ntdc thread update <ref> \"New body\" # Update a thread's body (the first post)\necho \"New body\" | tdc thread update <ref> # Update body from stdin\ntdc thread update <ref> \"New body\" --dry-run # Preview without updating\ntdc thread update <ref> \"New body\" --json # Update and return { id, content } as JSON\ntdc thread update <ref> \"New body\" --json --full # Update and return full thread as JSON\n```\n\nDefault `--notify` for reply is EVERYONE_IN_THREAD, which may notify more people than intended. Before posting, confirm with the user whether specific people should be notified instead (via `--notify <ids>`). Options: EVERYONE, EVERYONE_IN_THREAD, or comma-separated user and/or group IDs.\n\n`--notify` automatically resolves IDs: group IDs are routed to the `groups` API field, user IDs to `recipients`. No special syntax needed.\n\n## Thread Comments\n\n```bash\ntdc comment <comment-ref> # View a comment (shorthand for view)\ntdc comment view <comment-ref> # View a single thread comment\ntdc comment view <comment-ref> --raw # Show raw markdown\ntdc comment view <comment-ref> --json # Output as JSON\ntdc comment view <comment-ref> --ndjson # Output as newline-delimited JSON\ntdc comment view <comment-ref> --json --full # Include all fields in JSON output\ntdc comment update <comment-ref> \"new content\" # Update a thread comment\ntdc comment update <comment-ref> \"content\" --json # Update and return updated comment as JSON\ntdc comment update <comment-ref> \"content\" --json --full # Include all comment fields\ntdc comment delete <comment-ref> # Preview comment deletion (requires --yes to execute)\ntdc comment delete <comment-ref> --yes # Delete a thread comment\ntdc comment delete <comment-ref> --yes --json # Delete and return status as JSON\n```\n\n## Conversations (DMs/Groups)\n\n```bash\ntdc conversation unread # List unread conversations\ntdc conversation list # List active conversations (DMs and groups)\ntdc conversation list --kind group # Only group conversations (3+ people)\ntdc conversation list --kind direct # Only 1:1 conversations (and your self-DM)\ntdc conversation list --participant \"Jane\" # Only conversations including these users (comma-separated)\ntdc conversation list --name \"release\" # Filter by title substring (case-insensitive)\ntdc conversation list --state archived # Archived conversations only (active|all|archived; default active)\ntdc conversation list --snippet # Include the latest message snippet\ntdc conversation list --limit 20 --json # Cap rows and output as JSON\ntdc conversation <conversation-ref> # View conversation (shorthand for view)\ntdc conversation view <conversation-ref> # View conversation messages\ntdc conversation with <user-ref> # Find your 1:1 DM with a user\ntdc conversation with <user-ref> --snippet # Include the latest message preview\ntdc conversation with <user-ref> --include-groups # List any conversations with that user\ntdc conversation reply <ref> \"content\" # Send a message\ntdc conversation reply <ref> \"content\" --json # Send and return message as JSON\ntdc conversation reply <ref> \"content\" --json --full # Include all message fields\ntdc conversation reply <ref> \"content\" --file ./a.png # Attach a file (repeatable; content optional)\ntdc conversation done <ref> # Preview conversation archive (requires --yes to execute)\ntdc conversation done <ref> --yes # Archive conversation\ntdc conversation done <ref> --yes --json # Archive and return status as JSON\ntdc conversation mute <ref> # Mute conversation for 60 minutes (default)\ntdc conversation mute <ref> --minutes 480 # Mute for custom duration\ntdc conversation mute <ref> --json # Mute and return { id, mutedUntil } as JSON\ntdc conversation mute <ref> --json --full # Mute and return full conversation as JSON\ntdc conversation unmute <ref> # Unmute a muted conversation\ntdc conversation unmute <ref> --json # Unmute and return { id, mutedUntil } as JSON\n```\n\nAlias: `tdc convo` works the same as `tdc conversation`.\n\n## Conversation Messages\n\n```bash\ntdc msg <message-ref> # View a message (shorthand for view)\ntdc msg view <message-ref> # View a single conversation message\ntdc msg update <ref> \"content\" # Edit a conversation message\ntdc msg update <ref> \"content\" --json # Edit and return updated message as JSON\ntdc msg update <ref> \"content\" --json --full # Include all message fields\ntdc msg delete <ref> # Preview message deletion (requires --yes to execute)\ntdc msg delete <ref> --yes # Delete a conversation message\ntdc msg delete <ref> --yes --json # Delete and return status as JSON\n```\n\nAlias: `tdc message` works the same as `tdc msg`.\n\n## Search\n\n```bash\ntdc mentions # Show content mentioning current user\ntdc mentions --since 2026-04-01 --all # Fetch every mention since a date\ntdc mentions --type threads --json # Limit mentions to threads\ntdc search \"query\" # Search content\ntdc search \"query\" --type threads # Filter: threads, messages, or all\ntdc search \"query\" --author <ref> # Filter by author\ntdc search \"query\" --to <ref> # Messages sent to user\ntdc search \"query\" --title-only # Search thread titles only\ntdc search \"query\" --mention-me # Results mentioning current user\ntdc search \"query\" --conversation <refs> # Limit to conversations (comma-separated refs)\ntdc search \"query\" --since <date> # Content from date\ntdc search \"query\" --until <date> # Content until date\ntdc search \"query\" --channel <refs> # Filter by channel refs (comma-separated)\ntdc search \"query\" --limit <n> # Max results (default: 50)\ntdc search \"query\" --cursor <cur> # Pagination cursor\ntdc search \"query\" --all # Fetch all result pages\n```\n\n## Users, Channels & Groups\n\n```bash\ntdc user # Show current user info\ntdc user --json # JSON output\ntdc user --json --full # Include all fields in JSON output\ntdc users # List active workspace users\ntdc users --search <text> # Filter by name/email\ntdc users --include-removed # Include users removed from the workspace\ntdc channels # List active joined workspace channels (alias of: tdc channel list)\ntdc channels --state all # Include archived joined channels too\ntdc channels --scope discoverable # Active public channels you can see but have not joined\ntdc channels --scope public --state all --json # All visible public channels, with joined status\ntdc channel create \"Engineering\" # Create a channel in the current workspace\ntdc channel create \"Leadership Team\" --private --users id:10,id:20 # Create private channel with initial members\ntdc channel create \"Product\" --workspace \"Doist\" --description \"Product discussions\" --json # Create and return channel as JSON\ntdc channel update <channel-ref> \"New name\" # Rename a channel\ntdc channel update <ref> --name \"New name\" # Rename with an explicit flag\ntdc channel update <ref> --description \"Team discussions\" # Update channel description\ntdc channel update <ref> --clear-description # Clear channel description\ntdc channel update <ref> --public # Make a channel public (--private makes it private)\ntdc channel update <ref> --description \"Team discussions\" --json --full # Update and return all channel fields\ntdc channel delete <channel-ref> --yes # Permanently delete a channel (requires --yes; usually admin-only)\ntdc channel delete <ref> --dry-run # Preview deletion\ntdc channel archive <channel-ref> # Archive a channel (no-op if already archived)\ntdc channel unarchive id:<id> # Unarchive a channel (pass id:/numeric ref for archived channels)\ntdc channel threads <channel-ref> # List threads in a channel (fuzzy name, id:, numeric ID, or URL)\ntdc channel threads \"general\" --unread # Only unread threads\ntdc channel threads <ref> --archive-filter all # Include archived threads (active|archived|all)\ntdc channel threads <ref> --since 2026-01-01 # Filter by last-updated date (ISO)\ntdc channel threads <ref> --limit 20 # Max threads per page (default: 50)\ntdc channel threads <ref> --limit 20 --cursor <cursor-from-prev> # Paginate\ntdc channel threads <ref> --json # { results, nextCursor } with isUnread + url\ntdc channel members <channel-ref> # List a channel's members + groups fully in the channel\ntdc channel members <ref> --json # JSON with id, name, workspaceId, members\ntdc channel members add <ref> alice group:Design # Add users and/or expand group:<ref> members\ntdc channel members add <ref> a@d.com id:789 --json # Add refs, output result as JSON\ntdc channel members remove <ref> alice group:Frontend # Remove users and/or group members\ntdc channel members set <ref> group:Squad --apply # Replace membership with the resolved set\ntdc channel members set <ref> alice bob # Dry-run by default; refuses to remove you (--include-self to override)\ntdc groups # List workspace groups\ntdc groups --search \"frontend\" # Filter groups by name (case-insensitive)\ntdc groups --json # JSON output\ntdc groups --json --full # Include all fields in JSON output\ntdc groups view <group-ref> # Show group with member details\ntdc groups view <ref> --json # JSON output with id, name, workspaceId, members\ntdc groups view <ref> --json --full # Include all fields in JSON output\ntdc groups create \"Name\" # Create a new group\ntdc groups create \"Name\" --users alice@doist.com,bob@doist.com # Create with members\ntdc groups create \"Name\" --json # Output created group as JSON\ntdc groups rename <group-ref> \"New name\" # Rename a group\ntdc groups rename <ref> \"Name\" --json # Output renamed group as JSON\ntdc groups delete <group-ref> --yes # Delete a group (requires --yes)\ntdc groups delete <ref> --dry-run # Preview deletion\ntdc groups add-user <group-ref> user1 user2 # Add users to a group\ntdc groups add-user <ref> a@d.com,b@d.com # Comma-separated refs\ntdc groups add-user <ref> id:123 --json # Output result as JSON\ntdc groups remove-user <group-ref> user1 user2 # Remove users from a group\ntdc groups remove-user <ref> id:123,id:456 # Comma-separated ID refs\n```\n\nIf a channel is not found in `tdc channels`, widen with broader listings such as `tdc channels --scope public`, then `tdc channels --scope public --state all`. Check `tdc channels --help` for other available filters.\n\n`tdc channel threads` returns every thread in the channel; pagination filters (`--limit`, `--cursor`, `--since`, `--until`, `--unread`) are applied client-side after fetch. `--archive-filter` is applied server-side. Results are sorted newest-first by last activity. In `--json` / `--ndjson`, the response includes a `nextCursor` string (opaque) you can pass via `--cursor` to fetch the next page; NDJSON emits the cursor as a final `{ \"_meta\": true, \"nextCursor\": \"...\" }` line.\n\nFor `tdc channel members add/remove/set`, refs accept user identifiers (`id:N`, email, name) or `group:<ref>`, which expands to the group's current members. Group expansion is one-shot \u2014 it is not a persistent link, so users added to the group later will not auto-join the channel. `set` replaces membership with the resolved set and is dry-run by default (pass `--apply` to mutate); it refuses to remove the acting user unless `--include-self` is passed.\n\n## Reactions\n\n```bash\ntdc react thread <ref> \uD83D\uDC4D # Add reaction to thread\ntdc react comment <ref> +1 # Add reaction (shortcode)\ntdc react message <ref> heart # Add reaction to DM message\ntdc react thread <ref> \uD83D\uDC4D --json # Output result as JSON\ntdc unreact thread <ref> \uD83D\uDC4D # Remove reaction\ntdc unreact thread <ref> \uD83D\uDC4D --json # Output result as JSON\n```\n\nSupported shortcodes: +1, -1, heart, tada, smile, laughing, thinking, fire, check, x, eyes, pray, clap, rocket, wave\n\n## Shell Completions\n\n```bash\ntdc completion install # Install tab completions (prompts for shell)\ntdc completion install bash # Install for specific shell\ntdc completion install zsh\ntdc completion install fish\ntdc completion uninstall # Remove completions\n```\n\n### Diagnostics\n\n```bash\ntdc doctor # Run local + network diagnostics\ntdc doctor --offline # Skip Comms and npm network checks\ntdc doctor --json # JSON output with per-check results\n```\n\n### Configuration\n\n```bash\ntdc config view # Pretty-printed config, token masked, labels actual token source\ntdc config view --json # Raw JSON, token masked\ntdc config view --show-token # Include the full token\ntdc config set unarchive-new-threads true # Persist: always unarchive new threads so they land in your Inbox\ntdc config set unarchive-new-threads false # Persist: keep Comms's default (thread auto-archived for author)\n```\n\nUser preferences are stored under `userSettings` in the config file. Currently supported keys: `unarchive-new-threads`. The flag on `tdc thread create` (`--unarchive` / `--no-unarchive`) overrides this default per-invocation.\n\n### Update\n\n```bash\ntdc update # Update CLI to latest version\ntdc update --check # Check for updates without installing, show channel\ntdc update --check --json # Same, JSON envelope\ntdc update --check --ndjson # Same, newline-delimited JSON envelope\ntdc update --channel # Show current update channel\ntdc update switch --stable # Switch to stable release channel\ntdc update switch --pre-release # Switch to pre-release (next) channel\ntdc update switch --pre-release --json # Same, JSON envelope\ntdc update switch --pre-release --ndjson # Same, newline-delimited JSON envelope\n```\n\n### Changelog\n```bash\ntdc changelog # Show last 5 versions\ntdc changelog -n 3 # Show last 3 versions\ntdc changelog --count 10 # Show last 10 versions\n```\n\n## Migration\n\nTranslate old `twist.com` URLs to their Comms equivalents (e.g. for rewriting bookmarks or history). The migration endpoint authenticates with a **Twist** token (not a Comms one). Prefer the `TWIST_AUTH_TOKEN` environment variable \u2014 a CLI flag exposes the token in process listings. `--twist-token` is supported for ad-hoc use and overrides the env var. If the Twist CLI (`tw`) is installed, populate the env var inline with `TWIST_AUTH_TOKEN=\"$(tw auth token view)\"`.\n\n```bash\n# Comma-separated list as an argument (token from the environment)\nTWIST_AUTH_TOKEN=\"$(tw auth token view)\" tdc migrate urls \"https://twist.com/a/1/ch/2/t/3,https://twist.com/a/1/ch/2/t/4\"\n\n# Or pipe URLs via stdin (comma- or newline-separated)\ncat old-urls.txt | TWIST_AUTH_TOKEN=\"$(tw auth token view)\" tdc migrate urls\n\n# --twist-token overrides the env var (visible in process lists \u2014 prefer the env var)\ntdc migrate urls \"https://twist.com/a/1/ch/2/t/3\" --twist-token <token>\n\ntdc migrate urls \"<urls>\" --json # Structured output ({ oldUrl, newUrl } / { oldUrl, error })\ntdc migrate urls \"<urls>\" --ndjson # Newline-delimited JSON\n```\n\nOutput is one line per URL in input order: `old -> new` on success, `old \u2717 <code>` on failure (`invalid_url` / `not_imported`, or `API_ERROR` when the endpoint gives no code). Per-URL failures don't abort the run; the command exits non-zero if any URL fails to migrate.\n\n## Global Options\n\n```bash\n--no-spinner # Disable loading animations\n--progress-jsonl # Machine-readable progress events (JSONL to stderr)\n--progress-jsonl=<path> # Same, but write events to <path> instead of stderr\n--progress-jsonl <path> # Same as above (space-separated form also accepted)\n--accessible # Add text labels to color-coded output (also: TDC_ACCESSIBLE=1)\n--non-interactive # Disable interactive prompts (auto-detected when stdin is not a TTY)\n--interactive # Force interactive mode even when stdin is not a TTY\n```\n\n## Output Formats\n\nAll list/view commands support:\n\n```bash\n--json # Output as JSON\n--ndjson # Output as newline-delimited JSON (for streaming)\n--full # Include all fields (default shows essential fields only)\n```\n\n## Dry Run\n\nMutating commands accept `--dry-run` to preview the operation without making the change. Where a command performs pre-flight validation (e.g. fetching the target thread to check channel access or ownership), those checks still run in dry-run \u2014 only the mutating write is skipped. Commands that have no pre-flight validation parse the reference and print the preview without hitting the API. The preview is structured:\n\n```\n[dry-run] Would <action>:\n <Key>: <resolved value>\n ...\nRun without --dry-run to execute.\n```\n\n## Reference System\n\nCommands accept flexible references:\n- **Numeric IDs**: `123` or `id:123`\n- **Comms URLs**: Full `https://comms.todoist.com/...` URLs (parsed automatically)\n- **Fuzzy names**: For workspaces/users - `\"My Workspace\"` or partial matches\n\n## Piping Input\n\nCommands that accept content (`thread create`, `thread reply`, `comment update`, `conversation reply`, `msg update`) auto-detect piped stdin:\n\n```bash\ncat notes.md | tdc thread reply <ref>\ntdc thread create <channel-ref> \"Title\" < body.md\necho \"Quick reply\" | tdc conversation reply <ref>\n```\n\nIf no content argument is provided and no stdin is piped, the CLI opens `$EDITOR` for interactive input. In non-TTY environments (e.g. when called by an agent or in a pipeline), the editor is automatically skipped and the command fails fast with an actionable error message. Use `--non-interactive` to force this behavior even in a TTY, or `--interactive` to override auto-detection.\n\n`tdc thread mark-read` also accepts thread refs from stdin, one per line:\n\n```bash\nprintf \"123\\n456\\n\" | tdc thread mark-read --yes\n```\n\n## Common Workflows\n\n**View by URL (auto-routes to the right command):**\n```bash\ntdc view https://comms.todoist.com/1585/ch/100/t/200 # View thread\ntdc view https://comms.todoist.com/a/1585/ch/100/t/200 # View thread\ntdc view https://comms.todoist.com/a/1585/ch/100/t/200/c/300 # View comment\ntdc view https://comms.todoist.com/a/1585/msg/400 # View conversation\ntdc view https://comms.todoist.com/a/1585/msg/400/m/500 --json # View message as JSON\n```\n\n**Check inbox and respond:**\n```bash\ntdc inbox --unread --json\ntdc thread view <id> --unread\ntdc thread reply <id> \"Thanks, I'll look into this.\"\ntdc thread done <id> --yes\n```\n\n**Search and review:**\n```bash\ntdc mentions --since 2026-04-01 --all --json\ntdc search \"deployment\" --type threads --json\ntdc thread view <thread-id>\n```\n\n**Check DMs:**\n```bash\ntdc conversation unread --json\ntdc conversation list --kind group --json # find a group DM by participants/name\ntdc conversation view <conversation-id>\ntdc conversation with \"Alice Example\"\ntdc conversation reply <id> \"Got it, thanks!\"\n```\n";
|
|
6
|
+
export declare const SKILL_CONTENT = "# Comms CLI (tdc)\n\nAccess Comms messaging via the `tdc` CLI. Use when the user asks about their Comms workspaces, threads, messages, or wants to interact with Comms in any way.\n\n## Setup\n\n```bash\ntdc auth login # OAuth login (standard write scopes)\ntdc auth login --read-only # OAuth login with read-only scope\ntdc auth login --full-access # OAuth login with delete/admin scopes\ntdc auth login --callback-port <n># Override the local OAuth callback port (default 8766)\ntdc auth login --json # Emit a JSON envelope for scripted / agent use\ntdc auth login --ndjson # Emit an NDJSON envelope for scripted / agent use\ntdc auth token # Save API token manually (prompts securely; scope unknown, assumed write-capable)\ntdc auth status # Verify authentication + show mode\ntdc auth status --json # Full status payload as JSON (--ndjson also supported)\ntdc auth status --user <ref> # Target a specific stored account (id, id:<n>, or display name)\ntdc --user <ref> auth <status|logout|token view|refresh-token view> # Equivalent to passing --user after the subcommand; other commands accept the flag but ignore it\ntdc auth logout # Remove saved token and auth metadata\ntdc auth logout --json # Emits `{\"ok\": true}` (--ndjson is silent)\ntdc auth logout --user <ref> # Target a specific stored account; mismatched ref errors with ACCOUNT_NOT_FOUND\ntdc auth token view # Print the saved token to stdout (pipe-safe; refuses if COMMS_API_TOKEN is set)\ntdc auth token view --user <ref> # Print the saved token for a specific stored account\ntdc auth refresh-token view # Print the saved OAuth refresh token to stdout (pipe-safe; OAuth logins only)\ntdc auth refresh-token view --user <ref> # Print the saved OAuth refresh token for a specific stored account\ntdc account [list|current|use <ref>|remove <ref>] # Manage stored accounts; all support --json/--ndjson\n # current's payload is {id, label, authMode, authScope, source:\"config\"} | {source:\"env\"} | {source:\"token-only\"}\ntdc auth login # Re-running auth login with a different OAuth grant adds a NEW account; default stays pinned unless none was set\ntdc workspaces # List available workspaces\ntdc workspace use <ref> # Set current workspace\ntdc completion install # Install shell completions\ntdc config view # Show the current CLI configuration file (token masked)\ntdc config set <key> <value> # Set a user preference (e.g. unarchive-new-threads true)\ntdc doctor # Diagnose CLI setup and environment issues\ntdc update # Update CLI to latest version\ntdc changelog # Show recent changelog entries\ntdc migrate urls <urls> # Translate old twist.com URLs to Comms URLs (needs a Twist token)\n```\n\nOAuth login uses Todoist OAuth for Comms access. The default grant can read Comms data and create/update content or messages. It does not include delete, channel management, or user/workspace write scopes; use `tdc auth login --full-access` only when needed. Stored auth uses the system credential manager when available. If secure storage is unavailable, `tdc` warns and falls back to `~/.config/comms-cli/config.json`. `COMMS_API_TOKEN` always takes priority over the stored token.\n\nIn read-only mode (`tdc auth login --read-only`), commands that modify Comms data (reply, archive, react, delete, etc.) are blocked by the CLI. Externally provided tokens (`COMMS_API_TOKEN` or `tdc auth token`) are treated as unknown scope and assumed write-capable.\n\n## View by URL\n\n```bash\ntdc view <url> # View any Comms entity by URL\n```\n\nRoutes automatically based on URL structure:\n- Message URL \u2192 `tdc msg view`\n- Conversation URL \u2192 `tdc conversation view`\n- Thread+comment URL \u2192 `tdc thread view` (comment ID extracted from URL)\n- Thread URL \u2192 `tdc thread view`\n\nURLs may use either `https://comms.todoist.com/{workspaceId}/...` or `https://comms.todoist.com/a/{workspaceId}/...`.\n\nAll target command flags pass through (e.g. `--json`, `--raw`, `--full`).\n\n## Inbox\n\n```bash\ntdc inbox # Show inbox threads\ntdc inbox --unread # Only unread threads\ntdc inbox --archive-filter all # Show active + done threads\ntdc inbox --archive-filter archived # Show only done threads\ntdc inbox --channel <filter> # Filter by channel name (fuzzy)\ntdc inbox --since <date> # Filter by date (ISO format)\ntdc inbox --limit <n> # Max items (default: 50)\n```\n\n## Threads\n\n```bash\ntdc thread <thread-ref> # View thread (shorthand for view)\ntdc thread view <thread-ref> # View thread with comments\ntdc thread view <ref> --comment <id> # View a specific comment\ntdc thread view <url-with-/c/id> # Comment ID extracted from URL\ntdc thread view <ref> --unread # Show only unread comments\ntdc thread view <ref> --context 3 # Include 3 read comments before unread\ntdc thread view <ref> --limit 20 # Limit number of comments\ntdc thread view <ref> --since <date> # Comments newer than date\ntdc thread view <ref> --raw # Show raw markdown\ntdc thread create <channel-ref> \"Title\" \"content\" # Create a new thread\ntdc thread create <channel-ref> \"Title\" \"content\" --json # Create and return as JSON\ntdc thread create <channel-ref> \"Title\" \"content\" --json --full # Include all thread fields\ntdc thread create <channel-ref> \"Title\" \"content\" --notify 123,Cbzzm11ZeYZoJYD4a6rti # Notify user and/or group IDs\ntdc thread create <channel-ref> \"Title\" \"content\" --unarchive # Land thread in author's Inbox (overrides default Comms auto-archive)\ntdc thread create <channel-ref> \"Title\" \"content\" --no-unarchive # Force archive even when userSettings.unarchiveNewThreads=true\ntdc thread create <channel-ref> \"Title\" \"content\" --dry-run # Preview without posting\ntdc thread create <channel-ref> \"Title\" --file ./a.png # Attach a file (repeatable; content optional)\ntdc thread reply <ref> \"content\" # Post a comment (notifies EVERYONE_IN_THREAD by default)\ntdc thread reply <ref> \"content\" --notify EVERYONE # Notify all workspace members\ntdc thread reply <ref> \"content\" --notify 123,id:456 # Notify specific users by ID\ntdc thread reply <ref> \"content\" --notify 123,Cbzzm11ZeYZoJYD4a6rti # Notify a user and a group (group IDs are base58, not numeric)\ntdc thread reply <ref> \"content\" --json # Post and return comment as JSON\ntdc thread reply <ref> \"content\" --json --full # Include all comment fields\ntdc thread reply <ref> \"content\" --close # Reply and close the thread\ntdc thread reply <ref> \"content\" --reopen # Reply and reopen a closed thread\ntdc thread reply <ref> \"content\" --file ./a.png # Attach a file (repeatable; content optional)\ntdc thread done <ref> # Preview thread archive (requires --yes to execute)\ntdc thread done <ref> --yes # Archive thread (mark done)\ntdc thread done <ref> --yes --json # Archive and return status as JSON\ntdc thread mark-read <ref> # Mark a thread read\ntdc thread mark-read <ref> <ref> --yes # Mark multiple threads read\nprintf \"id:CbT8n2Kp4Qx6Rz9Lm3Va\\nid:CbT9m4Qr7Vz2Nx8Lp5Sa\\n\" | tdc thread mark-read --dry-run # Preview bulk mark-read from stdin\ntdc thread mute <ref> # Mute thread for 60 minutes (default)\ntdc thread mute <ref> --minutes 480 # Mute for custom duration\ntdc thread mute <ref> --json # Mute and return { id, mutedUntil } as JSON\ntdc thread mute <ref> --json --full # Mute and return full thread as JSON\ntdc thread unmute <ref> # Unmute a muted thread\ntdc thread unmute <ref> --json # Unmute and return { id, mutedUntil } as JSON\ntdc thread delete <ref> # Preview thread deletion (requires --yes to execute)\ntdc thread delete <ref> --yes # Permanently delete a thread\ntdc thread delete <ref> --yes --json # Delete and return status as JSON\ntdc thread rename <ref> \"New title\" # Rename a thread (change its title)\ntdc thread rename <ref> \"New title\" --json # Rename and return { id, title } as JSON\ntdc thread rename <ref> \"New title\" --json --full # Rename and return full thread as JSON\ntdc thread update <ref> \"New body\" # Update a thread's body (the first post)\necho \"New body\" | tdc thread update <ref> # Update body from stdin\ntdc thread update <ref> \"New body\" --dry-run # Preview without updating\ntdc thread update <ref> \"New body\" --json # Update and return { id, content } as JSON\ntdc thread update <ref> \"New body\" --json --full # Update and return full thread as JSON\n```\n\nDefault `--notify` for reply is EVERYONE_IN_THREAD, which may notify more people than intended. Before posting, confirm with the user whether specific people should be notified instead (via `--notify <ids>`). Options: EVERYONE, EVERYONE_IN_THREAD, or comma-separated user and/or group IDs.\n\n`--notify` automatically resolves IDs: group IDs are routed to the `groups` API field, user IDs to `recipients`. No special syntax needed.\n\n## Thread Comments\n\n```bash\ntdc comment <comment-ref> # View a comment (shorthand for view)\ntdc comment view <comment-ref> # View a single thread comment\ntdc comment view <comment-ref> --raw # Show raw markdown\ntdc comment view <comment-ref> --json # Output as JSON\ntdc comment view <comment-ref> --ndjson # Output as newline-delimited JSON\ntdc comment view <comment-ref> --json --full # Include all fields in JSON output\ntdc comment update <comment-ref> \"new content\" # Update a thread comment\ntdc comment update <comment-ref> \"content\" --json # Update and return updated comment as JSON\ntdc comment update <comment-ref> \"content\" --json --full # Include all comment fields\ntdc comment delete <comment-ref> # Preview comment deletion (requires --yes to execute)\ntdc comment delete <comment-ref> --yes # Delete a thread comment\ntdc comment delete <comment-ref> --yes --json # Delete and return status as JSON\n```\n\n## Conversations (DMs/Groups)\n\n```bash\ntdc conversation unread # List unread conversations\ntdc conversation list # List active conversations (DMs and groups)\ntdc conversation list --kind group # Only group conversations (3+ people)\ntdc conversation list --kind direct # Only 1:1 conversations (and your self-DM)\ntdc conversation list --participant \"Jane\" # Only conversations including these users (comma-separated)\ntdc conversation list --name \"release\" # Filter by title substring (case-insensitive)\ntdc conversation list --state archived # Archived conversations only (active|all|archived; default active)\ntdc conversation list --snippet # Include the latest message snippet\ntdc conversation list --limit 20 --json # Cap rows and output as JSON\ntdc conversation <conversation-ref> # View conversation (shorthand for view)\ntdc conversation view <conversation-ref> # View conversation messages\ntdc conversation with <user-ref> # Find your 1:1 DM with a user\ntdc conversation with <user-ref> --snippet # Include the latest message preview\ntdc conversation with <user-ref> --include-groups # List any conversations with that user\ntdc conversation reply <ref> \"content\" # Send a message\ntdc conversation reply <ref> \"content\" --json # Send and return message as JSON\ntdc conversation reply <ref> \"content\" --json --full # Include all message fields\ntdc conversation reply <ref> \"content\" --file ./a.png # Attach a file (repeatable; content optional)\ntdc conversation done <ref> # Preview conversation archive (requires --yes to execute)\ntdc conversation done <ref> --yes # Archive conversation\ntdc conversation done <ref> --yes --json # Archive and return status as JSON\ntdc conversation mute <ref> # Mute conversation for 60 minutes (default)\ntdc conversation mute <ref> --minutes 480 # Mute for custom duration\ntdc conversation mute <ref> --json # Mute and return { id, mutedUntil } as JSON\ntdc conversation mute <ref> --json --full # Mute and return full conversation as JSON\ntdc conversation unmute <ref> # Unmute a muted conversation\ntdc conversation unmute <ref> --json # Unmute and return { id, mutedUntil } as JSON\n```\n\nAlias: `tdc convo` works the same as `tdc conversation`.\n\n## Conversation Messages\n\n```bash\ntdc msg <message-ref> # View a message (shorthand for view)\ntdc msg view <message-ref> # View a single conversation message\ntdc msg update <ref> \"content\" # Edit a conversation message\ntdc msg update <ref> \"content\" --json # Edit and return updated message as JSON\ntdc msg update <ref> \"content\" --json --full # Include all message fields\ntdc msg delete <ref> # Preview message deletion (requires --yes to execute)\ntdc msg delete <ref> --yes # Delete a conversation message\ntdc msg delete <ref> --yes --json # Delete and return status as JSON\n```\n\nAlias: `tdc message` works the same as `tdc msg`.\n\n## Search\n\n```bash\ntdc mentions # Show content mentioning current user\ntdc mentions --since 2026-04-01 --all # Fetch every mention since a date\ntdc mentions --type threads --json # Limit mentions to threads\ntdc search \"query\" # Search content\ntdc search \"query\" --type threads # Filter: threads, messages, or all\ntdc search \"query\" --author <ref> # Filter by author\ntdc search \"query\" --to <ref> # Messages sent to user\ntdc search \"query\" --title-only # Search thread titles only\ntdc search \"query\" --mention-me # Results mentioning current user\ntdc search \"query\" --conversation <refs> # Limit to conversations (comma-separated refs)\ntdc search \"query\" --since <date> # Content from date\ntdc search \"query\" --until <date> # Content until date\ntdc search \"query\" --channel <refs> # Filter by channel refs (comma-separated)\ntdc search \"query\" --limit <n> # Max results (default: 50)\ntdc search \"query\" --cursor <cur> # Pagination cursor\ntdc search \"query\" --all # Fetch all result pages\n```\n\n## Users, Channels & Groups\n\n```bash\ntdc user # Show current user info\ntdc user --json # JSON output\ntdc user --json --full # Include all fields in JSON output\ntdc users # List active workspace users\ntdc users --search <text> # Filter by name/email\ntdc users --include-removed # Include users removed from the workspace\ntdc channels # List active joined workspace channels (alias of: tdc channel list)\ntdc channels --state all # Include archived joined channels too\ntdc channels --scope discoverable # Active public channels you can see but have not joined\ntdc channels --scope public --state all --json # All visible public channels, with joined status\ntdc channel create \"Engineering\" # Create a channel in the current workspace\ntdc channel create \"Leadership Team\" --private --users id:10,id:20 # Create private channel with initial members\ntdc channel create \"Product\" --workspace \"Doist\" --description \"Product discussions\" --json # Create and return channel as JSON\ntdc channel update <channel-ref> \"New name\" # Rename a channel\ntdc channel update <ref> --name \"New name\" # Rename with an explicit flag\ntdc channel update <ref> --description \"Team discussions\" # Update channel description\ntdc channel update <ref> --clear-description # Clear channel description\ntdc channel update <ref> --public # Make a channel public (--private makes it private)\ntdc channel update <ref> --description \"Team discussions\" --json --full # Update and return all channel fields\ntdc channel delete <channel-ref> --yes # Permanently delete a channel (requires --yes; usually admin-only)\ntdc channel delete <ref> --dry-run # Preview deletion\ntdc channel archive <channel-ref> # Archive a channel (no-op if already archived)\ntdc channel unarchive id:<id> # Unarchive a channel (pass id: for archived channels)\ntdc channel threads <channel-ref> # List threads in a channel (fuzzy name, id:, or URL)\ntdc channel threads \"general\" --unread # Only unread threads\ntdc channel threads <ref> --archive-filter all # Include archived threads (active|archived|all)\ntdc channel threads <ref> --since 2026-01-01 # Filter by last-updated date (ISO)\ntdc channel threads <ref> --limit 20 # Max threads per page (default: 50)\ntdc channel threads <ref> --limit 20 --cursor <cursor-from-prev> # Paginate\ntdc channel threads <ref> --json # { results, nextCursor } with isUnread + url\ntdc channel members <channel-ref> # List a channel's members + groups fully in the channel\ntdc channel members <ref> --json # JSON with id, name, workspaceId, members\ntdc channel members add <ref> alice group:Design # Add users and/or expand group:<ref> members\ntdc channel members add <ref> a@d.com id:789 --json # Add refs, output result as JSON\ntdc channel members remove <ref> alice group:Frontend # Remove users and/or group members\ntdc channel members set <ref> group:Squad --apply # Replace membership with the resolved set\ntdc channel members set <ref> alice bob # Dry-run by default; refuses to remove you (--include-self to override)\ntdc groups # List workspace groups\ntdc groups --search \"frontend\" # Filter groups by name (case-insensitive)\ntdc groups --json # JSON output\ntdc groups --json --full # Include all fields in JSON output\ntdc groups view <group-ref> # Show group with member details\ntdc groups view <ref> --json # JSON output with id, name, workspaceId, members\ntdc groups view <ref> --json --full # Include all fields in JSON output\ntdc groups create \"Name\" # Create a new group\ntdc groups create \"Name\" --users alice@doist.com,bob@doist.com # Create with members\ntdc groups create \"Name\" --json # Output created group as JSON\ntdc groups rename <group-ref> \"New name\" # Rename a group\ntdc groups rename <ref> \"Name\" --json # Output renamed group as JSON\ntdc groups delete <group-ref> --yes # Delete a group (requires --yes)\ntdc groups delete <ref> --dry-run # Preview deletion\ntdc groups add-user <group-ref> user1 user2 # Add users to a group\ntdc groups add-user <ref> a@d.com,b@d.com # Comma-separated refs\ntdc groups add-user <ref> id:123 --json # Output result as JSON\ntdc groups remove-user <group-ref> user1 user2 # Remove users from a group\ntdc groups remove-user <ref> id:123,id:456 # Comma-separated ID refs\n```\n\nIf a channel is not found in `tdc channels`, widen with broader listings such as `tdc channels --scope public`, then `tdc channels --scope public --state all`. Check `tdc channels --help` for other available filters.\n\n`tdc channel threads` returns every thread in the channel; pagination filters (`--limit`, `--cursor`, `--since`, `--until`, `--unread`) are applied client-side after fetch. `--archive-filter` is applied server-side. Results are sorted newest-first by last activity. In `--json` / `--ndjson`, the response includes a `nextCursor` string (opaque) you can pass via `--cursor` to fetch the next page; NDJSON emits the cursor as a final `{ \"_meta\": true, \"nextCursor\": \"...\" }` line.\n\nFor `tdc channel members add/remove/set`, refs accept user identifiers (`id:N`, email, name) or `group:<ref>`, which expands to the group's current members. Group expansion is one-shot \u2014 it is not a persistent link, so users added to the group later will not auto-join the channel. `set` replaces membership with the resolved set and is dry-run by default (pass `--apply` to mutate); it refuses to remove the acting user unless `--include-self` is passed.\n\n## Reactions\n\n```bash\ntdc react thread <ref> \uD83D\uDC4D # Add reaction to thread\ntdc react comment <ref> +1 # Add reaction (shortcode)\ntdc react message <ref> heart # Add reaction to DM message\ntdc react thread <ref> \uD83D\uDC4D --json # Output result as JSON\ntdc unreact thread <ref> \uD83D\uDC4D # Remove reaction\ntdc unreact thread <ref> \uD83D\uDC4D --json # Output result as JSON\n```\n\nSupported shortcodes: +1, -1, heart, tada, smile, laughing, thinking, fire, check, x, eyes, pray, clap, rocket, wave\n\n## Shell Completions\n\n```bash\ntdc completion install # Install tab completions (prompts for shell)\ntdc completion install bash # Install for specific shell\ntdc completion install zsh\ntdc completion install fish\ntdc completion uninstall # Remove completions\n```\n\n### Diagnostics\n\n```bash\ntdc doctor # Run local + network diagnostics\ntdc doctor --offline # Skip Comms and npm network checks\ntdc doctor --json # JSON output with per-check results\n```\n\n### Configuration\n\n```bash\ntdc config view # Pretty-printed config, token masked, labels actual token source\ntdc config view --json # Raw JSON, token masked\ntdc config view --show-token # Include the full token\ntdc config set unarchive-new-threads true # Persist: always unarchive new threads so they land in your Inbox\ntdc config set unarchive-new-threads false # Persist: keep Comms's default (thread auto-archived for author)\n```\n\nUser preferences are stored under `userSettings` in the config file. Currently supported keys: `unarchive-new-threads`. The flag on `tdc thread create` (`--unarchive` / `--no-unarchive`) overrides this default per-invocation.\n\n### Update\n\n```bash\ntdc update # Update CLI to latest version\ntdc update --check # Check for updates without installing, show channel\ntdc update --check --json # Same, JSON envelope\ntdc update --check --ndjson # Same, newline-delimited JSON envelope\ntdc update --channel # Show current update channel\ntdc update switch --stable # Switch to stable release channel\ntdc update switch --pre-release # Switch to pre-release (next) channel\ntdc update switch --pre-release --json # Same, JSON envelope\ntdc update switch --pre-release --ndjson # Same, newline-delimited JSON envelope\n```\n\n### Changelog\n```bash\ntdc changelog # Show last 5 versions\ntdc changelog -n 3 # Show last 3 versions\ntdc changelog --count 10 # Show last 10 versions\n```\n\n## Migration\n\nTranslate old `twist.com` URLs to their Comms equivalents (e.g. for rewriting bookmarks or history). The migration endpoint authenticates with a **Twist** token (not a Comms one). Prefer the `TWIST_AUTH_TOKEN` environment variable \u2014 a CLI flag exposes the token in process listings. `--twist-token` is supported for ad-hoc use and overrides the env var. If the Twist CLI (`tw`) is installed, populate the env var inline with `TWIST_AUTH_TOKEN=\"$(tw auth token view)\"`.\n\n```bash\n# Comma-separated list as an argument (token from the environment)\nTWIST_AUTH_TOKEN=\"$(tw auth token view)\" tdc migrate urls \"https://twist.com/a/1/ch/2/t/3,https://twist.com/a/1/ch/2/t/4\"\n\n# Or pipe URLs via stdin (comma- or newline-separated)\ncat old-urls.txt | TWIST_AUTH_TOKEN=\"$(tw auth token view)\" tdc migrate urls\n\n# --twist-token overrides the env var (visible in process lists \u2014 prefer the env var)\ntdc migrate urls \"https://twist.com/a/1/ch/2/t/3\" --twist-token <token>\n\ntdc migrate urls \"<urls>\" --json # Structured output ({ oldUrl, newUrl } / { oldUrl, error })\ntdc migrate urls \"<urls>\" --ndjson # Newline-delimited JSON\n```\n\nOutput is one line per URL in input order: `old -> new` on success, `old \u2717 <code>` on failure (`invalid_url` / `not_imported`, or `API_ERROR` when the endpoint gives no code). Per-URL failures don't abort the run; the command exits non-zero if any URL fails to migrate.\n\n## Global Options\n\n```bash\n--no-spinner # Disable loading animations\n--progress-jsonl # Machine-readable progress events (JSONL to stderr)\n--progress-jsonl=<path> # Same, but write events to <path> instead of stderr\n--progress-jsonl <path> # Same as above (space-separated form also accepted)\n--accessible # Add text labels to color-coded output (also: TDC_ACCESSIBLE=1)\n--non-interactive # Disable interactive prompts (auto-detected when stdin is not a TTY)\n--interactive # Force interactive mode even when stdin is not a TTY\n```\n\n## Output Formats\n\nAll list/view commands support:\n\n```bash\n--json # Output as JSON\n--ndjson # Output as newline-delimited JSON (for streaming)\n--full # Include all fields (default shows essential fields only)\n```\n\n## Dry Run\n\nMutating commands accept `--dry-run` to preview the operation without making the change. Where a command performs pre-flight validation (e.g. fetching the target thread to check channel access or ownership), those checks still run in dry-run \u2014 only the mutating write is skipped. Commands that have no pre-flight validation parse the reference and print the preview without hitting the API. The preview is structured:\n\n```\n[dry-run] Would <action>:\n <Key>: <resolved value>\n ...\nRun without --dry-run to execute.\n```\n\n## Reference System\n\nCommands accept flexible references:\n- **IDs**: `id:<id>` (or a bare ID when unambiguous). Workspace/user IDs are numeric; most Comms entity IDs are opaque strings.\n- **Comms URLs**: Full `https://comms.todoist.com/...` URLs (parsed automatically)\n- **Fuzzy names**: For workspaces/users/channels/groups - `\"My Workspace\"` or partial matches\n\n## Piping Input\n\nCommands that accept content (`thread create`, `thread reply`, `comment update`, `conversation reply`, `msg update`) auto-detect piped stdin:\n\n```bash\ncat notes.md | tdc thread reply <ref>\ntdc thread create <channel-ref> \"Title\" < body.md\necho \"Quick reply\" | tdc conversation reply <ref>\n```\n\nIf no content argument is provided and no stdin is piped, the CLI opens `$EDITOR` for interactive input. In non-TTY environments (e.g. when called by an agent or in a pipeline), the editor is automatically skipped and the command fails fast with an actionable error message. Use `--non-interactive` to force this behavior even in a TTY, or `--interactive` to override auto-detection.\n\n`tdc thread mark-read` also accepts thread refs from stdin, one per line:\n\n```bash\nprintf \"id:CbT8n2Kp4Qx6Rz9Lm3Va\\nid:CbT9m4Qr7Vz2Nx8Lp5Sa\\n\" | tdc thread mark-read --yes\n```\n\n## Common Workflows\n\n**View by URL (auto-routes to the right command):**\n```bash\ntdc view https://comms.todoist.com/1585/ch/CbC8n2Kp4Qx6Rz9Lm3Va/t/CbT8n2Kp4Qx6Rz9Lm3Va # View thread\ntdc view https://comms.todoist.com/a/1585/ch/CbC8n2Kp4Qx6Rz9Lm3Va/t/CbT8n2Kp4Qx6Rz9Lm3Va # View thread\ntdc view https://comms.todoist.com/a/1585/ch/CbC8n2Kp4Qx6Rz9Lm3Va/t/CbT8n2Kp4Qx6Rz9Lm3Va/c/CbM8n2Kp4Qx6Rz9Lm3Va # View comment\ntdc view https://comms.todoist.com/a/1585/msg/CbV8n2Kp4Qx6Rz9Lm3Va # View conversation\ntdc view https://comms.todoist.com/a/1585/msg/CbV8n2Kp4Qx6Rz9Lm3Va/m/CbS8n2Kp4Qx6Rz9Lm3Va --json # View message as JSON\n```\n\n**Check inbox and respond:**\n```bash\ntdc inbox --unread --json\ntdc thread view <thread-ref> --unread\ntdc thread reply <thread-ref> \"Thanks, I'll look into this.\"\ntdc thread done <thread-ref> --yes\n```\n\n**Search and review:**\n```bash\ntdc mentions --since 2026-04-01 --all --json\ntdc search \"deployment\" --type threads --json\ntdc thread view <thread-id>\n```\n\n**Check DMs:**\n```bash\ntdc conversation unread --json\ntdc conversation list --kind group --json # find a group DM by participants/name\ntdc conversation view <conversation-id>\ntdc conversation with \"Alice Example\"\ntdc conversation reply <conversation-ref> \"Got it, thanks!\"\n```\n";
|
|
7
7
|
export declare const SKILL_FILE_CONTENT: string;
|
|
8
8
|
//# sourceMappingURL=content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,cAAc,CAAA;AAErC,eAAO,MAAM,iBAAiB,2TAC8R,CAAA;AAE5T,eAAO,MAAM,YAAY,UAAU,CAAA;AAEnC,eAAO,MAAM,aAAa,QAAQ,CAAA;AAElC,eAAO,MAAM,aAAa,QAAsB,CAAA;AAEhD,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/lib/skills/content.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,cAAc,CAAA;AAErC,eAAO,MAAM,iBAAiB,2TAC8R,CAAA;AAE5T,eAAO,MAAM,YAAY,UAAU,CAAA;AAEnC,eAAO,MAAM,aAAa,QAAQ,CAAA;AAElC,eAAO,MAAM,aAAa,QAAsB,CAAA;AAEhD,eAAO,MAAM,aAAa,i23BA2czB,CAAA;AAED,eAAO,MAAM,kBAAkB,QASd,CAAA"}
|
|
@@ -90,7 +90,7 @@ tdc thread view <ref> --raw # Show raw markdown
|
|
|
90
90
|
tdc thread create <channel-ref> "Title" "content" # Create a new thread
|
|
91
91
|
tdc thread create <channel-ref> "Title" "content" --json # Create and return as JSON
|
|
92
92
|
tdc thread create <channel-ref> "Title" "content" --json --full # Include all thread fields
|
|
93
|
-
tdc thread create <channel-ref> "Title" "content" --notify 123,
|
|
93
|
+
tdc thread create <channel-ref> "Title" "content" --notify 123,Cbzzm11ZeYZoJYD4a6rti # Notify user and/or group IDs
|
|
94
94
|
tdc thread create <channel-ref> "Title" "content" --unarchive # Land thread in author's Inbox (overrides default Comms auto-archive)
|
|
95
95
|
tdc thread create <channel-ref> "Title" "content" --no-unarchive # Force archive even when userSettings.unarchiveNewThreads=true
|
|
96
96
|
tdc thread create <channel-ref> "Title" "content" --dry-run # Preview without posting
|
|
@@ -109,7 +109,7 @@ tdc thread done <ref> --yes # Archive thread (mark done)
|
|
|
109
109
|
tdc thread done <ref> --yes --json # Archive and return status as JSON
|
|
110
110
|
tdc thread mark-read <ref> # Mark a thread read
|
|
111
111
|
tdc thread mark-read <ref> <ref> --yes # Mark multiple threads read
|
|
112
|
-
printf "
|
|
112
|
+
printf "id:CbT8n2Kp4Qx6Rz9Lm3Va\\nid:CbT9m4Qr7Vz2Nx8Lp5Sa\\n" | tdc thread mark-read --dry-run # Preview bulk mark-read from stdin
|
|
113
113
|
tdc thread mute <ref> # Mute thread for 60 minutes (default)
|
|
114
114
|
tdc thread mute <ref> --minutes 480 # Mute for custom duration
|
|
115
115
|
tdc thread mute <ref> --json # Mute and return { id, mutedUntil } as JSON
|
|
@@ -245,8 +245,8 @@ tdc channel update <ref> --description "Team discussions" --json --full # Update
|
|
|
245
245
|
tdc channel delete <channel-ref> --yes # Permanently delete a channel (requires --yes; usually admin-only)
|
|
246
246
|
tdc channel delete <ref> --dry-run # Preview deletion
|
|
247
247
|
tdc channel archive <channel-ref> # Archive a channel (no-op if already archived)
|
|
248
|
-
tdc channel unarchive id:<id> # Unarchive a channel (pass id
|
|
249
|
-
tdc channel threads <channel-ref> # List threads in a channel (fuzzy name, id:,
|
|
248
|
+
tdc channel unarchive id:<id> # Unarchive a channel (pass id: for archived channels)
|
|
249
|
+
tdc channel threads <channel-ref> # List threads in a channel (fuzzy name, id:, or URL)
|
|
250
250
|
tdc channel threads "general" --unread # Only unread threads
|
|
251
251
|
tdc channel threads <ref> --archive-filter all # Include archived threads (active|archived|all)
|
|
252
252
|
tdc channel threads <ref> --since 2026-01-01 # Filter by last-updated date (ISO)
|
|
@@ -407,9 +407,9 @@ Run without --dry-run to execute.
|
|
|
407
407
|
## Reference System
|
|
408
408
|
|
|
409
409
|
Commands accept flexible references:
|
|
410
|
-
- **
|
|
410
|
+
- **IDs**: \`id:<id>\` (or a bare ID when unambiguous). Workspace/user IDs are numeric; most Comms entity IDs are opaque strings.
|
|
411
411
|
- **Comms URLs**: Full \`https://comms.todoist.com/...\` URLs (parsed automatically)
|
|
412
|
-
- **Fuzzy names**: For workspaces/users - \`"My Workspace"\` or partial matches
|
|
412
|
+
- **Fuzzy names**: For workspaces/users/channels/groups - \`"My Workspace"\` or partial matches
|
|
413
413
|
|
|
414
414
|
## Piping Input
|
|
415
415
|
|
|
@@ -426,26 +426,26 @@ If no content argument is provided and no stdin is piped, the CLI opens \`$EDITO
|
|
|
426
426
|
\`tdc thread mark-read\` also accepts thread refs from stdin, one per line:
|
|
427
427
|
|
|
428
428
|
\`\`\`bash
|
|
429
|
-
printf "
|
|
429
|
+
printf "id:CbT8n2Kp4Qx6Rz9Lm3Va\\nid:CbT9m4Qr7Vz2Nx8Lp5Sa\\n" | tdc thread mark-read --yes
|
|
430
430
|
\`\`\`
|
|
431
431
|
|
|
432
432
|
## Common Workflows
|
|
433
433
|
|
|
434
434
|
**View by URL (auto-routes to the right command):**
|
|
435
435
|
\`\`\`bash
|
|
436
|
-
tdc view https://comms.todoist.com/1585/ch/
|
|
437
|
-
tdc view https://comms.todoist.com/a/1585/ch/
|
|
438
|
-
tdc view https://comms.todoist.com/a/1585/ch/
|
|
439
|
-
tdc view https://comms.todoist.com/a/1585/msg/
|
|
440
|
-
tdc view https://comms.todoist.com/a/1585/msg/
|
|
436
|
+
tdc view https://comms.todoist.com/1585/ch/CbC8n2Kp4Qx6Rz9Lm3Va/t/CbT8n2Kp4Qx6Rz9Lm3Va # View thread
|
|
437
|
+
tdc view https://comms.todoist.com/a/1585/ch/CbC8n2Kp4Qx6Rz9Lm3Va/t/CbT8n2Kp4Qx6Rz9Lm3Va # View thread
|
|
438
|
+
tdc view https://comms.todoist.com/a/1585/ch/CbC8n2Kp4Qx6Rz9Lm3Va/t/CbT8n2Kp4Qx6Rz9Lm3Va/c/CbM8n2Kp4Qx6Rz9Lm3Va # View comment
|
|
439
|
+
tdc view https://comms.todoist.com/a/1585/msg/CbV8n2Kp4Qx6Rz9Lm3Va # View conversation
|
|
440
|
+
tdc view https://comms.todoist.com/a/1585/msg/CbV8n2Kp4Qx6Rz9Lm3Va/m/CbS8n2Kp4Qx6Rz9Lm3Va --json # View message as JSON
|
|
441
441
|
\`\`\`
|
|
442
442
|
|
|
443
443
|
**Check inbox and respond:**
|
|
444
444
|
\`\`\`bash
|
|
445
445
|
tdc inbox --unread --json
|
|
446
|
-
tdc thread view <
|
|
447
|
-
tdc thread reply <
|
|
448
|
-
tdc thread done <
|
|
446
|
+
tdc thread view <thread-ref> --unread
|
|
447
|
+
tdc thread reply <thread-ref> "Thanks, I'll look into this."
|
|
448
|
+
tdc thread done <thread-ref> --yes
|
|
449
449
|
\`\`\`
|
|
450
450
|
|
|
451
451
|
**Search and review:**
|
|
@@ -461,7 +461,7 @@ tdc conversation unread --json
|
|
|
461
461
|
tdc conversation list --kind group --json # find a group DM by participants/name
|
|
462
462
|
tdc conversation view <conversation-id>
|
|
463
463
|
tdc conversation with "Alice Example"
|
|
464
|
-
tdc conversation reply <
|
|
464
|
+
tdc conversation reply <conversation-ref> "Got it, thanks!"
|
|
465
465
|
\`\`\`
|
|
466
466
|
`;
|
|
467
467
|
export const SKILL_FILE_CONTENT = `---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doist/comms-cli",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "TypeScript CLI for Comms",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@doist/cli-core": "0.26.0",
|
|
54
|
-
"@doist/comms-sdk": "0.
|
|
54
|
+
"@doist/comms-sdk": "0.11.0",
|
|
55
55
|
"@pnpm/tabtab": "0.5.4",
|
|
56
56
|
"chalk": "5.6.2",
|
|
57
57
|
"commander": "14.0.3",
|