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
    

📄 License

MIT License


🙏 Credits

  • Inspired by thefuck
  • Powered by Google Gemini AI

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.4.tar.gz (3.8 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.4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fuck_reborn-0.1.4.tar.gz
  • Upload date:
  • Size: 3.8 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.4.tar.gz
Algorithm Hash digest
SHA256 ff58c75f45c73f119be64954f5735fff79018ea3d2b2c9bb6151bb7af0640729
MD5 8f33e55e4d4ad0a44b1d1b14e83e1d80
BLAKE2b-256 1e10ea9ddb7077aeb40fe0515cc212d88e7e7311e0f292729cbd6f07aff6706f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fuck_reborn-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ee74fdf091b434e0cc27e40b1dffc64ea0be603d192dd8e67f87968cffa9242c
MD5 cf87f371a8898b8410acbbe755330571
BLAKE2b-256 0c1d35633f17a81486112bfb9193e2560bde40edf2626e532564357696471eba

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