Rhaid Autofix — repo hygiene with smart AI guardrails
Project description
<<<<<<< HEAD
Rhaid v0.7.0 (Camwood Inc.)
Why Rhaid is #1
- Comprehensive hygiene: Scans and fixes Python, JS/TS, Markdown, TOML, Terraform, and more.
- AI guardrails: Baseline-aware, suppressions, and smart fixers.
- Fast & scalable: Parallel scanning, caching, and baseline support for large repos.
- Extensible: Easy to add custom rules/fixers and plugins.
- Multi-platform: CLI, VS Code extension, Gradio app, and CI/CD workflows.
- Open & documented: MIT licensed, with developer guides and API docs.
Usage Examples
CLI
rhaid --path . --mode scan --json
rhaid --path src/ --mode fix --backup --rules "+format:*,+json:*" --fix-only "+format:*"
VS Code Extension
- Install from Marketplace or build from source.
- Use "Rhaid: Scan Workspace" and "Rhaid: Fix Current File" commands.
- Diagnostics and quick fixes in the editor.
Gradio App
- Upload a ZIP or enter a Git repo URL.
- Choose scan or fix mode, add extra args if needed.
- Download results as JSON and ZIP.
CI/CD (GitHub Actions)
- Use
.github/workflows/rhaid_pr.ymlfor baseline-aware PR checks. - Use
.github/workflows/rhaid_sweep.ymlfor automated hygiene sweeps.
Contributing & Extending
- See
rhaid/rules.pyfor rule/fixer API and examples. - Add new rules/fixers with the
@ruleand@fixerdecorators. - For plugins, place your modules in a
plugins/directory (future support). - Run tests with
pytest.
API Reference
@rule(id: str): Decorator to register a rule. Seerhaid/rules.py.@fixer(id: str): Decorator to register a fixer.load_plugins(plugin_dir: str): Dynamically load plugins.run_rules(path, content, ctx): Run all rules on file content.apply_fixers(path, content, issues, ctx): Apply all fixers to file content.
Troubleshooting
- If the CLI or extension can't find the Rhaid binary, check your PATH or set
rhaid.pathToBinary. - For Gradio app errors, ensure dependencies are installed and repo URLs are public.
- For CI/CD, check workflow logs and the
rhaid_report.jsonartifact for details.
Security & Privacy
- No code is sent externally unless using LLM features.
- Secret scanning covers AWS keys, GitHub PATs, and private keys; expand patterns as needed.
- For sensitive code, run Rhaid locally or in your CI/CD.
MIT License — (c) 2025 Camwood Inc.
rhaid-autofix
Rhaid Autofix by Camwood Inc. keeps repos clean. It scans codebases and safely auto-fixes JSON/YAML/TOML/Markdown/MDX/Terraform & Python/JS/TS imports. Outputs SARIF/PR; and baseline-aware. CI-native. Runs locally or in CI; no code leaves your environment. Open-core + Pro/Team/Enterprise.
fe3662a357328ae96e51b382d77f8763f34789fb
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 rhaid_autofix-0.7.28.tar.gz.
File metadata
- Download URL: rhaid_autofix-0.7.28.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c46ecdb24fef61912d9eee4ba3f3e0eb307822b49dac7ac1c7a28598e97f970d
|
|
| MD5 |
bbc41a1d05b9c7b1d5d221b22e221af0
|
|
| BLAKE2b-256 |
94e98dc718fafd654e176cf6dd82b940925299d8babd0b7319f9b9f541316864
|
File details
Details for the file rhaid_autofix-0.7.28-py3-none-any.whl.
File metadata
- Download URL: rhaid_autofix-0.7.28-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66abea61d7c09788a63ac9f35a90149de3c556b33d0140362744cbc6d31aa881
|
|
| MD5 |
da38f85d38e7ae99ac9e093211991caa
|
|
| BLAKE2b-256 |
89440e4a21740f396a30711ce769d0c454e4cd5f2af53eb035c48fa4ddab2c51
|