GPT-powered terminal assistant
Project description
fixcmd – GPT-Powered Terminal Assistant
fixcmd is a command-line tool that helps you correct mistyped or uncertain shell commands, explains terminal errors, and provides usage examples — all using OpenAI's GPT models.
Features
- ✅ Auto-correct mistyped terminal commands
- 🧠 Suggest correct commands for vague or unsure inputs
- ❌ Explain terminal errors and how to fix them
- 🔹 Show usage and real-world examples for shell commands
- 🔐 Secure OpenAI API key configuration
Installation
Requirements
- Python 3.7+
- An OpenAI API key (starts with
sk-...)
Install from PyPI
pip install fixcmd
Initial Setup (Configure API key)
fixcmd -setup
This will prompt you to enter your OpenAI API key and save it securely in ~/.fixcmd.env.
Usage
Auto-fix a mistyped command
fixcmd gti status
Output:
Invalid command:
gti status
Suggested:
git status
Fix a vague or unsure command
fixcmd -fix "remove all jpgs"
Output:
Corrected Command:
rm *.jpg
Usage & Example:
Removes all JPG files in the current directory.
Example: $ rm *.jpg
Ask a command usage question
fixcmd -ask "rm -rf"
Output:
Suggested Command:
rm -rf
Usage & Example:
Recursively and forcefully deletes files and directories.
Example: $ rm -rf myfolder/
Explain a terminal error message
fixcmd -explain "fatal: not a git repository"
Output:
Explanation:
You're trying to run a Git command in a directory that is not a Git repository.
Fix:
$ git init # to initialize a new repo
Or navigate to a valid repo directory
Check version
fixcmd -version
Display help
fixcmd -help
Environment Variable
The OpenAI API key is stored in this file:
~/.fixcmd.env
with this content:
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxx
Contributing
Feel free to fork, improve, and submit PRs. Suggestions and issues welcome!
Author
Developed by Parishith Ragumar
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fixcmd-0.1.4.tar.gz.
File metadata
- Download URL: fixcmd-0.1.4.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18e437e1079c16ebb0711225830dc10d0eb5733eb74e4b2da970a327b99b2bd5
|
|
| MD5 |
ac39aa256a951f11989514f0e8155a1b
|
|
| BLAKE2b-256 |
db3361c93a3c0c6a6ae10b4741ef069f8d5527a2bda58c7993ac4d91ff76d09b
|
File details
Details for the file fixcmd-0.1.4-py3-none-any.whl.
File metadata
- Download URL: fixcmd-0.1.4-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43fa654782fbb5877efa3d4d465818760e0408fb9d3d4cc5fdd6be500723171f
|
|
| MD5 |
c49c71582e4c4081fd9c26edd5ab6ac4
|
|
| BLAKE2b-256 |
78b585158727779d5cdf345eef2bb8bc287a65769cb3b104bcbcf8d4370c8cb5
|