getstream-cli
Advanced tools
Comparing version 0.0.1-beta.1 to 0.0.1-beta.4
{ | ||
"name": "getstream-cli", | ||
"description": "The Stream Command Line Interface (CLI) makes it easy to create and manage your Stream apps directly from the terminal.", | ||
"version": "0.0.1-beta.1", | ||
"version": "0.0.1-beta.4", | ||
"author": "Nick Parsons <nparsons08@gmail.com>", | ||
@@ -16,11 +16,4 @@ "bin": { | ||
"prepack": "yarn build", | ||
"test": "nyc mocha --forbid-only \"test/**/*.test.js\"", | ||
"contributors:add": "all-contributors add", | ||
"contributors:generate": "all-contributors generate" | ||
"test": "nyc mocha --forbid-only \"test/**/*.test.js\"" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "bump --prerelease --preid beta" | ||
} | ||
}, | ||
"dependencies": { | ||
@@ -57,3 +50,2 @@ "@oclif/command": "^1", | ||
"@oclif/test": "^1", | ||
"all-contributors-cli": "^6.1.1", | ||
"babel-eslint": "^10.0.1", | ||
@@ -66,3 +58,2 @@ "babel-plugin-istanbul": "^5.1.0", | ||
"globby": "^9", | ||
"husky": "^1.3.1", | ||
"mocha": "^5.2.0", | ||
@@ -103,2 +94,2 @@ "nyc": "^13", | ||
} | ||
} | ||
} |
307
README.md
@@ -7,6 +7,5 @@ ![Stream Cli](https://i.imgur.com/H8AScTq.png) | ||
[![Version](https://img.shields.io/npm/v/stream-cli.svg)](https://npmjs.org/package/getstream-cli) | ||
[![Version](https://img.shields.io/npm/v/getstream-cli.svg)](https://npmjs.org/package/getstream-cli) | ||
[![Dependency Status](https://david-dm.org/getstream/stream-cli/status.svg)](https://david-dm.org/getstream/stream-cli) | ||
[![devDependency Status](https://david-dm.org/getstream/stream-cli/dev-status.svg)](https://david-dm.org/getstream/stream-cli?type=dev) | ||
[![Downloads/week](https://img.shields.io/npm/dw/getstream-cli.svg)](https://npmjs.org/package/getstream-cli) | ||
[![License](https://img.shields.io/npm/l/stream-cli.svg)](https://github.com/getstream/stream-cli/blob/master/package.json) | ||
@@ -24,6 +23,16 @@ | ||
# 📚 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](https://github.com/getstream/stream/blob/master/CHANGELOG.md). | ||
# 🏗 Installation | ||
The Stream CLI is easy to install. You have the option to download a single binary (preferred) with zero run-time dependencies for your OS of choice, or install it using [NPM](https://www.npmjs.com/package/getstream-cli). | ||
The Stream CLI is easy to install. You have the option to use [homebrew](https://brew.sh) (preferred) if you're on macOS, download a single binary with zero run-time dependencies for your OS of choice, or install the CLI using [NPM](https://www.npmjs.com/package/getstream-cli). | ||
### Homebrew (macOS only) | ||
```sh-session | ||
$ brew install stream-cli | ||
``` | ||
### Binaries | ||
@@ -35,2 +44,4 @@ | ||
> Note: Binaries are generally updated less frequently than Homebrew and NPM sources. | ||
### NPM | ||
@@ -67,32 +78,264 @@ | ||
- stream autocomplete | ||
- stream commands | ||
- stream help | ||
- stream config | ||
- set | ||
- get | ||
- destroy | ||
- stream channel | ||
- edit | ||
- get | ||
- init | ||
- list | ||
- query | ||
- stream message | ||
- send | ||
- remove | ||
- stream moderate | ||
- ban | ||
- flag | ||
- mute | ||
- stream user | ||
- add | ||
- ban | ||
- remove | ||
- [stream autocomplete](#stream-autocomplete) | ||
- [stream commands](#stream-commands) | ||
- [stream help](#) | ||
- [stream config](#) | ||
- [set](#) | ||
- [get](#) | ||
- [destroy](#) | ||
- [stream channel](#) | ||
- [edit](#) | ||
- [get](#) | ||
- [init](#) | ||
- [list](#) | ||
- [query](#) | ||
- [stream message](#) | ||
- [send](#) | ||
- [remove](#) | ||
- [stream moderate](#) | ||
- [ban](#) | ||
- [flag](#) | ||
- [mute](#) | ||
- [stream user](#) | ||
- [add](#) | ||
- [remove](#) | ||
# 🤓 Contributors | ||
## `$ stream autocomplete` | ||
<!-- ALL-CONTRIBUTORS-LIST:START --> | ||
<!-- prettier-ignore --> | ||
<table><tr><td align="center"><a href="https://nickparsons.io"><img src="https://avatars2.githubusercontent.com/u/1328388?v=4" width="50px;" alt="Nick Parsons"/><br /><sub><b>Nick Parsons</b></sub></a><br /><a href="https://github.com/GetStream/stream-cli/commits?author=nparsons08" title="Documentation">📖</a></td><td align="center"><a href="http://www.mellowmorning.com"><img src="https://avatars2.githubusercontent.com/u/265409?v=4" width="50px;" alt="Thierry Schellenbach"/><br /><sub><b>Thierry Schellenbach</b></sub></a><br /><a href="https://github.com/GetStream/stream-cli/commits?author=tschellenbach" title="Documentation">📖</a></td><td align="center"><a href="https://github.com/tbarbugli"><img src="https://avatars3.githubusercontent.com/u/88735?v=4" width="50px;" alt="Tommaso Barbugli"/><br /><sub><b>Tommaso Barbugli</b></sub></a><br /><a href="https://github.com/GetStream/stream-cli/commits?author=tbarbugli" title="Documentation">📖</a></td></tr></table> | ||
<!-- ALL-CONTRIBUTORS-LIST:END --> | ||
Initialize autocomplete for the CLI. **(recommended)** | ||
```sh-session | ||
$ stream autocomplete | ||
``` | ||
## `$ stream commands` | ||
Display all commands. | ||
```sh-session | ||
$ stream commands | ||
``` | ||
## `$ stream help` | ||
Get help with the CLI. | ||
```sh-session | ||
$ stream help | ||
``` | ||
## `$ stream config` | ||
Initialize, retrieve, and destroy configuration settings (for the CLI) | ||
```sh-session | ||
Manages the configuration file for Stream CLI | ||
USAGE | ||
$ stream config:COMMAND | ||
COMMANDS | ||
config:destroy Destroy config | ||
config:get Get config | ||
config:set Initialize the config with your Stream API key and secret | ||
``` | ||
## `$ stream config:set` | ||
Initialize a new configuration file. | ||
```sh-session | ||
USAGE | ||
$ stream config:set | ||
``` | ||
## `$ stream config:get` | ||
Retrieve your configuration settings. | ||
```sh-session | ||
USAGE | ||
$ stream config:get | ||
``` | ||
## `$ stream config:destroy` | ||
Destroy your configuration file | ||
```sh-session | ||
USAGE | ||
$ stream config:destroy | ||
``` | ||
> Note: The command `stream config:set` must be called to re-initialize the configuration. | ||
## `$ stream channel:edit` | ||
Edit a specified channel | ||
```sh-session | ||
USAGE | ||
$ stream channel:edit | ||
OPTIONS | ||
-d, --data=data Additional data as a JSON payload. | ||
-i, --id=id (required) Channel ID. | ||
-m, --members=members Comma separated list of members. | ||
-n, --name=name (required) Name of room. | ||
-r, --reason=reason (required) Reason for changing channel. | ||
-t, --type=livestream|messaging|gaming|commerce|team (required) Type of channel. | ||
-u, --url=url URL to channel image. | ||
``` | ||
## `$ stream channel:get` | ||
Get a specified channel | ||
```sh-session | ||
USAGE | ||
$ stream channel:get | ||
OPTIONS | ||
-i, --id=id (required) Channel ID. | ||
-t, --type=livestream|messaging|gaming|commerce|team (required) Type of channel. | ||
``` | ||
## `$ stream channel:init` | ||
Initialize a new channel | ||
```sh-session | ||
USAGE | ||
$ stream channel:init | ||
OPTIONS | ||
-d, --data=data Additional data as a JSON payload. | ||
-i, --id=id (required) [default: <UUID>] Channel ID. | ||
-m, --members=members Comma separated list of members. | ||
-n, --name=name (required) Name of room. | ||
-t, --type=livestream|messaging|gaming|commerce|team (required) Type of channel. | ||
-u, --image=image URL to channel image. | ||
``` | ||
## `$ stream channel:list` | ||
List all channels associated with your account | ||
```sh-session | ||
USAGE | ||
$ stream channel:list | ||
``` | ||
## `$ stream channel:query` | ||
Query for channels | ||
```sh-session | ||
USAGE | ||
$ stream channel:query | ||
OPTIONS | ||
-f, --filter=filter Filters to apply. | ||
-i, --id=id [default: <UUID>] Channel ID. | ||
-s, --sort=sort Sort to apply. | ||
-t, --type=livestream|messaging|gaming|commerce|team Type of channel. | ||
``` | ||
## `$ stream message:send` | ||
Send a message to a specific channel | ||
```sh-session | ||
USAGE | ||
$ stream message:send | ||
OPTIONS | ||
-a, --attachments=attachments JSON payload of attachments | ||
-i, --id=id [default: <UUID>] Channel ID. | ||
-m, --message=message (required) Message to send. | ||
-t, --type=livestream|messaging|gaming|commerce|team (required) Type of channel. | ||
-u, --user=user (required) [default: *] ID of user. | ||
``` | ||
## `$ stream message:remove` | ||
Remove a message from a channel | ||
```sh-session | ||
USAGE | ||
$ stream message:remove | ||
OPTIONS | ||
-i, --id=id (required) Channel ID. | ||
``` | ||
## `$ stream moderate:ban` | ||
Ban a user from a channel forever or based on a per minute timeout | ||
```sh-session | ||
USAGE | ||
$ stream moderate:ban | ||
OPTIONS | ||
-r, --reason=reason (required) Reason for timeout. | ||
-t, --timeout=timeout (required) [default: 60] Timeout in minutes. | ||
-u, --user=user (required) ID of user. | ||
``` | ||
## `$ stream moderate:flag` | ||
Flag users and messages for inappropriate behavior or explicit content | ||
```sh-session | ||
USAGE | ||
$ stream moderate:flag | ||
OPTIONS | ||
-m, --message=message ID of message. | ||
-u, --user=user ID of user. | ||
``` | ||
## `$ stream moderate:mute` | ||
Mute a user in a channel | ||
```sh-session | ||
USAGE | ||
$ stream moderate:mute | ||
OPTIONS | ||
-u, --user=user (required) User ID. | ||
``` | ||
## `$ stream user:add` | ||
Add a user to a channel and specify permissions | ||
```sh-session | ||
USAGE | ||
$ stream user:add | ||
OPTIONS | ||
-i, --id=id (required) Channel name. | ||
-m, --moderators=moderators (required) Comma separated list of moderators to add. | ||
-t, --type=type (required) Channel type. | ||
``` | ||
## `$ stream user:remove` | ||
Remove a user from a channel | ||
```sh-session | ||
USAGE | ||
$ stream user:remove | ||
OPTIONS | ||
-i, --id=id (required) Channel name. | ||
-m, --moderators=moderators (required) Comma separated list of moderators to remove. | ||
-t, --type=type (required) Channel type. | ||
``` | ||
# 📣 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](https://github.com/getstream/stream-cli/issues). |
@@ -89,2 +89,2 @@ import { Command, flags } from '@oclif/command'; | ||
ChannelEdit.description = 'Edit a channel.'; | ||
ChannelEdit.description = 'Edit a channel'; |
@@ -130,2 +130,2 @@ import { Command, flags } from '@oclif/command'; | ||
ChannelGet.description = 'Get a channel.'; | ||
ChannelGet.description = 'Get a channel'; |
@@ -81,2 +81,2 @@ import { Command, flags } from '@oclif/command'; | ||
ChannelInit.description = 'Initialize a channel.'; | ||
ChannelInit.description = 'Initialize a channel'; |
@@ -56,2 +56,2 @@ import { Command } from '@oclif/command'; | ||
ChannelList.description = 'List all channels.'; | ||
ChannelList.description = 'List all channels'; |
@@ -59,2 +59,2 @@ import { Command, flags } from '@oclif/command'; | ||
ChannelQuery.description = 'Query a specific channel.'; | ||
ChannelQuery.description = 'Query a channel'; |
@@ -26,2 +26,2 @@ import { Command } from '@oclif/command'; | ||
ConfigDestroy.description = 'Destroys CLI config settings.'; | ||
ConfigDestroy.description = 'Destroy config'; |
@@ -39,2 +39,2 @@ import { Command } from '@oclif/command'; | ||
ConfigGet.description = 'Retrieves API config credentials for CLI.'; | ||
ConfigGet.description = 'Get config'; |
@@ -63,2 +63,3 @@ import { Command } from '@oclif/command'; | ||
ConfigSet.description = 'Stores your Stream API key and secret.'; | ||
ConfigSet.description = | ||
'Initialize the config with your Stream API key and secret'; |
@@ -5,3 +5,2 @@ import { Command, flags } from '@oclif/command'; | ||
import path from 'path'; | ||
import uuid from 'uuid'; | ||
@@ -15,4 +14,3 @@ import { auth } from '../../utils/auth'; | ||
description: chalk.blue.bold('Channel ID.'), | ||
default: uuid(), | ||
required: false, | ||
required: true, | ||
}), | ||
@@ -19,0 +17,0 @@ }; |
@@ -5,3 +5,2 @@ import { Command, flags } from '@oclif/command'; | ||
import path from 'path'; | ||
import uuid from 'uuid'; | ||
@@ -15,3 +14,2 @@ import { auth } from '../../utils/auth'; | ||
description: chalk.blue.bold('Channel name.'), | ||
default: uuid(), | ||
required: true, | ||
@@ -18,0 +16,0 @@ }), |
@@ -5,3 +5,2 @@ import { Command, flags } from '@oclif/command'; | ||
import path from 'path'; | ||
import uuid from 'uuid'; | ||
@@ -15,3 +14,2 @@ import { auth } from '../../utils/auth'; | ||
description: chalk.blue.bold('Channel name.'), | ||
default: uuid(), | ||
required: true, | ||
@@ -18,0 +16,0 @@ }), |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44389
19
338
982