Natural language to shell commands with AI - Interactive CLI tool
Project description
VibeBash - Offline AI Shell Assistant
VibeBash is a completely offline natural language to shell command translator powered by local AI models through Ollama. No API keys, no internet connection required - everything runs locally on your machine.
๐ Features
- ๐ 100% Offline: All processing happens locally via Ollama
- ๐ค AI-Powered: Convert natural language to shell commands
- ๐ Fast: Local models mean no network latency
- ๐ Private: Your commands never leave your machine
- ๐ฏ Accurate: Supports reasoning models like deepcoder
- โก Interactive: Review, modify, or skip commands before execution
- ๐ Smart History: Learn from previous command patterns
- ๐ ๏ธ Command Validation: Checks command availability and provides installation hints
๐ฏ Supported Models
VibeBash works with any Ollama-compatible model:
- deepcoder - Reasoning model with think tokens (recommended)
- llama3.2 - Fast and capable general model
- codellama - Code-focused model
- mistral - Efficient and accurate
- gemma - Google's lightweight model
๐ฆ Installation
Requirements
- Python 3.8+
- Ollama - Install from ollama.ai
Quick Install with pipx (Recommended)
pipx install vibebash
Install from Source
git clone https://github.com/yourusername/vibebash.git
cd vibebash
pip install -e .
Development Setup
./scripts/setup-dev.sh
๐ Quick Start
-
Start Ollama:
ollama serve -
Pull a model (if you don't have one):
ollama pull deepcoder # Reasoning model (recommended) # or ollama pull llama3.2 # Fast general model
-
Run VibeBash:
vibebash "list all Python files in this directory"
-
First time setup - VibeBash will ask for:
- Ollama base URL (default: http://localhost:11434)
- Default model name (e.g., deepcoder, llama3.2)
๐ก Usage Examples
Basic Commands
vibebash "show disk usage"
vibebash "find large files over 100MB"
vibebash "kill process on port 8080"
With Specific Models
vibebash --model-name deepcoder "optimize this Python script"
vibebash --model-name llama3.2 "compress all images in this folder"
Interactive Mode
vibebash
# Then type your request when prompted
View History
vibebash --history
Reconfigure
vibebash --config
๐ง Configuration
VibeBash stores configuration in ~/.vibebash_config.json:
{
"ollama_base_url": "http://localhost:11434",
"default_model_name": "deepcoder"
}
Custom Ollama Setup
If running Ollama on a different host or port:
vibebash --config
# Enter custom URL like: http://my-server:11434
๐งช Testing
Run All Tests
make test-ollama
Quick Core Tests
python3 -m pytest tests/unit/test_models.py tests/unit/test_command_availability.py -v
Test with Your Model
make test-deepcoder # Test with deepcoder model
๐ Project Structure
vibebash/
โโโ vibebash/ # Main package
โ โโโ main.py # Core VibeBash class
โ โโโ __init__.py # Package initialization
โโโ tests/ # Test suite
โ โโโ unit/ # Unit tests
โ โโโ integration/ # Integration tests
โโโ scripts/ # Setup and utility scripts
โ โโโ quick-start.sh # Quick setup
โ โโโ setup-dev.sh # Development setup
โโโ docs/ # Documentation
๐ ๏ธ Development
Setup Development Environment
./scripts/setup-dev.sh
Run Tests
make test # All tests
make test-unit # Unit tests only
make coverage # With coverage report
Code Quality
make lint # Linting
make format # Code formatting
make type-check # Type checking
Build Package
make build
๐ค Model Recommendations
For Reasoning Tasks (Recommended)
- deepcoder: Best for complex command generation with step-by-step thinking
- codellama: Good for code-related tasks
For Speed
- llama3.2: Fast and lightweight, good balance of speed and accuracy
- gemma: Very fast, good for simple commands
Memory Usage
- Small models: llama3.2 (3B), gemma (2B-7B)
- Large models: deepcoder (14B), codellama (13B+)
๐ How It Works
- Input: You provide a natural language description
- Processing: Local Ollama model converts it to shell commands
- Validation: VibeBash checks command availability
- Review: You can approve, modify, or skip each command
- Execution: Commands run in your local shell
- Learning: History helps improve future suggestions
๐ก๏ธ Privacy & Security
- No Data Transmission: Everything stays on your machine
- No API Keys: No external services required
- Command Review: You control what gets executed
- Safe Defaults: Built-in protections against dangerous commands
๐ Advanced Usage
Custom Prompts
VibeBash includes system context about your environment:
- Current directory
- Available commands
- Operating system
- Recent command history
Batch Operations
vibebash "create backup of all config files and compress them"
vibebash "find and remove all temporary files older than 7 days"
Error Recovery
When commands fail, VibeBash can suggest alternatives:
vibebash "install package X"
# If package manager not found, suggests alternatives for your OS
๐ค Contributing
- Fork the repository
- Create a feature branch
- Run tests:
make test-ollama - Submit a pull request
๐ License
MIT License - see LICENSE file.
๐ Links
- Ollama: https://ollama.ai
- Models: https://ollama.ai/library
- Issues: https://github.com/yourusername/vibebash/issues
VibeBash: Because your shell should understand you, not the other way around. ๐ฏ
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 vibebash-1.0.1.tar.gz.
File metadata
- Download URL: vibebash-1.0.1.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25a1351b24c603216accfb50f1147df2f2bc01fd07844bbb9178c5d46c7af325
|
|
| MD5 |
ad8cd10aa590f591901eb86a3158b33f
|
|
| BLAKE2b-256 |
9e7b705ae62e9b6ef308ab2dbf72fdc1320504a1afd89aed119a9a91aff6f04f
|
File details
Details for the file vibebash-1.0.1-py3-none-any.whl.
File metadata
- Download URL: vibebash-1.0.1-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d19359694540f783266c0d2bc8c598005cd16515883f438090bafc54c6ea3f8
|
|
| MD5 |
499a43a15cff4c7755811f53d70c4bed
|
|
| BLAKE2b-256 |
96dd6cc6a44431543b1d6aab925773e69201ccfa94b10d32e6e6f07484a695ae
|