NexSh 🤖
Next-generation AI-powered shell using Google Gemini
Installation • Features • Usage • Configuration • Contributing
Features
- 🧠 AI-powered command interpretation - Understands natural language commands
- 🔄 Smart conversion - Translates your words into precise shell commands
- 🎨 Interactive experience - Colorful output with intuitive formatting
- 📝 Enhanced history - Search and recall past commands easily
- 🛡️ Safety first - Warns before executing potentially dangerous commands
- 🚀 Multiple modes - Interactive shell or single-command execution
- 💻 Cross-platform - Works on Linux, macOS, and Windows
- ❌ Command failure explanations - Offers explanations and potential solutions when a command fails
Installation
From GitHub Releases
You can download pre-built binaries for your platform from our GitHub Releases page.
- Visit the Releases page
- Download the appropriate file for your platform:
- Windows:
nexsh-windows.zip - macOS:
nexsh-macos.tar.gz - Linux:
nexsh-linux.tar.gz
- Windows:
- Verify the download using SHA256 checksum:
# Download both the binary and its checksum # Verify the checksum (Linux/macOS) | - Extract the archive:
# For Linux/macOS # For Windows - Move the binary to a directory in your PATH:
# Linux/macOS # Windows: Move nexsh.exe to a directory in your PATH
Using Cargo (Recommended)
From Source
# Clone the repository
# Build and install
🛠️ Setup
First-time configuration:
You'll need to:
- Enter your Gemini API key when prompted
- Get your API key from Google AI Studio
- The key will be securely stored in your system's config directory
Configuration
Configuration Options
Follow the prompts to configure the tool:
Enter your Gemini API Key: your_gemini_api_key
Set history size (default is 1000):
Set max context messages (default is 10):
Set model (default is gemini-2.0-flash):
Your configuration is now stored in the default location and used by nexsh.
| Setting | Description | Default |
| ---------------------- | -------------------------------------- | ---------------- |
| `api_key` | Your Gemini API key | Required |
| `history_size` | Number of commands to keep in history | 1000 |
| `max_context_messages` | Maximum messages to keep in AI context | 10 |
| `model` | The Gemini model | gemini-2.0-flash |
Usage
Interactive Shell Mode
Example session:
Single Command Mode
Key Commands
| Command | Action |
|---|---|
exit/quit |
Exit the shell |
help |
Show available commands |
Ctrl+C |
Cancel current operation |
Ctrl+D |
Exit the shell |
Up/Down |
Navigate command history |
Contributing
We welcome contributions! Here's how to get started:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please read our Contribution Guidelines for more details.
📝 License
MIT License - See LICENSE for full details.
🙏 Acknowledgments
- Google Gemini for powering the AI capabilities
- The Rust community for amazing crates and tools
- All contributors who helped shape this project
📱 Connect
- Author: M97Chahboun
- Report issues: Issue Tracker
- Follow updates: Twitter