Skip to main content

AI-powered command corrector (like thefuck, but with Gemini)

Project description

fuck-reborn 🚀

AI-powered command fixer, inspired by thefuck, but powered by Google Gemini AI for smarter, context-aware corrections.


✨ Features

  • 🧠 Uses Gemini AI to understand and correct failed commands
  • 🖥️ Detects command errors automatically
  • 🤝 Interactive mode: approve or reject suggested fixes
  • 🔑 .env support for storing your Google API Key
  • 📦 Lightweight & cross-platform

🔧 Installation

From PyPI (Recommended)

pip install fuck-reborn

From Source (Development)

git clone https://github.com/blackXploit-404/fuck-reborn.git
cd fuck-reborn
python -m venv venv
source venv/bin/activate   # Linux/macOS
venv\Scripts\activate      # Windows
pip install -e .

⚙️ Configuration

fuck-reborn requires a Google Gemini API Key. You can set it in two ways:

  1. .env file (recommended): Create a .env file in your home or project directory:

    GEMINI_API_KEY=your_api_key_here
    
  2. Environment variable:

    export GEMINI_API_KEY="your_api_key_here"
    

🔑 Get your API key from Google AI Studio.


🚀 Usage

Just run fuck-reborn after a failed command:

$ gti status
/bin/sh: gti: command not found
$ fuck-reborn gti status
Gemini suggests: git status
Run it? (y/n): y

🛠 Development

  1. Clone the repo and install dependencies:

    git clone https://github.com/blackXploit-404/fuck-reborn.git
    cd fuck-reborn
    python -m venv venv
    source venv/bin/activate
    pip install -e ".[dev]"
    
  2. Run tests:

    pytest
    

🐛 Troubleshooting

1. Missing API Key

  • Error: GEMINI_API_KEY not found
  • Fix: Ensure the key is set in .env or exported in your shell.

2. Command Not Found

  • Error: fuck-reborn: command not found
  • Fix: Ensure the package is installed and your PATH includes the Python bin directory.

3. PyPI Version Issues

  • Error: ERROR: Could not find a version that satisfies the requirement
  • Fix: Upgrade pip and try again:
    pip install --upgrade pip
    pip install fuck-reborn
    

📦 Publishing (Maintainers)

  1. Bump the version in pyproject.toml.
  2. Build the package:
    rm -rf dist/ build/ *.egg-info
    python -m build
    
  3. Upload to PyPI:
    twine upload dist/*
    

📄 License

MIT License


🙏 Credits

  • Inspired by thefuck
  • Powered by Google Gemini AI

---
**Ready to use!** Copy this into your `README.md` and customize as needed. Want to add anything else? 😊

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fuck_reborn-0.1.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fuck_reborn-0.1.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file fuck_reborn-0.1.3.tar.gz.

File metadata

  • Download URL: fuck_reborn-0.1.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for fuck_reborn-0.1.3.tar.gz
Algorithm Hash digest
SHA256 5c0e1999956f9b7747e07f0bd16efabc0c81540869be6624a8d106d924ab0050
MD5 908562a82f447d70e29dea00188f9eb4
BLAKE2b-256 651f794e89dbbc70480361e7881ad983c0639c06c21b04fc76149e66d78683d8

See more details on using hashes here.

File details

Details for the file fuck_reborn-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: fuck_reborn-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for fuck_reborn-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ef99b64297bf93e5b1bab7783ebe73086af4e1444bbbe642de605cfd214a3158
MD5 00fee4283049470685ce412fb0f0fa4a
BLAKE2b-256 08702686fa4c22c76bb1d71c284ad3a0f1fce66ebcca55dceb12ec2a5fb0b20d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page