Skip to main content

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

  1. Python 3.8+
  2. 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

  1. Start Ollama:

    ollama serve
    
  2. Pull a model (if you don't have one):

    ollama pull deepcoder    # Reasoning model (recommended)
    # or
    ollama pull llama3.2     # Fast general model
    
  3. Run VibeBash:

    vibebash "list all Python files in this directory"
    
  4. 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

  1. Input: You provide a natural language description
  2. Processing: Local Ollama model converts it to shell commands
  3. Validation: VibeBash checks command availability
  4. Review: You can approve, modify, or skip each command
  5. Execution: Commands run in your local shell
  6. 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

  1. Fork the repository
  2. Create a feature branch
  3. Run tests: make test-ollama
  4. Submit a pull request

📜 License

MIT License - see LICENSE file.

🔗 Links


VibeBash: Because your shell should understand you, not the other way around. 🎯

Metadata

Release files for vibebash 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vibebash 1.0.1
File Size Uploaded
vibebash-1.0.1.tar.gz 23.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vibebash 1.0.1
File Interpreter ABI Platform
vibebash-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 36.9 kB

Release files / vibebash-1.0.1.tar.gz

Download URL vibebash-1.0.1.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
25a1351b24c603216accfb50f1147df2f2bc01fd07844bbb9178c5d46c7af325
BLAKE2b-256 checksum
How to use checksums
9e7b705ae62e9b6ef308ab2dbf72fdc1320504a1afd89aed119a9a91aff6f04f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / vibebash-1.0.1-py3-none-any.whl

Download URL vibebash-1.0.1-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d19359694540f783266c0d2bc8c598005cd16515883f438090bafc54c6ea3f8
BLAKE2b-256 checksum
How to use checksums
96dd6cc6a44431543b1d6aab925773e69201ccfa94b10d32e6e6f07484a695ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page