Skip to main content

A multi-repo CLI to help operating on multiple repos at the same time.

Project description

repo-tools

pre-commit CircleCI

DevelopmentDocumentationContributeSupport

This is a small Multi Repo CLI that allows you to apply changes to multiple projects at the same time.


Use it!

pip install repo-tools
$ rt --help
Usage: rt [OPTIONS] COMMAND [ARGS]...

Options:
  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.

  --help                Show this message and exit.

Commands:
  config   Configure repo_tools
  exec     Execute an arbitrary command
  gh       Interact with github
  snippet  Run snippets (custom snippets can be registered)

Required Setup

  • Display your config:
rt config show
  • Create your Github config:
rt config gh setup

Note: To create your config you will need to have a Personal Github Oauth Token, that can be created here. Make sure to give it repo:all and admin:org permissions.

  • Register Projects
rt config projects detect ./<your-projects-dir>
  • Register Snippets
rt snippet register <path-to-snippet-file> | <path-to-dir-with-snippets>

Development

Setup

This project uses poetry for dependency management, let's install it:

pip install poetry

Run

You can use poetry to install all dependencies and use the current state of the CLI as follows:

poetry install
poetry shell # opens new shell in virtual env
> rt config show
> ...

How to Contribute

In order to contribute you just have to have Python installed on your machine. In case you do not have it installed get it from python.org.

Linting Tool

This project is using pre-commit to enable linting and auto-formatting as a pre-commit hook. The hooks are configured in .pre-commit-config.yaml.

To install the hooks you have to run the following command (only once):

pip install pre-commit
pre-commit install

Then you can trigger all the hooks manually by running:

poetry install
poetry run pre-commit run --all-files

Additionally on every git commit the hooks will be triggered and have to pass.

How to run tests

You can run all the tests, by simply running:

poetry install
poetry run pytest -vv

Support & Feedback

Your contribution is very much appreciated. Feel free to create a PR or an Issue with your suggestions for improvements.

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

repo-tools-0.2.0.tar.gz (13.4 kB view hashes)

Uploaded Source

Built Distribution

repo_tools-0.2.0-py3-none-any.whl (16.2 kB view hashes)

Uploaded Python 3

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