Git Product home page Git Product logo

stream-cli's Introduction

Stream Cli

Stream CLI

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.

Coverage Status Version Dependency Status devDependency Status 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.0.1-beta.56 darwin-x64 node-v11.13.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 [email protected] or create a GitHub Issue.

stream-cli's People

Contributors

astrotars avatar link512 avatar tbarbugli avatar

Watchers

James Cloos avatar Amin Mahboubi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.