Skip to main content

repocutter

License PyPI Build CodeQL pre-commit.ci status codecov.io readthedocs.org python3.8 Black isort docformatter pylint Security Status Known Vulnerabilities repocutter

Checkout repos to current cookiecutter config

Checkout one or more repos to current cookiecutter config

This will make changes to local repositories, hopefully preserving their history

Ideally only the working tree will change

Ignored files should be backed up

Use with caution

Usage

usage: repocutter [-h] [-v] [-a] [-c] [-b REV,NEW] [-i LIST] PATH [REPOS [REPOS ...]]

Checkout repos to current cookiecutter config

positional arguments:
  PATH                          path to cookiecutter template dir
  REPOS                         repos to run cookiecutter over

optional arguments:
  -h, --help                    show this help message and exit
  -v, --version                 show program's version number and exit
  -a, --accept-hooks            accept pre/post hooks
  -c, --gc                      clean up backups from previous runs
  -b REV,NEW, --branch REV,NEW  checkout new branch from existing revision
  -i LIST, --ignore LIST        comma separated list of paths to ignore, cookiecutter vars are allowed

Configuration

Currently only written for a configuration exactly like below

Technically a repo would not need to be a poetry project if the below section exists within its pyproject.toml file

This is the only use case at this time (If there are any other configurations you would like added please leave an issue)

Each repository’s pyproject.toml file will be parsed for data to recreate its working tree

A poetry section in the project’s pyproject.toml file that looks like the following…

[tool.poetry]
description = "Checkout repos to current cookiecutter config"
keywords = [
  "config",
  "cookiecutter",
  "jinja2",
  "repo",
  "template"
]
name = "repocutter"
version = "0.2.0"

…will temporarily write to the cookiecutter project’s cookiecutter.json file until the repo is created

{
  "project_name": "repocutter",
  "project_version": "0.2.0",
  "project_description": "Checkout repos to current cookiecutter config",
  "project_keywords": "config,cookiecutter,jinja2,repo,template",
}

The above configuration will reduce the diff, but it will still work if your config is not exactly the same

Why?

As time goes on, and you use cookiecutter for new projects, you will make more and more changes to your cookiecutter repo

You will find these new project layouts are preferable to your older, more outdated, projects

If you have a project layout configured with cookiecutter then it’s likely you will want this layout for all your projects

Configuring your existing projects manually is even more tedious than configuring a new project manually, especially if you have a lot of them

By checking out your projects to your configured cookiecutter layout, you can use whatever diff tool you use to rollback any undesired changes

Metadata

Release files for repocutter 0.6.2

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

Source distribution (sdist)

Source distribution for repocutter 0.6.2
File Size Uploaded Provenance Actions
repocutter-0.6.2.tar.gz 7.3 kB Without provenance Details for repocutter-0.6.2.tar.gz

Built distribution (wheel)

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

Total release size: 15.5 kB

Release files / repocutter-0.6.2.tar.gz

Download URL repocutter-0.6.2.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fe81ee780cfcdfb3d75277e077cd6f4798e3e47ba83786129b1982db73584339
BLAKE2b-256 checksum
How to use checksums
728bb9e478b36704688b6612d28afb1e3f38c2515d30a001633e888f4740d333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.13 Darwin/22.6.0

Release files / repocutter-0.6.2-py3-none-any.whl

Download URL repocutter-0.6.2-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2845070a0298b614bd371197a341e6450f1cf29d98587740a6093d1099024340
BLAKE2b-256 checksum
How to use checksums
0f3752e319e54456eb6cf8ecd2ef45a64625f68fec10fc05e2d82e63221d678f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.13 Darwin/22.6.0

Security for repocutter 0.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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