https://github.com/taylorfinnell/genie-cli
Netflix Genie CLI
https://github.com/taylorfinnell/genie-cli
cli crystal genie netflix-genie
Last synced: 24 days ago
JSON representation
Netflix Genie CLI
- Host: GitHub
- URL: https://github.com/taylorfinnell/genie-cli
- Owner: taylorfinnell
- License: mit
- Created: 2017-05-04T23:47:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-26T16:36:35.000Z (almost 8 years ago)
- Last Synced: 2025-09-13T19:46:25.193Z (6 months ago)
- Topics: cli, crystal, genie, netflix-genie
- Language: Crystal
- Size: 721 KB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# genie-cli
[](https://circleci.com/gh/taylorfinnell/genie-cli)
Small CLI for Netflix's Genie.
## Installation
##### From GitHub
1) Install Crystal
`brew install crystal-lang`
1) Download a release from the Github Releases.
1) Add binary to PATH and make it executable
##### From Source
1) Install Crystal
`brew install crystal-lang`
1) Clone repository
1) `crystal build src/genie.cr --release`
1) Download a release from the Github Releases.
1) Add binary to PATH and make it executable
##### From Install Script
1) Install Crystal
`brew install crystal-lang`
1) `curl https://raw.githubusercontent.com/taylorfinnell/genie-cli/master/install | bash -s`
## Configuration
By default the CLI looks for configuration at `~/.genie.yml`. Optionally, each
command can specify an alternate configuration via a `--env` or `-e` flag.
For example:
`genie ls -e prod`
Would look for `~/.genie.prod.yml`
The configuration file looks like the following.
```
host: genie-host-url:7000
credentials:
username: tfinnell
password: password
```
Credentials are only required if you have Basic auth enabled.
## Optional Configuration
You may set a `printer` key to either `tabbed` or `table` to set the default
output type.
```
printer: tabbed
```
You may set the default output columns.
```
columns:
- id
- status
- name
```
You may choose to truncate the job name after a certain number of characters.
```
name_length: 25
```
## Usage
**List Genie Jobs**
```
genie ls
```
You may show job progress with the `-p` flag. You may also limit the results with the `-l` flag.
```
genie ls -l 5 -p
```
**Search for a Job**
```
genie search %some-name%
```
You may show job progress with the `-p` flag. You may also limit the results with the `-l` flag.
```
genie search %jim% -l 5 -p
```
**Get Job Status**
```
genie status
```
You may show job progress with the `-p` flag. You may also limit the results with the `-l` flag.
```
genie status -l 5 -p
```
**Open Job Output**
```
genie open
```
**Kill a Job**
```
genie kill
```
## More examples
**Tabbed Output**
You may specify the output format with a `--printer` flag. Currently only
`table` and `tabbed` are valid printer values. Tabbed output is useful for
piping.
`genie search %job% --printer tabbed | cut -d$'\t' -f 1 | tail +2 | xargs genie kill`
**Showing only certain columns in output**
You may choose to only show certain columns in the output via a `--columns`
flag.
`genie ls --columns id --columns name`
**Hide Headers**
You may choose to hide the headers with the `-h` flag.
`genie search %Matched% --c id --printer tabbed -h | xargs genie kill`