https://github.com/hathibelagal-dev/llamashell
A powerful shell that's powered by a locally running LLM (ideally Llama 3.x or Qwen 2.5)
https://github.com/hathibelagal-dev/llamashell
agentic-ai cli llama llm-integration localllama localllm shell terminal-based transformers
Last synced: 4 months ago
JSON representation
A powerful shell that's powered by a locally running LLM (ideally Llama 3.x or Qwen 2.5)
- Host: GitHub
- URL: https://github.com/hathibelagal-dev/llamashell
- Owner: hathibelagal-dev
- License: gpl-3.0
- Created: 2025-04-16T05:58:09.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-18T23:53:59.000Z (about 1 year ago)
- Last Synced: 2025-11-29T12:17:52.086Z (7 months ago)
- Topics: agentic-ai, cli, llama, llm-integration, localllama, localllm, shell, terminal-based, transformers
- Language: Python
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# llamashell





**llamashell** is a powerful shell that's powered by a locally running LLM. We have tested it with Llama 3.2, Qwen 2.5, and Gemma 3.
## Features
- **Interactive Shell**: Execute standard shell commands like `cd`, `ls`, and more, with support for pipes (`|`), input redirection (`<`), and output redirection (`>` or `>>`).
- **LLM Integration**: Interact with an LLM (default: `meta-llama/Llama-3.2-1B-Instruct`) for assistance using the `--` prefix (e.g., `-- write me an inspirational quote`).
- **Command History**: Persistent command history stored in `~/.llamashell_history`.
- **Chat Log Management**: Save and view LLM conversation logs with commands like `--save-chat-logs` and `--view-chat-logs`.
- **File Operations**: Read files into the LLM context with `--read ` and save individual LLM responses with `--save `.
- **Auto-Completion**: Basic command and file auto-completion for a smoother user experience.
- **Cross-Platform**: Supports GPU acceleration (CUDA/MPS) and CPU fallback for broad compatibility.
## Installation
```bash
pip3 install llamashell
```
### Prerequisites
- Python 3.11+
- Linux or MacOS
## Usage
```bash
llamashell
```
You can provide any instruct LLM you can find on hugging face. For example:
```bash
llamashell --model "Qwen/Qwen2.5-0.5B-Instruct"
```
or
```bash
llamashell --model "google/gemma-3-1b-it"
```
### Special Commands
- `-- `: Send a message to the LLM.
- `--save-chat-logs`: Save the entire LLM conversation to a file.
- `--save [filename]`: Save the last LLM response to a file.
- `--view-chat-logs`: Display the LLM conversation history.
- `--read `: Read a file and add its contents to the LLM context.
- `--clear`: Reset the LLM chat session.
- `history`: Show the shell command history.
- `exit`, `quit`, `bye`: Exit the shell.