devibe
Remove auto-generated comments from your codebase. A simple, extensible library for cleaning up AI-generated and IDE-generated comments.
Installation
PyPI (Coming Soon!)
🚀 PyPI package coming soon! We're preparing to publish devibe to the Python Package Index. Once available, you'll be able to install it with:
# Coming soon!
pip install devibe
Once published, you'll be able to run devibe ./myfile.py directly from anywhere.
Local Development Install
Clone the repository and install in development mode:
git clone https://github.com/nhunter0/devibe.git
cd devibe
pip install -e .
After installation, you can run devibe either:
-
As a Python module (works anywhere):
python -m devibe myfile.py
-
Direct command (if pip Scripts directory is in PATH):
devibe myfile.py
Usage
Command Line
Clean a single file:
devibe myfile.py
Clean a directory recursively:
devibe ./src -r
Dry run to see exactly what lines would be removed:
devibe myfile.py --dry-run
This will show output like:
myfile.py - Would remove 3 line(s):
1. # Generated by Claude
2. x = 1 # ✅ AI-generated
3. # ... rest of implementation
Process only specific file types:
devibe ./src -r -e .py .js .java
Python API
from devibe import CommentRemover
remover = CommentRemover()
# Clean a single file
removed_count, removed_comments = remover.clean_file("myfile.py")
# Clean a directory
stats = remover.clean_directory("./src", recursive=True, extensions=[".py", ".js"])
print(f"Removed {stats['comments_removed']} comments from {stats['files_modified']} files")
Default Rules
devibe comes with intelligent rules to detect and remove:
AI-Generated Comments
generated by Claude,AI-generated,Created by GPT- Comments from Copilot, Codeium, TabNine, and other AI assistants
IDE-Generated Comments
- Auto-generated code stubs and boilerplate
- IDE template comments from VSCode, IntelliJ, Eclipse
Status Markers & Emojis
- Emoji indicators (✅, 🔒, 🚀, etc.)
- Status prefixes (
FIXED:,REMOVED:,ENHANCED:,SIMPLIFIED:) - Case-insensitive matching with or without colons
Placeholder Comments
... rest of code,... existing methodsyour code here,insert logic hereTODO: implement,stub,placeholder
List active rules:
devibe --list-rules
Adding Custom Rules
I have definetly missed rules so if you have any feel free to go to: /devibe/rules.py add a custom rule send a PR.
Via Command Line
Add custom patterns on the fly:
devibe myfile.py --add-pattern "my_rule" "pattern_to_match"
Via Python
from devibe import CommentRemover, PatternRule
remover = CommentRemover()
# Add a custom pattern rule
custom_rule = PatternRule(
name="custom_assistant",
description="Remove specific assistant comments",
patterns=[r"generated by my-assistant", r"my-assistant wrote this"]
)
remover.rule_registry.add_rule(custom_rule)
# Now clean files with your custom rule active
remover.clean_file("myfile.py")
Creating Your Own Rule Class
from devibe.rules import Rule
class KeywordRule(Rule):
def __init__(self, keywords):
super().__init__("keyword_rule", "Remove comments with specific keywords")
self.keywords = [k.lower() for k in keywords]
def matches(self, comment):
comment_lower = comment.lower()
return any(keyword in comment_lower for keyword in self.keywords)
# Use your custom rule
remover = CommentRemover()
remover.rule_registry.add_rule(KeywordRule(["autogen", "placeholder"]))
Requirements
- Python 3.7+
- No external dependencies for core functionality
Development
Install in development mode with:
git clone https://github.com/nhunter0/devibe.git
cd devibe
pip install -e .
Run tests:
pytest tests/
Contributing
We welcome contributions! To add support for new languages or improve detection rules:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Add your parser or rule to the appropriate registry
- Write tests for your changes
- Submit a pull request
Roadmap
- PyPI package publication
- Devibe UI & UX !
- VS Code extension
- More language-specific rules
License
MIT
Author
Created with ❤️ to keep codebases clean and professional.
Metadata
Release files for devibe 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| devibe-0.1.0.tar.gz | 15.5 kB | Without provenance | Details for devibe-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| devibe-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for devibe-0.1.0-py3-none-any.whl |
Total release size: 31.1 kB
Release files / devibe-0.1.0.tar.gz
| Download URL | devibe-0.1.0.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9beb67db76bd7972261617c6bdb6b6bdad254891215c3307750048aab9e3e9d1
|
|
BLAKE2b-256 checksum How to use checksums |
6aec33c57ceb32b2b8a94aad1366dcb4d40c22fb593462c38e9fdb3c56da4aa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / devibe-0.1.0-py3-none-any.whl
| Download URL | devibe-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57fee731056b9321aeb58c79d66c3e48ac78931aa7a19364d04dbcf077882b68
|
|
BLAKE2b-256 checksum How to use checksums |
906d5d3d1f1155aec96f921b665fd282e3dd6ddb7af75ce2573e4fd2609bfb78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for devibe 0.1.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.