@statocysts/cli
v0.9.1
Published
CLI for statocysts notification library
Maintainers
Readme
@statocysts/cli
Command-line interface for statocysts notification library.
Installation
npm install -g @statocysts/cli
# or
pnpm add -g @statocysts/cliUsage
stato -u <url> [-m <message> | -f <file>]Options
| Option | Alias | Description |
| ----------- | ----- | ------------------------------------------------------------- |
| --url | -u | Notification service URL(s). Can be specified multiple times. |
| --message | -m | Message content to send directly. |
| --file | -f | Read message content from a file. |
| --help | | Show help information. |
| --version | | Show version number. |
Message Priority
The message content is determined in the following order:
--messageargument (highest priority)--fileargument- Standard input (stdin)
Examples
Send to a single URL
stato -u "slack://webhook/xxx/yyy/zzz" -m "Hello World"Send to multiple URLs
stato -u "slack://webhook/xxx/yyy/zzz" -u "json://example.com/api/notify" -m "Hello World"Read message from file
stato -u "slack://webhook/xxx/yyy/zzz" -f message.txtRead message from stdin
echo "Hello World" | stato -u "slack://webhook/xxx/yyy/zzz"Use with pipeline
cat deployment.log | stato -u "slack://webhook/xxx/yyy/zzz"Supported Services
This CLI supports all notification services provided by statocysts:
- Slack:
slack://webhook/xxx/yyy/zzzorslack://bot@channel:token - JSON:
json://example.com/api/endpoint
For more details on URL formats, please refer to the statocysts documentation.
License
MIT
