1 unstable release
new 0.1.0 | May 14, 2025 |
---|
#1520 in Development tools
185KB
295 lines
NexSh 🤖
Next-generation AI-powered shell using Google Gemini
Installation • Features • Usage • Configuration • Contributing • Documentation

🌟 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
🚀 Installation
Using Cargo (Recommended)
cargo install nexsh
From Source
# Clone the repository
git clone https://github.com/M97Chahboun/nexsh.git
cd nexsh
# Build and install
cargo build --release
sudo cp target/release/nexsh /usr/local/bin/
Platform-Specific Packages
macOS (Homebrew)
brew tap M97Chahboun/nexsh
brew install nexsh
Arch Linux (AUR)
yay -S nexsh
🛠️ Setup
First-time configuration:
nexsh --init
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
📚 Usage
Interactive Shell Mode
nexsh
Example session:
$ nexsh
🤖 Welcome to NexSh! Type 'exit' to quit or 'help' for assistance.
nexsh> show me system memory usage
→ free -h
total used free shared buff/cache available
Mem: 15Gi 4.3Gi 6.2Gi 386Mi 4.9Gi 10Gi
Swap: 8.0Gi 0B 8.0Gi
nexsh> find files modified in the last 24 hours
→ find . -type f -mtime -1
./src/main.rs
./Cargo.toml
./README.md
Single Command Mode
nexsh -e "show all running docker containers"
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 |
⚙️ Configuration
Configuration files are stored in platform-specific locations:
- Linux:
~/.config/nexsh/
- macOS:
~/Library/Application Support/nexsh/
- Windows:
%APPDATA%\nexsh\
Configuration Options
{
"api_key": "your_api_key_here",
"history_size": 1000,
"dangerous_commands": [
"rm",
"dd",
"sudo"
],
"default_os": "linux",
"theme": "dark",
"auto_confirm": false,
"model": "gemini-pro"
}
🤝 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
Made with ❤️ by M97Chahboun
Dependencies
~12–25MB
~359K SLoC