Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
getstream-cli
Advanced tools
The Stream Command Line Interface (CLI) makes it easy to create and manage your Stream apps directly from the terminal.
Note: The Stream CLI is currently in beta and may contain bugs. This should not be used against a production environment at this time. To report bugs, please follow the instructions below. Thank you for your support!
Stream's Command Line Interface (CLI) makes it easy to create and manage your Stream apps directly from the terminal. Currently, only Chat is supported; however, the ability to manage Feeds will be coming soon.
If you're experiencing problems directly related to the CLI, please add an issue on GitHub.
For other issues, submit a support ticket.
As with any project, things are always changing. If you're interested in seeing what's changed in the Stream CLI, the changelog for this project can be found here.
The Stream CLI is easy to install. You have the option to use homebrew (preferred) if you're on macOS, download a single binary for your OS of choice, or download via npm.
$ brew install stream
$ npm install -g getstream-cli
Note: Binaries are generally updated less frequently than Homebrew.
In order to initialize the CLI, please have your Stream API key and secret ready. Run the following command:
$ stream config:set
You will then be prompted to enter your API key and secret.
$ ? What's your API key? 🔒
$ ? What's your API secret? 🔒
Now, you're good to go!
$ Your config has been generated! 🚀
Note: Your API key and secret can be found on the Stream Dashboard and is specific to your application.
Basic commands use the following syntax:
$ stream command:COMMAND --arg1 "foo" --arg2 "bar"
Whereas commands for specific products use subcommands:
$ stream command:COMMAND:SUBCOMMAND --arg1 "foo" --arg2 "bar"
$ stream chat:channel
$ stream chat:message
$ stream chat:moderate
$ stream chat:user
$ stream autocomplete
Initialize autocomplete for the CLI (recommended)
$ stream autocomplete
$ stream commands
Display all commands
$ stream commands
$ stream help
Get help with the CLI
$ stream help
$ stream config:set
Initialize a new configuration file.
USAGE
$ stream config:set
OPTIONS
-k, --key=key API key for config.
-s, --secret=secret API secret for config.
$ stream config:get
Retrieve your configuration settings.
USAGE
$ stream config:get
$ stream config:destroy
Destroy your configuration file.
USAGE
$ stream config:destroy
OPTIONS
-f, --force=force Force remove config.
Note: The command
stream config:set
must be called to re-initialize the configuration.
$ stream chat:channel:edit
Edit a specific channel.
USAGE
$ stream chat:channel:edit
OPTIONS
-d, --data=data Additional data as JSON.
-i, --id=id (required) The ID of the channel you wish to edit.
-m, --members=members Comma separated list of members.
-n, --name=name (required) Name of the channel room.
-r, --reason=reason (required) Reason for changing channel.
-t, --type=livestream|messaging|gaming|commerce|team (required) Type of channel.
-u, --url=url URL to the channel image. URL to channel image.
$ stream chat:channel:get
Get a specific channel by ID.
USAGE
$ stream chat:channel:get
OPTIONS
-i, --id=id (required) The channel ID you wish to get.
-t, --type=livestream|messaging|gaming|commerce|team (required) Type of channel.
$ stream chat:channel:init
Create a new channel.
USAGE
$ stream chat:channel:init
OPTIONS
-d, --data=data Additional data as a JSON.
-i, --id=id (required) [default: <UUID>] A unique ID for the channel you wish to create.
-m, --members=members Comma separated list of members to add to the channel.
-n, --name=name (required) Name of the channel room.
-t, --type=livestream|messaging|gaming|commerce|team (required) Type of channel.
-u, --image=image URL to channel image.
$ stream chat:channel:list
List all channels associated with your config credentials.
USAGE
$ stream chat:channel:list
$ stream chat:channel:query
Query a channel.
USAGE
$ stream chat:channel:query
OPTIONS
-f, --filter=filter Filters to apply to the query.
-i, --id=id (required) The channel ID you wish to query.
-s, --sort=sort Sort to apply to the query.
-t, --type=livestream|messaging|gaming|commerce|team Type of channel.
$ stream chat:message:send
Send messages to a channel.
USAGE
$ stream chat:message:send
OPTIONS
-a, --attachments=attachments A JSON payload of attachments to send with the message.
-i, --id=id The channel ID that you would like to send a message to.
-m, --message=message (required) The message you would like to send as plaintext.
-t, --type=livestream|messaging|gaming|commerce|team (required) The type of channel.
-u, --user=user (required) [default: *] The ID of the acting user sending the message.
$ stream chat:message:remove
Remove messages from a channel.
USAGE
$ stream chat:message:remove
OPTIONS
-i, --id=id (required) The channel ID that you would like to remove.
$ stream chat:moderate:ban
Ban users from a channel indefinitely or based on a per minute timeout.
USAGE
$ stream chat:moderate:ban
OPTIONS
-r, --reason=reason (required) A reason for adding a timeout.
-t, --timeout=timeout (required) [default: 60] Duration of timeout in minutes.
-u, --user=user (required) The ID of the offending user.
$ stream chat:moderate:flag
Flag users and messages within a channel.
USAGE
$ stream chat:moderate:flag
OPTIONS
-m, --message=message The ID of the message you want to flag.
-u, --user=user The ID of the offending user.
$ stream chat:moderate:mute
Mute users within a channel.
USAGE
$ stream chat:moderate:mute
OPTIONS
-u, --user=user (required) The ID of the offending user.
$ stream chat:user:add
Add a user to a channel.
USAGE
$ stream chat:user:add
OPTIONS
-i, --id=id (required) Channel name.
-m, --moderators=moderators (required) Comma separated list of moderators to add.
-t, --type=type (required) Channel type.
$ stream chat:user:remove
Remove a user from a channel.
USAGE
$ stream chat:user:remove
OPTIONS
-i, --id=id (required) Channel name.
-m, --moderators=moderators (required) Comma separated list of moderators to remove.
-t, --type=type (required) Channel type.
If you have any suggestions or just want to let us know what you think of the Stream CLI, please send us a message at support@getstream.io or create a GitHub Issue.
FAQs
Configure & manage Stream applications from the command line. 🚀
The npm package getstream-cli receives a total of 33 weekly downloads. As such, getstream-cli popularity was classified as not popular.
We found that getstream-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.