An ancient code sage analyzes your code for cursedness — bad naming, spaghetti logic, magic numbers, and crimes against readability — then delivers a dramatic verdict with a curse rating from 1 to 10.
Features • Installation • Usage • Flags • Contributing
|
🔮 Dramatic AI Roasting ⚔️ Brutal Mode 📄 Save Reports |
📏 Word Limit 📁 Directory Support 🛡️ Proper Error Handling |
Ever stared at your own code and wondered if it's actually cursed? Now you can get a second opinion — from an ancient code sage powered by Gemini AI.
- 🧙 Dramatic verdicts — not just "this is bad", but a full theatrical roast with specific callouts
- 📊 Curse rating — get a score from 1 (barely cursed) to 10 (an abomination)
- ⚔️ Brutal mode — for when you really want to suffer
- 🛠 Learning project — built to learn CLI tool development and the Gemini API
If you're on Arch Linux or an Arch-based distro, install directly via your AUR helper:
yay -S is-my-code-cursedNo dependencies to install manually — just set your API key and you're good to go.
git clone https://github.com/HimC29/is-my-code-cursed.git
cd is-my-code-cursedGet a free API key from aistudio.google.com and add it to your shell config:
# Add to ~/.zshrc or ~/.bashrc
export GEMINI_API_KEY="your_key_here"Then reload your shell:
source ~/.zshrc # or ~/.bashrcchmod +x install.sh
./install.shNow you can run is-my-code-cursed from anywhere!
is-my-code-cursed <file|directory> [flags]is-my-code-cursed main.pyis-my-code-cursed ./my-projectis-my-code-cursed main.py --output report.txtis-my-code-cursed main.py --brutalis-my-code-cursed main.py --max-words 300is-my-code-cursed ./my-project --exclude dist,buildis-my-code-cursed main.py --brutal --max-words 500 --output report.txt| Flag | Short | Description |
|---|---|---|
--output FILE |
-o |
Save the sage's verdict to a file |
--brutal |
-b |
No mercy mode — harsher roasting |
--max-words N |
-w |
Limit the response to N words |
--verbose |
-v |
Print status when calling the Gemini API |
--exclude DIRS |
-e |
Comma-separated directories to ignore |
--version |
Print the version and exit | |
--help |
-h |
Show help message and exit |
is-my-code-cursed/
├── src/
│ └── main.py — Main CLI script
├── install.sh — Installs the CLI command system-wide
├── README.md — Project documentation
└── LICENSE — MIT license
- 🏷️ Add
--versionflag to print the current version
- 🔧 Removed
python-google-generativeaidependency — now uses only Python stdlib - 📡 Gemini API calls now made directly via
urllib.request ⚠️ Improved warning message when a file is skipped during directory scan- 📦 Much easier to install — no AUR dependencies required
From this version onwards, this project follows Semantic Versioning:
MAJOR.MINOR.PATCH— breaking changes . new features . bug fixes
- 💻 Add auto permission elevation for Linux installs in install.sh if needed
- 🚫 New
--exclude/-eflag to ignore custom directories - 🧹 Support multiple excluded folders using comma-separated values
- 📁 Add directory support — analyze entire projects recursively
- 🚫 Automatically skip binary files
- 🧹 Ignore common dependency/cache folders like
.gitandnode_modules - 📄 Include file names and contents in AI analysis context
- 💻 Rename add_to_path.sh to install.sh
- Improve install.sh to support Termux and have more fallback features
- 🧹 Small code cleanup
- New flag:
--verboseto print status when importing lib and calling API
- 🎉 Initial release
- AI-powered code roasting with curse rating 1-10
--brutalmode for no mercy roasting--outputto save reports to a file--max-wordsto control response length
Hark, seeker of truth! I have gazed upon thy digital parchment...
Curse Rating: 7/10
A heavy curse, indeed! Your code does not merely stumble; it actively
confesses its most heinous sin in plain sight...
Contributions are welcome! If you have ideas for new flags, better prompts, or bug fixes, feel free to open an issue or PR.
- Fork the Project
- Create your Feature Branch
git checkout -b feature/AmazingFeature
- Commit your Changes
git commit -m 'Add some AmazingFeature' - Push to the Branch
git push origin feature/AmazingFeature
- Open a Pull Request
- 🎨 Colored terminal output with
coloramaorrich - 🔔 Support for more languages/models
- 📦 PyPI package release
Distributed under the MIT License. See LICENSE for more information.