/backlog-cli

Backlog CLI: like gh

Primary LanguageGoMIT LicenseMIT

Backlog CLI

Backlog CLI: like gh

This project aims to provide a Backlog CLI that replicates the user experience of the official GitHub CLI.

Installation

Download the binary either by using the installation script or by directly downloading it from the Releases.

# if you want to install to /usr/local/bin
$ curl -sSfL https://raw.githubusercontent.com/shufo/backlog-cli/main/install.sh  | sudo sh -s - -b /usr/local/bin

# if you want to install to /usr/bin
$ curl -sSfL https://raw.githubusercontent.com/shufo/backlog-cli/main/install.sh  | sudo sh -s - -b /usr/bin

Authentication

You must first authenticate with the following command (Required to login to your organization)

$ backlog auth login

2023-03-19-14-46-29-resize

Troubleshoot

If you had an error like below. Please logout then login to your organization.

image

Usage

Issue operation

  • List Issues
$ backlog issue list
# filter isseu assigned to me
$ backlog issue list --me
# view issue list on web
$ backlog issue list --web
  • View Issue
$ backlog issue view 123
# view issut on web
$ backlog issue view 123 -w

2023-03-19-15-19-01-resize

  • Create a new Issue
$ backlog issue create

2023-03-19-14-56-35-resize

  • Edit Issue
$ backlog issue edit 123

2023-03-19-15-50-06-resize

  • View Relevant issues
$ backlog issue status
  • Comment to issue
$ backlog issue comment 32

Alias

  • Create a shortcut for a backlog command
$ backlog alias set iv 'issue view'
  • List aliases
$ backlog alias list
  • Delete an alias
$ backlog alias delete iv

2023-03-19-16-03-07-resize

Configuring backlog-cli

To configure project wide settings, put backlog.json in your repository root, backlog-cli will treat it as settings files.

{
  "backlog_domain": "backlog.com",
  "organization": "your_organization", // <your_organization>.backlog.com
  "project": "MYPROJECT" // your project key
}

TODO

  • Add command like gh issue comment

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Testing

$ go test -v ./...

Development

$ GO111MODULE=off go get github.com/oxequa/realize
$ realize start
$ ./app <option> <args>

LICENSE

MIT