Stream's command line interface (CLI) makes it easy to create and manage your Stream Chat applications directly from the command line. The source code and full documentation can be found on GitHub.
The Stream CLI must be installed globally using yarn or npm. Yarn is preferred; however, npm is fully supported. Yarn can be installed on macOS using Homebrew with the
brew install yarn command and npm comes bundled with Node.js. We recommend running the latest version of Node.js when using the Stream CLI.
// yarn yarn global add getstream-cli // npm npm install -g getstream-cli
Once installed, the
stream command will be available globally within your command line. To get started with Stream, you must first initialize the CLI using the
stream config:set command. This will ask you a series of questions that are required for the CLI to work properly. Please see below for an example.
$ stream config:set ✔ What is your full name? · Nick Parsons ✔ What is your email address associated with Stream? · email@example.com ✔ What is your Stream API key? · 12345 ✔ What is your Stream API secret? · ************************************* ✔ What is your Stream API base URL? · https://chat-us-east-1.stream-io-api.com ✔ What environment would you like to run in? · production ✔ Would you like to enable error tracking for debugging purposes? · true Your Stream CLI configuration has been generated! 🚀
The CLI is fully self documented and can be found on GitHub. Further supported commands can be found within the CLI documentation.