@hesed/gchat
v0.4.0
Published
CLI for Google Chat API interaction
Readme
gchat
CLI for Google Chat API interaction
Install
sdkck plugins install @hesed/gchatUsage
$ npm install -g @hesed/gchat
$ gchat COMMAND
running command...
$ gchat (--version)
@hesed/gchat/0.4.0 linux-x64 node-v24.20.0
$ gchat --help [COMMAND]
USAGE
$ gchat COMMAND
...Commands
gchat gchat config add-token PROFILE SPACEID TOKENgchat gchat config add-user NAME USERIDgchat gchat config set-key PROFILE KEYgchat gchat create-message SPACEID MESSAGEgchat gchat reply-message THREADNAME MESSAGE
gchat gchat config add-token PROFILE SPACEID TOKEN
Add or update an API token for a Google Chat space within a profile
USAGE
$ gchat gchat config add-token PROFILE SPACEID TOKEN
ARGUMENTS
PROFILE Config profile name
SPACEID Google Chat space ID
TOKEN API token for this space
DESCRIPTION
Add or update an API token for a Google Chat space within a profile
EXAMPLES
$ gchat gchat config add-token default AAQAKA6hsFw your-space-tokenSee code: src/commands/gchat/config/add-token.ts
gchat gchat config add-user NAME USERID
Add or update a user in the users list for tagging messages
USAGE
$ gchat gchat config add-user NAME USERID
ARGUMENTS
NAME Display name of the user, used with --tag
USERID Google Chat user ID (e.g. users/123456789)
DESCRIPTION
Add or update a user in the users list for tagging messages
EXAMPLES
$ gchat gchat config add-user "Jane Doe" users/123456789012345678901
$ gchat gchat config add-user "Jane Doe" 123456789012345678901See code: src/commands/gchat/config/add-user.ts
gchat gchat config set-key PROFILE KEY
Set the Google Chat API key for a profile
USAGE
$ gchat gchat config set-key PROFILE KEY
ARGUMENTS
PROFILE Config profile name
KEY Google Chat API key
DESCRIPTION
Set the Google Chat API key for a profile
EXAMPLES
$ gchat gchat config set-key default your-api-key
$ gchat gchat config set-key work your-work-api-keySee code: src/commands/gchat/config/set-key.ts
gchat gchat create-message SPACEID MESSAGE
Send a message to a Google Chat space
USAGE
$ gchat gchat create-message SPACEID MESSAGE [-f] [-p <value>] [-t <value>...] [--toon]
ARGUMENTS
SPACEID Google Chat space ID
MESSAGE Message text to send
FLAGS
-f, --formatted Enable formatted text (bold, italic, links)
-p, --profile=<value> [default: default] Config profile to use
-t, --tag=<value>... User name or users/<id> to tag (repeatable)
--toon Format output as toon
DESCRIPTION
Send a message to a Google Chat space
EXAMPLES
$ gchat gchat create-message AAQAKA6hsFw "Hello team"
$ gchat gchat create-message AAQAKA6hsFw "Hello work" --profile work
$ gchat gchat create-message AAQAKA6hsFw "*Bold message*" --formatted
$ gchat gchat create-message AAQAKA6hsFw "<https://example.com|Click here>" -f
$ gchat gchat create-message AAQAKA6hsFw "Deploy failed" --tag "Jane Doe"See code: src/commands/gchat/create-message.ts
gchat gchat reply-message THREADNAME MESSAGE
Reply to a message thread in Google Chat
USAGE
$ gchat gchat reply-message THREADNAME MESSAGE [-f] [-p <value>] [-t <value>...] [--toon]
ARGUMENTS
THREADNAME Thread name (e.g. spaces/SPACE_ID/threads/THREAD_ID)
MESSAGE Message text to send
FLAGS
-f, --formatted Enable formatted text (bold, italic, links)
-p, --profile=<value> [default: default] Config profile to use
-t, --tag=<value>... User name or users/<id> to tag (repeatable)
--toon Format output as toon
DESCRIPTION
Reply to a message thread in Google Chat
EXAMPLES
$ gchat gchat reply-message spaces/AAQAKA6hsFw/threads/D1NI3W2B6vA "Reply here"
$ gchat gchat reply-message spaces/AAQAKA6hsFw/threads/D1NI3W2B6vA "Reply here" --profile work
$ gchat gchat reply-message spaces/AAQAKA6hsFw/threads/D1NI3W2B6vA "*Bold reply*" --formatted
$ gchat gchat reply-message spaces/AAQAKA6hsFw/threads/D1NI3W2B6vA "Check this" --tag "Jane Doe"See code: src/commands/gchat/reply-message.ts
