Skip to main content

Repo hygiene scanner and fixer (junk files, secrets, gitignore).

Project description

repoclean

A repo hygiene CLI tool to scan repositories for common junk artifacts, detect secret/token patterns, and optionally install a git pre-commit hook to prevent leaks.

Why repoclean exists

Most developers (especially students) accidentally commit junk and sensitive files at least once:

  • __pycache__/, *.pyc, venv/, node_modules/
  • .env files
  • API keys/tokens and private keys

These mistakes are common, embarrassing, and sometimes expensive.

repoclean is a small CLI tool meant to be run before pushing to GitHub. It helps you quickly:

  • spot repo hygiene issues
  • detect secret/token patterns
  • block accidental leaks via an optional git pre-commit hook

Install

pip install repoclean-cli

Quick Start

repoclean scan repoclean secrets

CI usage

repoclean ci repoclean scan --fail-on sensitive,large repoclean secrets --fail

Typical workflow

repoclean scan repoclean secrets --fail repoclean fix --yes repoclean install-hook

Commands

Scan repo hygiene issues

repoclean scan

Create a default .gitignore

repoclean init

Safely clean junk files/folders

Preview:

repoclean fix --dry-run --verbose

Apply cleanup:

repoclean fix --yes

Scan for secrets/tokens

repoclean secrets

Fail mode (useful for CI and hooks):

repoclean secrets --fail

Install git pre-commit hook

repoclean install-hook

Uninstall:

repoclean uninstall-hook

Notes

  • repoclean is the command name.
  • The PyPI package name is repoclean-cli.

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

repoclean_cli-0.5.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repoclean_cli-0.5.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file repoclean_cli-0.5.1.tar.gz.

File metadata

  • Download URL: repoclean_cli-0.5.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for repoclean_cli-0.5.1.tar.gz
Algorithm Hash digest
SHA256 1493744c95d6d7e19d2576a8a0860b18682bda36067c432bd06e9af915f85ef3
MD5 c6b569a37e358b5467b0f53a1f854be4
BLAKE2b-256 5a8a54171c8b48b714fea3b629e02e75e082df3648f63f33f0f621f0673a0e01

See more details on using hashes here.

File details

Details for the file repoclean_cli-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: repoclean_cli-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for repoclean_cli-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fc3e41f79c661268f1a5f5b85af070e9b3271118f798c1e0961a547b2e73203
MD5 4ca31ec4a9b818468b9e4e4e7049e880
BLAKE2b-256 06eb1fb20eb100164e4116a49163ddab908e10e01873331d5c33855cbddffc3f

See more details on using hashes here.

Supported by

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