/zenhub-cli

:octocat: Powerful ZenHub CLI via pure bash

Primary LanguageShell

zenhub-cli | Powerful ZenHub CLI via pure bash

version versioning branching license pm chat circleci

A simple, yet extremely flexible command line interface for ZenHub. Deep integration with jq allows for the ability to perform complex declarative/higher-order operations on responses, helping you perform complex piping/compositional operations with relative ease (see the integration tests for some simple examples).

Installation

# Install from tap:
$ brew tap rockymadden/rockymadden
$ brew install zenhub-cli

# Initialize with your ZenHub and GitHub tokens:
$ zenhub init
Enter ZenHub API token: <zenhub token>
Enter GitHub personal access token (used solely for project slug lookups): <github token>

PROTIPS:

Usage

$ zenhub --help
Usage:
  zenhub board <project> [--compact|-c] [--filter|-f <filter>] [--monochrome|-m]
  zenhub events <project> <issue> [--compact|-c] [--filter|-f <filter>] [--monochrome|-m]
  zenhub init [--compact|-c] [--filter|-f <filter>] [--github-token|-G <token>] [--monochrome|-m]
    [--zenhub-token|-Z <token>]
  zenhub issue <project> <issue> [--compact|-c] [--filter|-f <filter>] [--monochrome|-m]

Configuration Commands:
  init    Initialize

Core Commands:
  board     Project board pipelines plus the issues contained within each pipeline
  events    Project issue events, sorted by most recent
  issue     Project issue time estimate, pipeline, and +1s

PROTIPS:

  • Project slug represented as a combination of username and project name (e.g. rockymadden/zenhub-cli).
  • -- can be used as a placeholder for the current project, when inside a GitHub-based git repo.
  • Project placeholder is implicitly applied, when not provided and inside a GitHub-based git repo.
  • Filters are simply jq filters, you can provide any filter that it can handle.
  • All commands prompt for required arguments which were not provided via options or arguments. This allows for both traditional usage and prompt-based usage.

Examples and Recipes

board:

# Implicit project:
$ zenhub board

# Placeheld project:
$ zenhub board --

# Explicit project:
$ zenhub board rockymadden/zenhub-cli

# With filter:
$ zenhub board --filter='.pipelines | .[0] | .name'

events:

# Placeheld project and explicit issue:
$ zenhub events -- 1

# With filter:
$ zenhub events --filter='.[0] | .user_id'

issue:

# Placeheld project and explicit issue:
$ zenhub issue -- 1

# With filter:
$ zenhub issue --filter='.pipeline | .name'

License

The MIT License (MIT)

Copyright (c) 2016 Rocky Madden (https://rockymadden.com/)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.