Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

getstream-cli

Package Overview
Dependencies
Maintainers
4
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

getstream-cli

Configure & manage Stream applications from the command line. 🚀

  • 0.2.4
  • npm
  • Socket score

Version published
Weekly downloads
32
increased by14.29%
Maintainers
4
Weekly downloads
 
Created
Source

Stream Cli

Stream CLI

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.

Note: The latest version of Node (v14.x) is required for this CLI. If you are looking for a way to manage multiple Node.js environments, please look at nvm.

Coverage Status Version License

🗒 Issues

If you're experiencing problems directly related to the CLI, please add an issue on GitHub.

For other issues, submit a support ticket.

📚 Changelog

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.

🏗 Installation

The Stream CLI is easy to install and available via npm. The CLI requires Node v10.x or above.

$ yarn global add getstream-cli

OR

$ npm install -g getstream-cli

🚀 Getting Started

In order to initialize the CLI, it's as simple as:

Stream

Note: Your API key and secret can be found on the Stream Dashboard and is specific to your organization.

🔨 Syntax

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"

🎩 Fun Facts

Interested in using the calling the CLI from a script? Or maybe you simply want raw response data? You can do that! Many of the commands accept a json argument as a boolean. Just pass the following along to the CLI and you'll get back a full representation of the response (in a raw data format):

$ stream command:COMMAND --arg1 "foo" --arg2 "bar" --json

Need to copy the output to your clipboard? Not a problem. Just pipe the information to pbcopy (on macOS) along with the --json flag:

$ stream debug:token --token "foo.bar.baz" --json | pbcopy

Want to call the Stream CLI using a bash command? No problem! Make sense of output using jq, a lightweight and flexible command-line JSON processor.

#! /bin/bash

run=$(stream config:get --json)

name=$(jq --raw-output '.name' <<< "${run}")
email=$(jq --raw-output '.email' <<< "${run}")
apiKey=$(jq --raw-output '.apiKey' <<< "${run}")
apiSecret=$(jq --raw-output '.apiSecret' <<< "${run}")

echo $name
echo $email
echo $apiKey
echo $apiSecret

OR

#! /bin/bash

stream chat:channel:create --channel=$(openssl rand -hex 12) --type="messaging" --name="CLI" --json | jq '.'

Note: See here for additional examples!

🥳‍ Usage

$ npm install -g getstream-cli
$ stream COMMAND
running command...
$ stream (-v|--version|version)
getstream-cli/0.2.4 linux-x64 node-v14.10.0
$ stream --help [COMMAND]
USAGE
  $ stream COMMAND
...

💻 Commands

Command Topics

📣 Feedback

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.

🔧 Development

This project contains generated code and documentation. In order to apply changes you should run the following command:

$ yarn run generate

Keywords

FAQs

Package last updated on 21 Apr 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc