Skip to main content

Convert natural language into safe Terminal commands using Ollama.

Project description

Ollash

Ollash is a lightweight, extensible command-line tool that transforms natural language instructions into safe, valid shell commands. It also offers an interactive terminal shell and local codebase querying—all powered entirely by local models. Ollash is designed to run securely, privately, and offline, leveraging your local computing resources for fast, intelligent command generation.

The project bundles:

  • An NL2Bash engine using local large language models (via Ollama), automatically installed and launched as needed
  • An interactive REPL shell interface with persistent model context
  • A codebase question-answering system using interro, enabling semantic understanding of local source code

All session state, configuration, and cache are stored within a .ollash folder for continuity across runs.


Project Architecture

Ollash includes the following components:

  1. Natural Language to Shell Command Generator

    • Converts English prompts to safe Bash commands
    • Uses your selected LLM (e.g., llama3, qwen, gemma) via Ollama backend
    • Automatically ensures Ollama is installed, models are pulled, and the backend is ready
  2. Interactive Shell (ollash shell)

    • A stateful terminal where each prompt builds on the previous context
    • Provides a REPL interface for hands-free shell navigation
    • Model is loaded and unloaded on session start and exit
  3. Codebase Q&A (ollash ask)

    • Integrates with interro to semantically query your local code

    • Supports both LLM-based explanations and retrieval-only search

    • Useful for onboarding, code understanding, or quick debugging

    • All temporary and persistent state is handled automatically


Installation

For better UI experience we recommend using figlet and fzf

sudo apt install figlet fzf

Cross-Platform Support for Linux and MacOS, currently experimental for Windows

pip install ollash

Dependencies like Ollama and Interro are invoked internally; the tool verifies their presence and offers installation guidance if missing.


Usage

One-Shot Command

ollash ind all PDF files larger than 10MB and archive them

This runs a single prompt through your local model and prints the resulting shell command to stdout.


Interactive Shell

ollash shell 

Launches a full REPL interface where each command can access past context. Model is automatically loaded after an interactive selection screen using Ollama on startup and unloaded on exit.


Ask About Your Codebase

ollash ask "Where is the user authentication logic?" --path ./src --no-llm

You can also enable LLM explanations:

ollash ask "Explain how login works" --path ./src

Options:

  • --path: Folder containing codebase to index (default: .)
  • --no-llm: Disables language model and uses semantic retrieval only
  • --config: Provide custom Interro config if needed

CLI Overview

usage: ollash [shell|run|ask] [options]

Commands:
  shell         Start interactive REPL shell
  run           One-shot shell command from natural language
  ask           Ask questions about your codebase using Interro

Options:
  --model       Model to use (default from config)
  --autostop    Max token limit before cutting off output (run mode)
  --path        Codebase root directory (ask mode)
  --no-llm      Disable LLM responses for ask (retrieval-only)
  --config      Path to interro config YAML (optional)

License

MIT License © 2025 Team Ollash

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ollash-1.0.2.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ollash-1.0.2-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file ollash-1.0.2.tar.gz.

File metadata

  • Download URL: ollash-1.0.2.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for ollash-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c1cc0dff79474f42a3b9c1878f5b796fd510a4823f881de8651d1baa376f169b
MD5 785eef8ae09cf1865169b5142cabdefa
BLAKE2b-256 65a4e40cf17806c87a7e7a45dddeef65eab567c4e6a749b4e95a34b58541adce

See more details on using hashes here.

File details

Details for the file ollash-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: ollash-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for ollash-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b953cf2a0bdc02213ea91cab5c79d5314d186e8ae1117b840a6a381a1057aa28
MD5 d931890ca0a8038ca739931c1ed50cc3
BLAKE2b-256 8b4176dce31ee976684a0e519a9f16e5bdc42b66bc260171326c784b326a1c41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page