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.
The generated CLI documentation is available here - you can learn about all of the available commands there.
The Stream CLI is written in Go and precompiled into a single binary. It doesnβt have any prerequisites.
You can find the binaries in the Release section of the repository. We also wrote a short script to download them and put it to your $PATH.
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/GetStream/stream-cli/master/install/install.sh)"
$ Invoke-WebRequest -Uri "https://raw.githubusercontent.com/GetStream/stream-cli/master/install/install.ps1" -OutFile "install.ps1"; powershell.exe -ExecutionPolicy Bypass -File ./install.ps1
For MacOS users, itβs also available via Homebrew:
$ brew tap GetStream/stream-cli https://github.com/GetStream/stream-cli
$ brew install stream-cli
$ git clone git@github.com:GetStream/stream-cli.git
$ cd stream-cli
$ go build ./cmd/stream-cli
$ ./stream-cli --version
stream-cli version 1.0.0
In order to initialize the CLI, itβs as simple as:
Note: Your API key and secret can be found on the Stream Dashboard and is specific to your application.
A couple of example use cases can be found here. Weβve also created a separate documentation for the import feature.
We purposefully chose the executable name stream-cli
to avoid conflict with another tool called imagemagick
which already has a stream
executable.
If you do not have imagemagick
installed, it might be more comfortable to rename stream-cli
to stream
. Alternatively you can set up a symbolic link:
$ ln -s ~/Downloads/stream-cli /usr/local/bin/stream
$ stream --version
stream-cli version 1.0.0
Basic commands use the following syntax:
$ stream-cli [chat|feeds] [command] [args] [options]
Example:
$ stream-cli chat get-channel -t messaging -i redteam
The --help
keyword is available every step of the way. Examples:
$ stream-cli --help
$ stream-cli chat --help
$ stream-cli chat get-channel --help
We provide autocompletion for the most popular shells (PowerShell, Bash, ZSH, Fish).
$ stream-cli completion --help
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 tracked in the Release page of the repository.