A natural language interface for terminal commands
Project description
CommandRex 🦖
A natural language interface for terminal commands. Talk to your terminal in plain English!
Features
- 🗣️ Use natural language to run terminal commands
- 🔍 Preview commands before execution
- 🔒 Built-in safety checks for dangerous commands
- 💻 Cross-platform support (Windows, Linux, macOS)
- 📝 Command history with search
- ⌨️ Arrow key navigation
- 📊 Usage statistics
Installation
pip install commandrex-cli
Requirements
- Python 3.9 or higher
- OpenAI API key (get one at https://platform.openai.com)
Quick Start
- Install CommandRex:
pip install commandrex-cli
- Run CommandRex:
commandrex
-
On first run, you'll be prompted to enter your OpenAI API key.
-
Start typing commands in plain English:
Show me all files in the current directory
Create a new folder called projects
What's my current directory
- Update-
pip install --upgrade commandrex-cli
Usage Tips
- Use arrow keys (↑/↓) to navigate command history
- Press Ctrl+R to search command history
- Type 'help' for more information
- Type 'history' to see command history
- Type 'stats' to see usage statistics
- Type 'exit' or 'quit' to leave
Common Commands
Here are some example commands you can try:
- "Show all files"
- "Create a new folder called test"
- "What's my IP address"
- "Show system information"
- "Create a file called notes.txt"
Safety Features
- Commands are shown and explained before execution
- Dangerous commands are flagged with warnings
- Confirmation required before execution
- Platform-specific command adaptation
Special Commands
help
- Show help informationhistory
- Show command historystats
- Show usage statisticsclear
- Clear the screenreset-key
- Reset OpenAI API keyexit
orquit
- Exit CommandRex
Configuration
The OpenAI API key is stored securely using your system's keyring. You can:
- Set it via environment variable:
export OPENAI_API_KEY=your-key-here
-
Let CommandRex prompt you for it on first run
-
Reset it anytime with:
commandrex reset-key
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
commandrex_cli-0.1.8.tar.gz
(16.6 kB
view details)
Built Distribution
File details
Details for the file commandrex_cli-0.1.8.tar.gz
.
File metadata
- Download URL: commandrex_cli-0.1.8.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.3 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e68426a662bebec3e44a6a231c2aa3314bcd53a352e6314d836d8a93e5cf91df |
|
MD5 | 7259e381d31c2f2a7afe9b03db02d08e |
|
BLAKE2b-256 | 6cfe37ac883345d879daf14d9c0b03299acb4379aca3acad621273f9f439bc52 |
File details
Details for the file commandrex_cli-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: commandrex_cli-0.1.8-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.3 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d8cf260b28a92f27eef1102543ec55be453097a305e1da9b2f1c03548194cfc |
|
MD5 | daa93803aefd96ac6c0d0ce4f61bbd19 |
|
BLAKE2b-256 | eb40e45c28f4b9994a5c9eb6a50bd8c6451adc0c10a35a027385c52e907ef78c |