Skip to main content

AI-powered terminal assistant with natural language processing, git integration, system monitoring, and enhanced features

Project description

Smart Terminal 🚀 v2.0

AI-powered terminal assistant that converts natural language to shell commands. Works seamlessly on Windows, macOS, and Linux with enhanced features and capabilities.

✨ Enhanced Features

Core Features

  • Natural Language Processing: Just type what you want to do in plain English
  • Cross-Platform: Works on Windows, macOS, and Linux
  • Smart Learning: Learns from your command history to provide better suggestions
  • Safe Execution: Prevents dangerous commands from running
  • Interactive Mode: Chat with your terminal naturally
  • AI-Powered Suggestions: Get intelligent command recommendations

🆕 New in v2.0

  • Git Integration: Full git workflow support with natural language
  • System Monitoring: Check processes, memory, disk usage, and more
  • Network Operations: Ping, download, and network diagnostics
  • Text Processing: Advanced text manipulation and search
  • Command Bookmarks: Save and reuse frequently used commands
  • Command History: Track and replay previous commands
  • Workflow Suggestions: Get next-step recommendations
  • Enhanced Safety: Multiple safety levels and confirmations
  • Plugin System: Extensible architecture for custom commands
  • Smart Completions: Context-aware command completions

🚀 Quick Start

Installation

# Install from PyPI (recommended)
pip install smart-terminal-ai

# Or install from source
git clone https://github.com/yourusername/smart-terminal.git
cd smart-terminal
pip install -e .

Usage

# Interactive mode
smart-terminal

# Direct command
smart-terminal "make a folder called my_project"

# Short alias
st "create a backup of my documents"

📖 Command Examples

File Operations

What you type What it executes
"make a folder called random" mkdir random
"delete the old backup folder" rm -rf backup/
"show all hidden files" ls -la
"copy file.txt to documents" cp file.txt documents/
"compress my project folder" tar -czf project.tar.gz project/

Git Operations

What you type What it executes
"git init new repository" git init
"add all files to git" git add .
"commit with message fix bug" git commit -m 'fix bug'
"push to main branch" git push origin main
"clone repository from url" git clone <url>

System Operations

What you type What it executes
"show running processes" ps aux (Unix) / Get-Process (Windows)
"check disk usage" df -h (Unix) / Get-WmiObject Win32_LogicalDisk (Windows)
"show memory usage" free -h (Unix) / Get-WmiObject Win32_ComputerSystem (Windows)
"system uptime" uptime (Unix) / Get-Uptime (Windows)

Network Operations

What you type What it executes
"ping google.com" ping -c 4 google.com
"download file from url" curl -o file url
"show network ports" netstat -tuln
"show ip address" ifconfig / ipconfig

Text Processing

What you type What it executes
"edit file.txt" nano file.txt / notepad file.txt
"search for pattern in files" grep -r pattern .
"count lines in file.txt" wc -l file.txt
"show first 10 lines of file" head -n 10 file

🖥️ Platform Support

  • Windows: PowerShell commands with native Windows tools
  • macOS: Unix commands optimized for macOS
  • Linux: Full Linux command support

🧠 AI Features

Smart Learning

  • Remembers your command patterns and preferences
  • Suggests commands based on usage history
  • Learns from successful executions
  • Adapts to your workflow over time

Context-Aware Suggestions

  • Git Operations: Complete git workflows and best practices
  • Python Development: Virtual environments, package management
  • Node.js Workflows: npm commands and project management
  • Docker Operations: Container management and deployment
  • System Administration: Process management, monitoring
  • Network Operations: Connectivity testing, file downloads

Workflow Intelligence

  • Suggests logical next steps after commands
  • Provides complete workflow guidance
  • Learns common command sequences
  • Offers alternatives for failed commands

Enhanced Safety Features

  • Multiple Safety Levels: Low, Medium, High protection
  • Dangerous Command Detection: Prevents system damage
  • Confirmation Prompts: For destructive operations
  • Sandbox Mode: Test commands without execution
  • Backup Suggestions: Automatic backup recommendations

📦 Requirements

  • Python 3.8+
  • Rich terminal support
  • Git (optional, for git features)
  • Internet connection (for AI features and downloads)

🔧 Advanced Configuration

Smart Terminal creates a configuration file at ~/.smart_terminal/config.json with extensive customization options:

General Settings

{
  "general": {
    "confirm_dangerous_commands": true,
    "show_suggestions": true,
    "max_suggestions": 5,
    "suggest_bookmarks": true,
    "command_timeout": 30
  }
}

AI Settings

{
  "ai": {
    "enable_learning": true,
    "suggestion_threshold": 0.5,
    "max_history_size": 1000,
    "enable_context_suggestions": true
  }
}

Safety Settings

{
  "safety": {
    "check_dangerous_patterns": true,
    "require_confirmation_for_deletion": true,
    "sandbox_mode": false,
    "backup_before_delete": false
  }
}

🚀 Advanced Usage

Interactive Mode Commands

st
# Then type naturally:
# "help" - Show comprehensive help
# "stats" - View detailed usage statistics
# "config" - Show current configuration
# "history" - View command history
# "bookmark <name> <command>" - Save command
# "clear" - Clear screen
# "version" - Show version information
# "install" - Install shell integration

Bookmarks and Aliases

# Save frequently used commands
bookmark deploy "git add . && git commit -m 'Deploy' && git push"
bookmark backup "tar -czf backup-$(date +%Y%m%d).tar.gz ."

# Use bookmarks
st deploy
st backup

Command History

# View recent commands
history

# Repeat commands from history
!5  # Repeat 5th command from history

Shell Integration

Install shell integration to use st command directly:

# In interactive mode, type:
install

# Or manually add to your shell profile
# For zsh/bash: ~/.zshrc or ~/.bashrc
# For PowerShell: PowerShell profile

🛠️ Development

Setup Development Environment

git clone https://github.com/yourusername/smart-terminal.git
cd smart-terminal
pip install -e ".[dev]"

Run Tests

pytest
pytest src/smart_terminal/tests/test_enhanced_features.py

Code Formatting

black src/
flake8 src/

Plugin Development

Create custom plugins by extending the command mapper and builder:

# Example plugin structure
class CustomPlugin:
    def __init__(self):
        self.commands = {
            "custom_action": self.handle_custom_command
        }
    
    def handle_custom_command(self, intent):
        return "custom command result"

📊 Enhanced Statistics

Track your usage with comprehensive analytics:

  • Total Commands Executed: All-time command count
  • Success Rate: Percentage of successful executions
  • Most Used Patterns: Your favorite command types
  • Platform Usage: Cross-platform usage statistics
  • Session History: Current session command tracking
  • Learning Progress: AI improvement metrics
  • Bookmark Usage: Most used saved commands

🎯 Use Cases

Developers

  • Git workflow automation
  • Project setup and management
  • Code deployment processes
  • Development environment setup

System Administrators

  • System monitoring and diagnostics
  • Process management
  • Network troubleshooting
  • Automated maintenance tasks

Data Scientists

  • File processing and manipulation
  • Environment management
  • Data pipeline operations
  • Analysis workflow automation

DevOps Engineers

  • Container management
  • Deployment automation
  • Infrastructure monitoring
  • CI/CD pipeline management

🤝 Contributing

Contributions are welcome! Please read our Contributing Guide.

Development Roadmap

  • Enhanced NLP with context awareness
  • Git integration and workflows
  • System monitoring capabilities
  • Network operations support
  • Command bookmarking system
  • Plugin marketplace
  • Web interface for configuration
  • Team collaboration features
  • Integration with popular IDEs
  • Voice command support
  • Machine learning model improvements

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with Rich for beautiful terminal output
  • Powered by Click for CLI framework
  • Enhanced with GitPython for git integration
  • System monitoring via psutil
  • Inspired by modern AI-powered developer tools

📞 Support

⭐ Star History

Star History Chart


Smart Terminal v2.0 - Making terminal interactions intelligent, intuitive, and powerful. 🚀

Made with ❤️ for developers who want to work smarter, not harder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smart_terminal_ai-2.0.1.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smart_terminal_ai-2.0.1-py3-none-any.whl (34.3 kB view details)

Uploaded Python 3

File details

Details for the file smart_terminal_ai-2.0.1.tar.gz.

File metadata

  • Download URL: smart_terminal_ai-2.0.1.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for smart_terminal_ai-2.0.1.tar.gz
Algorithm Hash digest
SHA256 2d326c23f2666005975338cace4433e7a4a804c3945c2b2ec0ec538af484524b
MD5 c70b39f700eeb504deed2418c3492a23
BLAKE2b-256 8029860b6136e0dd0aa4b7634b4375961b7811fb22def692b3870f3593ee33e6

See more details on using hashes here.

File details

Details for the file smart_terminal_ai-2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for smart_terminal_ai-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5677159e070161ff81079efc63943636f3ba325101fd67841a1805279919ee25
MD5 5670cd0549a5105fe2f64ee2b6576463
BLAKE2b-256 d0b35e637fa77b2008fc843c47f9b885a3bcf71457a3410a276aaf7369c3424f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page