Smart Terminal (st
) is a powerful command-line interface that converts natural language instructions into executable terminal commands using AI. Say goodbye to forgetting command syntax or searching through documentation - just describe what you want to do in plain English.
- Natural Language Processing: Convert plain English to terminal commands
- Multi-step Tasks: Handle complex operations with sequential commands
- Multiple AI Providers: Support for OpenAI, Groq, and Anthropic
- Cross-platform Support: Works across macOS, Linux, and Windows with dedicated shell adapters
- Interactive Mode: Continuous command generation for complex workflows
- Command History: Context-aware interactions for better suggestions
- Admin Privilege Handling: Proper sudo/admin permission management
- Customizable: Configure AI providers and other settings
- Dry Run Mode: Preview commands without execution
- JSON Output: Format results as JSON for scripting and automation
pip install smart-terminal-cli
st "create a folder called projects and create a python file inside it"
This will generate and execute the appropriate commands to create the folder and file.
st -i
Start an interactive session where you can continuously issue natural language commands.
st --setup
Configure API keys, default settings, and other options.
st --dry-run "create a file with the current date as filename"
Preview commands that would be executed without actually running them.
st --json "find all python files in the current directory"
Output results in JSON format for scripting and automation.
# Clear command history
st --clear-history
# Enable debug logging
st --debug
# View version information
st --version
# Set up shell integration
st --shell-setup
# Show configuration information
st --config-info
Here are some examples of what you can do with Smart Terminal:
# File and directory operations
st "find all PDF files in the current directory and move them to a new folder called documents"
# System information
st "show me system information including CPU and memory usage"
# Package management
st "install numpy, pandas, and matplotlib for my python project"
# Git operations
st "initialize a git repository, add all files, and make an initial commit"
# Network operations
st "scan open ports on localhost"
Smart Terminal stores its configuration in ~/.smartterminal/config.json
. You can modify this file directly or use the setup command:
st --setup
Key configuration options:
- API Key: Your AI service API key
- Base URL: API endpoint URL
- Model Name: AI model to use for command generation
- Provider: AI provider to use (openai, groq, anthropic)
- Default OS: Target operating system for commands
- History Limit: Number of previous commands to retain
- Shell Integration: Enable/disable shell integration for environment-changing commands
Smart Terminal can modify your shell environment (changing directories, setting environment variables) when you enable shell integration:
st --shell-setup
This adds a function to your shell configuration file that allows Smart Terminal to affect your shell environment.
- Python 3.10 or higher
- Poetry (for dependency management)
# Clone the repository
git clone https://github.com/muralianand12345/Smart-Terminal.git
cd Smart-Terminal
# Install dependencies using Poetry
poetry install
# Activate the virtual environment
poetry shell
pytest
poetry build
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI, Groq, and Anthropic for providing the AI capabilities
- All contributors and testers
Contributions are welcome! Please feel free to submit a Pull Request.
- 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
Created by Murali Anand