Skip to main content

Fix corrupted shell commands using AI

Project description

Cmd-Fixer

Cmd-Fixer is a Python CLI tool that helps you fix corrupted or incorrect shell commands using AI. It suggests possible corrections, lets you preview them, and optionally executes the selected command immediately.


Features

  • AI-powered shell command fixing using Gemini LLM.
  • Interactive CLI with numbered command suggestions.
  • Option to execute the suggested command directly.
  • Stores API key and user preferences locally for seamless usage.
  • Configurable maximum number of suggestions per fix.

Installation

Install the package via pip:

  pip install cmdfixer-gemini

First-Time Setup

Before using Cmd-Fixer, you must set up your Gemini API key. Run the following command:

  cmdfix setup
  • You will be prompted to enter your Gemini API key. (Get your key from https://aistudio.google.com/api-keys)
  • You will also be asked to set the maximum number of suggestions per fix.
  • The configuration will be saved locally, so you don’t need to enter it again.

Usage

After setup, you can use Cmd-Fixer to fix shell commands:

  cmdfix fix <your-broken-command>

Options:

  • --run: Execute the selected command immediately instead of just previewing it.

Example:

  cmdfix fix mkdir new_folder --run

This will suggest corrected commands for mkdir new_folder and execute the chosen one immediately if --run is provided.


License

MIT License

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

cmdfixer_gemini-0.1.9.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

cmdfixer_gemini-0.1.9-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file cmdfixer_gemini-0.1.9.tar.gz.

File metadata

  • Download URL: cmdfixer_gemini-0.1.9.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for cmdfixer_gemini-0.1.9.tar.gz
Algorithm Hash digest
SHA256 ba9ab63e84370491cafcbe4b1602813f170ad66dd3ebee3c88da6d57cf87f588
MD5 9404776ee5ac2e0ce98009fbd8097282
BLAKE2b-256 11cc03b1733f93a721804435843dfc078beafd917660257e314f0c7ec3c4c89f

See more details on using hashes here.

File details

Details for the file cmdfixer_gemini-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for cmdfixer_gemini-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b78a007812096f73482d824ee4afa32973479305fd1ea7bf591cc9e5cc202c76
MD5 af6128479f198972708ac6fa78c93bc5
BLAKE2b-256 8141755783da34cb3a2cce34ca9deb08576895b6b8a0a374415dfde921dd2e9a

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