Skip to main content
https://github.com/peterbe/gg/workflows/Python/badge.svg https://badge.fury.io/py/gg.svg

Git and GitHub command line swiss army knife for the productivity addicted.

gg is a base command, and all the work to create branches, list branches, clean up branches, connect to Bugzilla etc. are done by plugins.

gg is stateful. Meaning, plugins (not all!) need to store additional information that is re-used for other commands. For example, to connect to your GitHub account might need to store a GitHub Access Token.

Installation

gg requires Python 3.

The idea is that you install gg globally:

sudo pip install gg

But that’s optional, you can also just install it in your current virtual environment:

pip install gg

If you don’t want to install gg and its dependencies in either the current working virtual environment or in your global system Python, you can first install pipx then once you’ve installed and set that up:

pipx install gg

Next, you need to install some plugins. See PLUGINS.rst for a list of available plugins.

Bash completion

First download gg-complete.sh and save it somewhere on your computer. Then put this line into your .bashrc (or .bash_profile if you’re on OSX):

source /path/to/gg-complete.sh

How to develop

To work on this, first run:

pip install -U --editable .

Now you can type:

gg --help

If you have install more plugins they will be listed under the same --help command.

Linting

This project tracks black and expects all files to be as per how black wants them. Please see its repo for how to set up automatic formatting.

All code needs to be flake8 conformant. See setup.cfg for the rules.

To test both, run:

tox -e lint

How to write a plugin

To write your own custom plugin, (similar to gg/builtins/commands/commit) these are the critical lines you need to you have in your setup.py:

setup(
    ...
    install_requires=['gg'],
    entry_points="""
        [gg.plugin]
        cli=gg_myplugin:start
    """,
    ...
)

This assumes you have a file called gg_myplugin.py that has a function called start.

Version History

0.1
  • Proof of concept

Release files for gg 0.0.21

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gg 0.0.21
File Size Uploaded
gg-0.0.21.tar.gz 22.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gg 0.0.21
File Interpreter ABI Platform
gg-0.0.21-py3-none-any.whl Python 3 none any Details

Total release size: 50.5 kB

Release files / gg-0.0.21.tar.gz

Download URL gg-0.0.21.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
355e693f6b4f64dd13abfa13f8ea0cddd1b875383a4ea342926dcfb03745295e
BLAKE2b-256 checksum
How to use checksums
a4c91df6a9a41b2a94425bc5fb7c804f5701e8d9efa3145a6e1fcd99a1549352
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Release files / gg-0.0.21-py3-none-any.whl

Download URL gg-0.0.21-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cc6ee35c286986d8e366422e8c547401cab652f3ab54302da354b6c9ded8289
BLAKE2b-256 checksum
How to use checksums
64582d34467ddea77da1ff3f1357e7c88c0fdf7d9f3bca04edb198527fc478bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Release history Release notifications | RSS feed

This release

0.0.21 This release

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

1 release file

0.0.12

2 release files

0.0.11

1 release file

0.0.10

1 release file

0.0.9

2 release files

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page