Automated code formatting and linting for GitHub and GitLab.
Project description
janitor-sh CLI 🧹
The core Rust-based engine for the janitor-sh organization. This CLI provides high-performance, automated code formatting and linting orchestration across local and CI/CD environments.
[!IMPORTANT] This repository is private and contains the core logic for the janitor-sh automation engine.
Features
- Multi-Platform Detection: Automatically identifies if it's running in GitHub Actions, GitLab CI, or a local terminal.
- Smart Orchestration: Invokes industry-standard tools based on the project
structure:
- Ruff: For lightning-fast Python linting and formatting.
- Biome: For high-performance JavaScript/TypeScript orchestration.
- rumdl: For consistent formatting of Markdown and documentation files.
- Clippy & Cargo Fmt: For maintaining Rust code quality.
- Automated Fixes: Designed to automatically apply and commit fixes to minimize developer overhead.
Installation
Prerequisites
- Rust (2024 edition)
- rumdl (for Markdown formatting)
- uv (for package management and tool installation)
Local Setup
-
Clone the repository:
git clone https://github.com/janitor-sh/cli.git cd cli
-
Build and Install: You can use the provided installation script:
bash install.shAlternatively, build with cargo:
cargo build --release
[!NOTE] To install as a global tool using
uv, run:uv tool install .
Usage
Run the janitor CLI from the root of any supported repository:
janitor
The tool will automatically detect your environment and run the appropriate suite of formatters and linters.
Commit Mode Flags
--auto-commit: force creation of an automated conventional commit when janitor applies fixes.--no-commit: force janitor to skip commit creation.- default behavior:
- in CI (
GitHub ActionsandGitLab CI): auto-commit enabled. - local runs: no auto-commit.
- in CI (
You can also scope execution to a single tool:
janitor --tool ruff
Development
Running Tests
We maintain high standards for correctness and platform compatibility.
cargo test
Linting & Formatting
Ensure your contributions follow our style guidelines:
cargo clippy -- -D warnings
cargo fmt -- --check
Contributing
Please read the internal guidelines in the .github-private repository before
contributing.
Release Runbook
One-time repository setup:
- Create GitHub environment
pypi(recommended: protect with tag-only deploy rules). - Configure a PyPI Trusted Publisher for this repository/workflow/environment.
- Set Cloudflare deployment settings:
- secret:
CLOUDFLARE_API_TOKEN - secret:
CLOUDFLARE_ACCOUNT_ID - variable:
CLOUDFLARE_PAGES_PROJECT
- secret:
- Update
versionin/Users/drew.simmons/developer/github/personal/janitor-sh/cli/pyproject.toml. - Update
/Users/drew.simmons/developer/github/personal/janitor-sh/cli/CHANGELOG.md. - Update
/Users/drew.simmons/developer/github/personal/janitor-sh/cli/docs/src/pages/docs/release-notes.md. - Merge to
mainand create a GitHub Release tag in the formvX.Y.Z. - Monitor these workflows:
/Users/drew.simmons/developer/github/personal/janitor-sh/.github/workflows/cli-release.yml/Users/drew.simmons/developer/github/personal/janitor-sh/.github/workflows/cli-docs-pages.yml
- Verify successful publication on PyPI and docs deployment on Cloudflare Pages.
© 2026 janitor-sh. All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file janitor_sh-0.1.0.tar.gz.
File metadata
- Download URL: janitor_sh-0.1.0.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7ee625b0126fefb4c85e3a842ecbe41e43a7b6e480ce66e96ea4130d6fc10e5
|
|
| MD5 |
bdef0cc0ffee004157b7b1aba939fe40
|
|
| BLAKE2b-256 |
c58ef846c9f4ef4e78d9f2e1ce99bdb20bc986ba730817319e8fba2fc1f2570b
|
Provenance
The following attestation bundles were made for janitor_sh-0.1.0.tar.gz:
Publisher:
release.yml on janitor-sh/cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
janitor_sh-0.1.0.tar.gz -
Subject digest:
e7ee625b0126fefb4c85e3a842ecbe41e43a7b6e480ce66e96ea4130d6fc10e5 - Sigstore transparency entry: 981719930
- Sigstore integration time:
-
Permalink:
janitor-sh/cli@8f6310f2370705a6d9ecb2fca8c6c4f3fed27a97 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/janitor-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8f6310f2370705a6d9ecb2fca8c6c4f3fed27a97 -
Trigger Event:
release
-
Statement type:
File details
Details for the file janitor_sh-0.1.0-py3-none-manylinux_2_39_x86_64.whl.
File metadata
- Download URL: janitor_sh-0.1.0-py3-none-manylinux_2_39_x86_64.whl
- Upload date:
- Size: 240.6 kB
- Tags: Python 3, manylinux: glibc 2.39+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e53dc12e168c60167d4a082e0c0b2c0e555734e6f6b17d8a8f528245db434d79
|
|
| MD5 |
ffc8b0e5bbf39a9e86dcb77c75998b62
|
|
| BLAKE2b-256 |
ea66da2c7f83347adb42707cfa1bb0355ea5ec43345eaf591f4ae2c775b26ee9
|
Provenance
The following attestation bundles were made for janitor_sh-0.1.0-py3-none-manylinux_2_39_x86_64.whl:
Publisher:
release.yml on janitor-sh/cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
janitor_sh-0.1.0-py3-none-manylinux_2_39_x86_64.whl -
Subject digest:
e53dc12e168c60167d4a082e0c0b2c0e555734e6f6b17d8a8f528245db434d79 - Sigstore transparency entry: 981719981
- Sigstore integration time:
-
Permalink:
janitor-sh/cli@8f6310f2370705a6d9ecb2fca8c6c4f3fed27a97 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/janitor-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8f6310f2370705a6d9ecb2fca8c6c4f3fed27a97 -
Trigger Event:
release
-
Statement type: