AI-powered command line assistant that generates and executes shell commands
Project description
⭐ Star Shell
An AI-powered command line assistant that generates and executes shell commands using natural language.
Features
- 🤖 AI-Powered: Uses OpenAI GPT or Google Gemini to understand your requests
- 💬 Interactive Terminal: Natural conversation with command execution
- 🧠 Smart Responses: AI decides whether to run commands or provide information
- 🔄 Multi-Command Support: Execute multiple commands in sequence automatically
- 🧠 Adaptive Planning: Gemini Thinking mode creates plans and adapts based on real execution results
- 🛡️ Safety First: Built-in command safety checks and confirmations
- 🎯 Context Aware: Understands your current directory and system environment
- 🔒 Secure: Encrypted API key storage
- 🎨 Beautiful Output: Rich formatting and syntax highlighting
- ⚡ Streamlined UX: Automatic initialization checks and intuitive commands
Installation
pip install star-shell
Quick Start
-
First time setup:
star-shell initChoose your AI backend (OpenAI or Gemini) and provide your API key.
-
Start the interactive terminal:
star-shell runThis opens an AI-powered terminal where you can chat and get commands executed.
-
Or ask for specific commands:
star-shell ask "list all Python files in this directory"
Commands
star-shell- Shows status and quick helpstar-shell init- Set up your AI backend and API keysstar-shell run- Start the interactive AI terminalstar-shell ask "your request"- Generate a specific command
Backend Options
During initialization, you can choose from:
- OpenAI GPT-3.5 Turbo - Reliable, requires API key
- Gemini Pro - Google's flagship model, requires API key
- Gemini Flash - Faster Google model, requires API key
- Gemini Thinking - Adaptive planning with step-by-step execution, requires API key
- Secret option - For special access (contact developer)
Supported AI Backends
- OpenAI GPT-3.5 Turbo - Requires OpenAI API key
- Google Gemini Pro - Requires Google AI API key
- Google Gemini Flash - Requires Google AI API key (faster, optimized model)
- Google Gemini Thinking - Adaptive multi-step execution with planning (requires Google AI API key)
- Secret Backend - Free access for select users (no API key needed)
Safety Features
Star Shell includes built-in safety checks for potentially dangerous commands:
- Warns about destructive operations (rm, format, etc.)
- Confirms before executing system-level changes
- Provides clear descriptions of what commands do
Examples
Interactive Terminal Mode
star-shell run
⭐ > create a new directory called projects
# AI will generate and offer to execute: mkdir projects
⭐ > create a directory and navigate to it
# AI will offer to execute multiple commands:
# 1. mkdir new_directory
# 2. cd new_directory
⭐ > set up a complete Python project (Gemini Thinking mode)
# AI creates adaptive plan:
# 1. Create project directory
# 2. Initialize virtual environment
# 3. Create requirements.txt
# 4. Set up project structure
# Then executes each step, adapting based on results
⭐ > what's the difference between git merge and rebase?
# AI will explain the concepts in natural language
⭐ > help
# Shows available commands and examples
Direct Command Mode
# File operations
star-shell ask "create a backup of my config files"
# System information
star-shell ask "show me disk usage"
# Development tasks
star-shell ask "start a Python web server on port 8000"
Requirements
- Python 3.8+
- OpenAI API key OR Google AI API key
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file star_shell-0.5.0.tar.gz.
File metadata
- Download URL: star_shell-0.5.0.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17df35059942741ae268f60039e4b288e84092f6cc31d26d72a761250f38b3ea
|
|
| MD5 |
49e906c8a4d497fafe2a09e2ff0a10a3
|
|
| BLAKE2b-256 |
259e4ab27d48dfa77c686987fc7643ec2841f5aadbd4236035c2ebc04e6b4b4a
|
File details
Details for the file star_shell-0.5.0-py3-none-any.whl.
File metadata
- Download URL: star_shell-0.5.0-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be285bba2705c437604eb9c8633d7b8948b3995d32bb02d7ecfe49f3f7d0c74f
|
|
| MD5 |
1223e1efc487d8e81c8b7747cf5db423
|
|
| BLAKE2b-256 |
a30d8bb280c42a67a6dbb97d0ad5100bf326c7c300c7d5e8724651125618cf3c
|