Smart-Shell

Completed
Cli tool
Open Source
July 2025

Project Description

Smart-Shell is an advanced AI-powered terminal assistant that converts natural language into executable Bash/Zsh commands using Google's Gemini AI models. It features comprehensive safety systems, interactive command management, and intelligent error handling.

Smart-Shell offers a rich set of features to make your terminal experience smarter and safer:ΒΆ
🧠 Natural Language to Command
Convert plain English into valid Bash/Zsh commands instantly.

🐚 Shell Auto-Detection
Automatically detects and supports both Bash and Zsh environments.

πŸ’¬ Interactive Mode with Command History
Rich REPL interface with protected prompt and support for special commands like:
!help, !docs, !models, !history, !clear, !redo, !last, !creator, !forget-sudo, !update, !errors, !web, and more.

πŸ›‘οΈ Built-in Safety System
Analyzes each command and classifies it into four risk levels with detailed reasoning:

βœ… Safe – Executed automatically.
πŸ”΅ Info Leak – May expose sensitive data (requires confirmation).
🟑 Medium – Sudo operations and system changes (requires y/n confirmation).
πŸ”΄ High – Dangerous operations like file deletion (requires y/n confirmation).
This ensures potentially destructive commands are never run without user awareness.

πŸ€– AI-Powered Command Planning
Generates and refines shell commands using Google Gemini models.

πŸ”€ Multi-Model Support with Smart Warnings
Easily switch between Gemini Pro, Flash, and Legacy models with detailed cost information and confirmation prompts for premium models.

πŸ’³ Smart Cost Awareness
Real-time model pricing information with detailed cost breakdowns and confirmation prompts when switching to premium models.

πŸ§ͺ Dry-Run Mode
Preview the exact command before execution for extra safety and transparency.

πŸ“Ÿ Standard CLI Commands
Includes --help, --version, and other CLI flags for quick access.

πŸ–₯️ Desktop Integration
Comes with a .desktop entry β€” launch directly from your system's Application Menu.

⌨️ Tab Completion
Supports intelligent tab completion for both Bash and Zsh shells.

πŸ” Simple Setup
Easy configuration of your API key and sudo password during first run.

🌐 Web Search Integration
When enabled, Smart-Shell performs relevant web searches in real-time to enhance command accuracy.
AI combines local knowledge with live web results to refine its suggestions β€” giving you smarter, context-aware commands.
You can toggle web search anytime using the !web command.

⚑ Modern CLI Experience
A clean and user-friendly terminal UI with colorful output and rich formatting.

πŸ› οΈ Open Source & Extensible
Easily extend functionality or contribute β€” fully open and developer-friendly.

πŸ“¦ Reliable Installation with pipx
Install and manage Smart-Shell using pipx for an isolated and reliable setup, adhering to modern Linux standards (PEP 668).

πŸ”„ Smart Update System
Real-time version checking against GitHub releases with automatic updates using !update command.

πŸ”’ Protected Interactive Prompt
Smart prompt protection prevents accidental deletion of the "Smart-Shell (model):" prefix when backspacing.

🚨 Smart Command Detection
Detects when users try to run Smart-Shell CLI commands within the interactive mode and provides helpful guidance.

⚑ Enhanced AI Performance
Optimized generation parameters and more resilient error handling for faster, more reliable command generation.

🎯 Flexible Confirmation System
All confirmations accept both y/yes and n/no responses in any case for better user experience.

Read the documentation for more info at:
https://lusan-sapkota.github.io/smart-shell/

Technologies Used

python
shell
6 Stars
1 Forks
Jul 2025 Last Updated

Quick Actions

Project Preview

Smart-Shell
Project Information

Type: Open Source

Category: Cli tool

Status: Completed

Created: July 01, 2025