Skip to content

64kramsystem/geet

Repository files navigation

Build Status

Geet

Command line interface for performing GitHub operations.

In the past, Geet supported multiple providers, including GitLab; it was originally conceived as a provider-independent version of Hub and Lab.

Development status/plan

Everything is tracked in detail via issues and milestones.

Supported operations

  • create label, gist, issue, milestone, PR, repository, repository fork
  • list issues, labels, milestones, PRs
  • merge PR, comment PR
  • open repository

Samples

Prerequisite(s)

Geet requires the API token environment variable to be set, eg:

export GH_TOKEN=0123456789abcdef0123456789abcdef

All the commands need to be run from the git repository.

Create a repository or fork

Create a repository and select its visibility interactively:

$ geet repo create

Create a private repository without a prompt:

$ geet repo create --visibility private

Create a fork while preserving the source as upstream:

$ geet repo create --upstream git@github.com:owner/project.git

Geet configures the created repository's SSH address as origin, preserves the source address as upstream when forking, pushes the current branch, and updates the GitHub default branch to match it.

Create an issue (with label and assignees)

Basic creation of an issue:

$ geet issue create

The default editor will be used for title/description:

Issue creation editing screenshot

Labels, milestone and assignees will be asked with menu selection:

Please select the label(s): (Use arrow keys, press Space to select and Enter to finish, and alphanumeric/underscore characters to filter)
‣ ⬡ bug
  ⬡ enhancement
  ⬡ not_an_issue
  ⬡ requires_design

Labels, milestone and assignees can be directly specified with the respective parameters:

$ geet issue create --labels bug,wip --assignees johncarmark --milestone 1.0

After creation, the issue page will be automatically opened in the default browser.

Create a PR (with label, reviewers, and assigned to self)

Basic creation of a PR:

$ geet pr create

The default editor will be used for title/description:

Issue creation editing screenshot

More advanced PR creation, with label and reviewers, assigned to self:

$ geet pr create --labels "code review" --reviewers kevin,tom,adrian

After creation, the issue page will be automatically opened in the default browser.

List issues/PRs

List the open issues, in default order (inverse creation date):

$ geet issue list
> 16. Implement issue opening (https://github.com/saveriomiroddi/geet/issues/16)
> 14. Update README (https://github.com/saveriomiroddi/geet/issues/14)
> 8. Implement milestones listing/show (https://github.com/saveriomiroddi/geet/issues/8)
> 4. Allow writing description in an editor (https://github.com/saveriomiroddi/geet/issues/4)
> 2. Support opening PR into other repositories (https://github.com/saveriomiroddi/geet/issues/2)

List the open PRs, in default order (inverse creation date):

$ geet pr list
> 21. Add PRs listing support (https://github.com/saveriomiroddi/geet/pull/21)

List milestones

$ geet milestone list
> 9. 0.2.0
>   4. Allow writing description in an editor (https://github.com/saveriomiroddi/geet/issues/4)
> 6. 0.2.1
>   69. Display warning when some operations are performed on a forked repository (https://github.com/saveriomiroddi/geet/issues/69)
>   60. Update Create PR test suite; the UTs are not inspecting some of the changes (https://github.com/saveriomiroddi/geet/issues/60)
>   51. Services should take repository in the initializer (https://github.com/saveriomiroddi/geet/issues/51)
> 7. 0.2.2
>   43. PR Merging: upstream support (https://github.com/saveriomiroddi/geet/issues/43)
>   35. Improve design of repository-independent actions (https://github.com/saveriomiroddi/geet/issues/35)

List labels

$ geet label list
> - bug (#ee0701)
> - enhancement (#84b6eb)
> - technical_debt (#ee0701)
> - top_priority (#d93f0b)

Create a gist

Create a private gist:

$ geet gist create /path/to/myfile

Create a public gist, with description:

$ geet gist create --public /path/to/myfile 'Gist description'

Using menus for options selection

Menus can be used for selecting attributes (labels, collaborators, milestones...).

This is an example of multiple choice selection:

Please select the label(s): (Use arrow keys, press Space to select and Enter to finish, and alphanumeric/underscore characters to filter)
‣ ⬡ bug
  ⬡ enhancement
  ⬡ not_an_issue
  ⬡ requires_design

Typing alphanumeric keys and underscore will enable filtering:

Please select the label(s): (Filter: "b")
‣ ⬡ bug
  ⬡ technical_debt

When a filter is active, use Backspace to cancel the last character, and Canc to reset it.

Help

Display the help:

$ geet [command [subcommand]] --help

Examples:

$ geet --help
$ geet pr --help
$ geet pr create --help

About

Command line interface for performing Git hosting service operations

Topics

Resources

License

Stars

17 stars

Watchers

1 watching

Forks

Contributors