Skip to main content

A tool to aggregate custom command line tools into one

Project description

A tool to aggregate custom command line tools into one.

It can thus serve as a single entry point into a local ecosystem of tools and scripts. It is of course inspired by https://en.wikipedia.org/wiki/Inspector_Gadget.

Instead of remembering obscure script names or command line tool names with possibly even more obscure options, one can simply create a gogo file containing the whole command and some more memorable command name. In contrast to bash aliases an command can be split into several word tokens, e.g. gogo cleanup conda. Thanks to support for autocompletion in the bash (<TAB> <TAB>), it is even simpler to access the required commands.

Furthermore, help or a very short documentation can be included.

How does it work?

On startup gogo-gadget loads a gogo file by default from ~/.gogo.yml. It then creates a command line interface on the fly using the click python library (http://click.pocoo.org).

Installation

It is recommended to use pipsi https://github.com/mitsuhiko/pipsi to install gogo-gadget. Once pipsi is installed, run:

pipsi install gogo-gadget

A pip install gogo-gadget would also work in principle, however, gogo would need to be installed in all virtual environments used.

To enable tab autocompletion in the bash, add the following to .bashrc:

eval "$(_GOGO_COMPLETE=source gogo)"

Example gogo File

Gogo files are written in YAML.

See below a few command examples along with the corresponding YAML file.

Commands:

gogo start foo
gogo update
gogo cleanup conda
gogo cleanup conda -y
gogo cleanup foo

Gogo file:

cleanup:
  conda:
    cmd: conda clean --all
    help: Remove obsolete files in current conda env
  foo:
    cmd: example_command
    help: doing some other sort cleanups
start:
  foo:
    cmd: docker run -it --rm foo/foo:latest command_in_docker
    help: complicated docker command
update:
  cmd: apt-get update && apt-get upgrade
  help: updating software on ubuntu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gogo-gadget-0.2.5.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

gogo_gadget-0.2.5-py2.py3-none-any.whl (5.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file gogo-gadget-0.2.5.tar.gz.

File metadata

  • Download URL: gogo-gadget-0.2.5.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for gogo-gadget-0.2.5.tar.gz
Algorithm Hash digest
SHA256 a6172beb42c62a03163c93c3b8c7db81463e4eafa386b970210cc1177ec3913b
MD5 3f60bb37b0b8ee6ddd59d9939da40cf2
BLAKE2b-256 43111da1dc8643a4318f9c96934881fb5af09e4adeb5bbbe835b578728866a36

See more details on using hashes here.

File details

Details for the file gogo_gadget-0.2.5-py2.py3-none-any.whl.

File metadata

  • Download URL: gogo_gadget-0.2.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for gogo_gadget-0.2.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 34982f7c1f48f2334882d62d73b8fefac85c62952ed93ff50162c40960390ca5
MD5 a47e52406fb32cde95d553923e303412
BLAKE2b-256 9014099f56d9309d0d405c2408ae061a5ade1a15609390cdd9b0b10fe2191544

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page