Stream Announces $38 Million Series B Funding Learn More →

Stream CLI Quickstart

LAST EDIT Feb 16 2021

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.

Installation

Copied!

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.

1
2
3
4
5
// yarn 
yarn global add getstream-cli 
 
// npm 
npm install -g getstream-cli

Initialization

Copied!

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.

1
2
3
4
5
6
7
8
9
10
11
$ stream config:set 
 
✔ What is your full name? · Nick Parsons 
✔ What is your email address associated with Stream? · nick@getstream.io 
✔ 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! 🚀

Documentation

Copied!

The CLI is fully self documented and can be found on GitHub. Further supported commands can be found within the CLI documentation.