Natural language command-line assistant powered by LLM
Execute system commands using natural language. No need to remember complex command syntax.
- 🗣️ Natural Language - Describe what you want in plain language
- 🤖 Multi-LLM Support - DeepSeek, OpenAI, Claude, Gemini, Mistral, Groq, Qwen, and more
- 🔄 Auto Retry - Automatically tries alternative approaches on failure
⚠️ Safety First - Confirms before executing dangerous commands- 🌍 Multi-language - English and Chinese interface
- 💻 Cross-platform - Windows, macOS, and Linux
Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/YUHAI0/shex/master/scripts/install.ps1 | iexLinux/macOS:
curl -fsSL https://raw.githubusercontent.com/YUHAI0/shex/master/scripts/install.sh | bash# First run will guide you through configuration
shex list all files in current directory
# More examples
shex show disk usage
shex find all python files
shex what is my IP address
shex compress the logs folderOn first run, Shex will guide you to:
- Select your language (English/Chinese)
- Choose an LLM provider
- Enter your API key
# Change LLM provider
shex --config
# Change language
shex --lang| Provider | Model |
|---|---|
| OpenAI | GPT-4o |
| Anthropic | Claude 3.5 |
| Gemini Pro | |
| Mistral | Mistral Large |
| Groq | Llama 3 |
| Cohere | Command R+ |
| DeepSeek | DeepSeek Chat |
| Qwen | Qwen Plus |
| Moonshot | Kimi |
| Zhipu AI | GLM-4 |
You can also configure any OpenAI-compatible API.
# Basic usage
shex <your request in natural language>
# Options
shex --version # Show version
shex --config # Reconfigure LLM
shex --lang # Change language
shex --max-retries N # Set max retry attempts (default: 3)- You describe what you want to do in natural language
- Shex sends your request to the configured LLM
- The LLM generates the appropriate system command
- Shex executes the command and shows the output
- If the command fails, Shex automatically tries alternative approaches
- Dangerous commands (delete, format, etc.) require user confirmation
- The LLM analyzes each command for potential risks
- You always have the final say before execution
Configuration is stored in:
- Windows:
%LOCALAPPDATA%\shex\ - macOS/Linux:
~/.config/shex/
Files:
.env- API keys and LLM settingsconfig.json- Language and other preferenceslogs/- Execution logs
MIT
Issues and pull requests are welcome!
If this project has been helpful to you, please give it a ⭐️ to show your support!