Skip to main content

Repoclean (CLI) v0.8.0

PyPI License CI

repoclean — GitHub Repo Cleanup & Secret Leak Prevention CLI

A fast repo hygiene scanner + scary-good secrets detector + pre-commit hook that blocks risky commits automatically.

Why repoclean exists

Most repo leaks don’t happen because people are careless — they happen because shipping is fast and repo hygiene is manual.

repoclean stops:

  • accidental API key/token leaks
  • pushing .env, .pem, id_rsa etc
  • committing junk (__pycache__/, .log, .tmp, dist/, etc)
  • committing huge files that bloat history

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

Demo

repoclean demo

Install

pip install repoclean-cli

Quick Start

repoclean scan
repoclean secrets
## Secrets scanner (v0.6.0)

repoclean detects:
- Private key markers (`BEGIN PRIVATE KEY`)
- GitHub tokens (`ghp_`, `github_pat_`, `gho_`)
- Slack tokens (`xoxb-...`)
- Stripe live keys (`sk_live_...`)
- Telegram bot tokens (`123456:ABC...`)
- JWT tokens
- High entropy secret candidates in assignment contexts

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 --mode strict

Secrets severity + CI

repoclean secrets --min-severity high
repoclean secrets --fail-on critical
repoclean ci --json

Command

Scan repo hygiene issues
repoclean scan
Create a default .gitignore
repoclean init
Config

Create a .repoclean.toml config file:

repoclean config init
Safely clean junk files/folders

Preview:

repoclean fix --dry-run --verbose

Apply cleanup:

repoclean fix --yes
### Unstage instead of delete

```bash
repoclean fix --staged-only --unstage --yes
Scan for secrets/tokens
repoclean secrets

Fail mode (useful for CI and hooks):

repoclean secrets --fail

Install git pre-commit hook

Install (strict mode blocks commit on issues):
repoclean install-hook --mode strict
Install (warn mode prints warnings but allows commit):
repoclean install-hook --mode warn
Uninstall:
repoclean uninstall-hook
Hook utilities:
repoclean hook status
repoclean hook print --mode warn
repoclean hook print --mode strict

Notes

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

Metadata

Release files for repoclean-cli 0.8.0

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

Source distribution (sdist)

Source distribution for repoclean-cli 0.8.0
File Size Uploaded Provenance
repoclean_cli-0.8.0.tar.gz 23.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for repoclean-cli 0.8.0
File Interpreter ABI Platform
repoclean_cli-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 49.5 kB

Release files / repoclean_cli-0.8.0.tar.gz

Download URL repoclean_cli-0.8.0.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0b4de18a03820ef01656f2825e2086ff6445c17151fc84c1b5ab569505df411f
BLAKE2b-256 checksum
How to use checksums
95f660997741091706587cde36108ee725573a4456a67f9992234480a2a80a1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.6

Release files / repoclean_cli-0.8.0-py3-none-any.whl

Download URL repoclean_cli-0.8.0-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
039f6fdfc55749fdaac6e06e29c811a182ef82f98b5f57c0393d54256bb7c158
BLAKE2b-256 checksum
How to use checksums
d375c9dba269205134580e6054eed6d56ea7259d711d2660a484e09b93925913
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.6

Security for repoclean-cli 0.8.0

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