gpt-command (gptc)
Turn natural language into ready-to-use terminal commands.
gptc is a lightweight CLI tool that converts plain English (or any language) into executable shell commands for macOS and Linux.
🚀 Installation
pip install gpt-command
🔑 Setup (Required)
Run once to configure your API key and enable shell integration::
gptc-key
This will:
- Store your OpenAI API key securely
- Automatically install shell integration (zsh or bash)
- Detect your current shell and update the correct rc file
After setup, apply changes:
source ~/.zshrc
# or
source ~/.bashrc
Check status:
gptc-key --status
Set default model (optional):
gptc-key --model gpt-5.4-nano
💡 Usage
gptc <your question>
Example
gptc find and delete all txt files in current directory recursively
Output:
find . -type f -name "*.txt" -delete
Then it will automatically prefill your terminal input:
~/current/path$ find . -type f -name "*.txt" -delete
⚠️ The command is NOT executed automatically.
⚙️ Options
📋 Copy to clipboard
gptc --copy compress current folder into tar.gz
📖 Show explanation
gptc --explain find process using port 8000
▶️ Execute command (with confirmation)
gptc --run check disk usage
🧠 Show history
gptc --history
🤖 Specify model
gptc --model gpt-4.1 list all running processes
🔐 Security
- API key is stored locally at:
~/.config/gptc/config.json
File permissions are restricted to the user (600) Dangerous commands are automatically detected and blocked from execution
⚠️ Disclaimer
- Always review generated commands before running them
- Some commands may modify or delete system data
- Use with caution, especially with elevated privileges (sudo)
🖥️ Supported Platforms
- macOS
- Linux (Ubuntu, etc.)
✨ Features
- Natural language → shell command
- Auto-prefilled terminal input (no copy-paste needed)
- Optional execution with confirmation
- Clipboard copy support
- Command explanation
- History tracking
- Local API key management (no environment variable required)
📌 Summary
Stop Googling terminal commands. Just ask.
📄 License
MIT License
Metadata
Release files for gpt-command 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gpt_command-0.2.4.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gpt_command-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.4 kB
Release files / gpt_command-0.2.4.tar.gz
| Download URL | gpt_command-0.2.4.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26a699ee5160c3fd6348857a24892c68ae16a55e0943a181fc6285d25ce96e68
|
|
BLAKE2b-256 checksum How to use checksums |
20c003581f15a69041b90dad9c3149c87b7c3a790bbdd87b6bbd2290d34b022f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / gpt_command-0.2.4-py3-none-any.whl
| Download URL | gpt_command-0.2.4-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e9cd3017536c4ef123247a53239ad7338157946862bc20ac056c15a3b5043f4
|
|
BLAKE2b-256 checksum How to use checksums |
951573cd5b28fd3aa23394c286dfc516f534cc41cda83ea4b78d76de1b2093d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|