Access Teamwork messaging features using the official CLI tool. Read conversations, messages, users, and networks; send text or file messages to DMs and groups. Requires the API URL and API token.
Interact with the Teamwork messaging platform using its built-in Node.js CLI tool. This provides a simpler abstraction over the REST API without needing to handle curl payloads, tokens, or URL encoding.
The CLI relies on stateless authentication via environment variables.
| Variable | Description |
|---|---|
TEAMWORK_API_URL | Base URL of the Teamwork backend (e.g. https://teamwork.example.com) |
TEAMWORK_API_TOKEN | Your Teamwork API auth token |
Ensure the teamwork CLI command is available. This package bundles the command through index.js.
The teamwork CLI handles commands in logical categories: , , , and .
authnetworkuserchatView Current User Details
Check the status of your current authenticated user. This displays your username, tbId (your sender ID), permission level, and displayName.
teamwork auth status
Example Output:
┌──────────────────┬────────┬──────────────┬─────────────┐
│ username │ tbId │ permission │ displayName │
├──────────────────┼────────┼──────────────┼─────────────┤
│ [email protected] │ 1001 │ 2 │ Me │
└──────────────────┴────────┴──────────────┴─────────────┘
List Networks View available networks that your account has access to.
teamwork network list
Example Output:
┌─────────────┬──────────────────────────┐
│ networkId │ name │
├─────────────┼──────────────────────────┤
│ 100 │ Test Message Network │
└─────────────┴──────────────────────────┘
List Users View all chatable users from the network.
teamwork user list
Example Output:
┌───────────────────────────┬────────┬──────────────┬───────────────────┐
│ username │ tbId │ permission │ displayName │
├───────────────────────────┼────────┼──────────────┼───────────────────┤
│ [email protected] │ 90000 │ 2 │ Demo User 90000 │
└───────────────────────────┴────────┴──────────────┴───────────────────┘
View Inbox Fetch recent conversations for the current user including unread message counts. You can optionally specify the number of conversations to fetch.
teamwork chat inbox [size]
[size]: (Optional) The number of conversations to fetch. Defaults to 20.Example Output:
┌─────────────────┬────────┬────────────────────┬───────────┐
│ ID │ Type │ Last Message │ Unread │
├─────────────────┼────────┼────────────────────┼───────────┤
│ 1101 │ User │ Hello cool!!!!! │ 0 │
└─────────────────┴────────┴────────────────────┴───────────┘
Load Chat History Load message history of a specific conversation (user or group).
<type> must be user or group.<conversation-id> is the tbId of the target user/group.[last-msg-id] is an optional ID of the last message to load older messages from.teamwork chat history <type> <conversation-id> [last-msg-id]
Example: teamwork chat history user 1101
Example Output:
┌─────────┬──────────────┬─────────────┬─────────────────┐
│ Msg ID │ Sender │ Time │ Content │
├─────────┼──────────────┼─────────────┼─────────────────┤
│ 1000 │ 1101 │ 10:00 AM │ Hello cool!!!!! │
└─────────┴──────────────┴─────────────┴─────────────────┘
Send a Text Message Send a text message to a user or group.
teamwork chat send <type> <receiver-id> "Your message here"
Example: teamwork chat send user 1101 "Hello world!"
Send a File or Image Upload and send a document or image to a user or group seamlessly.
teamwork chat send-file <type> <receiver-id> <file-path>
Example: teamwork chat send-file group 2025 ./report.pdf