PromptShell
Your Smart Terminal Assistant, making command-line operations effortless and secure. Convert natural language text into terminal commands, ask questions, or run commands directly. Privacy-first model, run locally offline on your system using ollama, or add your own api key for faster & accurate suggestions. Supports Linux, macOS & Windows
Install / Use
npx skills add Kirti-Rathi/PromptShellInstalls into whichever agent you are using.
README
https://github.com/user-attachments/assets/c2ba7d09-83ea-4d10-a825-92c30f28c0bd
📖 Table of Contents
✨ Features
🚀 Redefine Your Terminal Experience
-
⚡Natural Language to Shell Commands: Converts plain English queries into accurate shell commands.
-
🖥️Cross-Platform Compatibility: Works seamlessly across Windows, Linux, and macOS.
-
🤖Hybrid AI-Model Support: Supports both local (Ollama) and cloud-based (Groq, OpenAI, Google, etc.) LLMs for flexibility.
-
🔒Privacy-First Approach: Defaults to local models and runs completely offline, so that no data leaves your device unless you enable cloud APIs.
-
🎯Context-Aware Execution: Remembers command history, tracks files, and adapts suggestions accordingly.
-
⚠️Secure Command Execution: Blocks dangerous commands and asks for confirmation.
-
🛠️Intelligent Debugging & Auto-Correction: Identifies error, autonomously debugs issues and suggests corrected command.
-
🔍Smart Autocompletion: Provides tab completions for files and folder present in working directory.
-
🤖Direct Execution & Queries: Directly execute shell commands with '!' (e.g., !ls -la), or Ask shell-related questions using '?' (e.g., How do I create a new SSH key?).
-
🐳Built-in Support for Git, Docker, and Dev Tools: Seamlessly understands and executes Git, Docker, Kubernetes, and package manager commands.
-
🏷️User Defined Aliases: The alias system allows you to create, remove, list, import and export shortcuts for complex commands.
📥 Installation
Prerequisites
- Python 3.9+
pip(Windows)pipx(Linux & macOS)
Installation Steps
Windows:
pip install promptshell
Linux & macOS:
pipx ensurepath # Ensure pipx is in PATH (Linux/macOS)
pipx install promptshell
Run PromptShell
promptshell
⚙️ Configuration
- Local models need 4GB+ RAM (llama3:8b) to 16GB+ (llama3:70b)
- API performance varies by provider (deepseek-r1-distill-llama-70b in Groq is recommended)
- Response quality depends on selected model capabilities
Local Configuration
# Install Ollama for local LLM's
$ curl -fsSL https://ollama.com/install.sh | sh # Linux
$ brew install ollama # MacOS
$ winget install Ollama.Ollama # Windows (via Powershell Administrator)
# Verify Installation
$ ollama --version
# Get base model
$ ollama pull <model_name>
First-Time Setup
# Interactive configuration wizard
$ --config
? Select operation mode: (Use arrow keys)
» local (Privacy-first, needs 4GB+ RAM)
api (Faster but requires internet)
# If local mode is selected
? Choose local model: (Use arrow keys) # lists ollama models installed on your system
» llama3.1:8b
llama3:8b-instruct-q4_1
deepseek-r1:latest
mistral:latest
# If API mode is selected
? API provider selection: (Use arrow keys)
» Groq
OpenAI
Google
Anthropic
Fireworks
OpenRouter
Deepseek
? Select model for Groq: (Use arrow keys)
» llama-3.1-8b-instant
deepseek-r1-distill-llama-70b
gemma2-9b-it
llama-3.3-70b-versatile
llama3-70b-8192
llama3-8b-8192
mixtral-8x7b-32768
Custom model...
? Enter API key for Groq: #[hidden input]
✅ Configuration updated!
Saved to /home/username/.config/PromptShell/promptshell_config.conf # (Linux & macOS)
Saved to C:\Users\username\AppData\Roaming\PromptShell\promptshell_config.conf #(Windows)
Active model: #[Selected-model]
Configuration updated!
🛠 Usage
Basic Commands
# Start the PromptShell REPL
$ promptshell
# Execute natural language queries
$ backup all .txt files in a folder named backup
# Directly execute raw shell commands (bypassing AI processing) with '!'
$ !mkdir backup && copy *.txt backup\
# Ask questions by prefixing or suffixing your query with '?'
$ What's the command to list all hidden files?
# Configure or change the LLM provider
$ --config
# Start the interactive tutorial
$ --tutorial
# View help and usage instructions
$ --help
# Clear the terminal screen
$ clear
# Exit PromptShell
$ quit
CLI Options
--version: Display the current version of PromptShell
Alias Support
Create shortcuts for frequently used commands:
# Create an alias
alias add gpm "git push origin main" # without description
alias add gpn "git push origin main" --desc "Push changes to orgin/main" # with description
# Use the alias
!gpm
# List all aliases
alias list
# List a specified alias
alias list <alias_name>
# Remove an alias
alias remove gpm
#Remove all alias
alias clear
# Import/export aliases
alias import ~/backup/aliases.json
alias export ~/backup/aliases.json
🌟 Examples
Convert Plain English Queries into Accurate Shell Commands

Ask Questions, Execute Commands Directly, and Ensure Secure Execution

Seamless Integration with Git, Docker, and Developer Tools

Generate Code Snippets Using Prompts and Save Directly to Desired Locations

🚧 Development Status
PromptShell is currently in alpha stage of development.
Known Limitations:
- Ollama models may hallucinate and produce inaccurate responses.
- Some API providers may have rate limits or require paid plans.
Roadmap:
- [x] Local LLM support
- [x] Interactive configuration setup
- [x] Improve command execution safety measures
- [x] Add support for user-defined command aliases
- [ ] Implement speech input support
- [ ] Expand model compatibility (e.g., fine-tuned small-scale models)
🤝 Contributing
We welcome contributions! Here's how to help:
- Fork the repository.
- Create a branch:
git checkout -b feature/your-idea. - Commit changes:
git commit -m "Add your feature". - Push to the branch:
git push origin feature/your-idea. - Open a pull request.
📜 License
This project is licensed under the Apache 2.0 License. See LICENSE for details.
📧 Contact
- Built by Kirti Rathi
- Email: kirtirathi282@gmail.com
Note:<br/> Always verify commands before execution.<br/> Use at your own risk with critical operations.<br/> This project is not affiliated with any API or model providers.<br/> Local models require adequate system resources.<br/> Internet is required for API mode.<br/>
Related Skills
gortex
1.1kHigh-performance code-intelligence engine for AI agents and IDE, supports 257 languages, multi repositories, based on graph, with access via CLI, MCP Server, and API. AI coding agents teammate - expose only needed information, cutting token usage up to 50x. 100% local.
techrogue
TechRogue – Roguelike technical quiz for engineers. Usage: /techrogue | /techrogue build | /techrogue settings
cc-switch
125.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
cc-switch
125.6kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
