Instructions to use josharsh/harshell with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use josharsh/harshell with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf josharsh/harshell:Q8_0 # Run inference directly in the terminal: llama cli -hf josharsh/harshell:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf josharsh/harshell:Q8_0 # Run inference directly in the terminal: llama cli -hf josharsh/harshell:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf josharsh/harshell:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf josharsh/harshell:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf josharsh/harshell:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf josharsh/harshell:Q8_0
Use Docker
docker model run hf.co/josharsh/harshell:Q8_0
- LM Studio
- Jan
- vLLM
How to use josharsh/harshell with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "josharsh/harshell" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "josharsh/harshell", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/josharsh/harshell:Q8_0
- Ollama
How to use josharsh/harshell with Ollama:
ollama run hf.co/josharsh/harshell:Q8_0
- Unsloth Studio
How to use josharsh/harshell with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for josharsh/harshell to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for josharsh/harshell to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for josharsh/harshell to start chatting
- Pi
How to use josharsh/harshell with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf josharsh/harshell:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "josharsh/harshell:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use josharsh/harshell with Docker Model Runner:
docker model run hf.co/josharsh/harshell:Q8_0
- Lemonade
How to use josharsh/harshell with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull josharsh/harshell:Q8_0
Run and chat with the model
lemonade run user.harshell-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use josharsh/harshell with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf josharsh/harshell:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default josharsh/harshell:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use josharsh/harshell with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf josharsh/harshell:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "josharsh/harshell:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: gguf
|
| 6 |
+
tags:
|
| 7 |
+
- gguf
|
| 8 |
+
- shell
|
| 9 |
+
- macos
|
| 10 |
+
- terminal
|
| 11 |
+
- command-line
|
| 12 |
+
- qwen2
|
| 13 |
+
- lora
|
| 14 |
+
- ollama
|
| 15 |
+
base_model: Qwen/Qwen2.5-1.5B
|
| 16 |
+
model_name: harshell
|
| 17 |
+
pipeline_tag: text-generation
|
| 18 |
+
quantized_by: josharsh
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Harshell - Natural Language to macOS Shell Commands
|
| 22 |
+
|
| 23 |
+
**Harshell** is a fine-tuned Qwen 2.5 1.5B model that converts natural language into macOS shell commands. It returns only the command — no explanations, no markdown, just the shell command you need.
|
| 24 |
+
|
| 25 |
+
## Model Details
|
| 26 |
+
|
| 27 |
+
| Property | Value |
|
| 28 |
+
|---|---|
|
| 29 |
+
| Base Model | Qwen 2.5 1.5B |
|
| 30 |
+
| Fine-tuning | LoRA (rank 8, 1000 iterations) |
|
| 31 |
+
| Quantization | Q8_0 GGUF |
|
| 32 |
+
| File Size | ~1.5 GB |
|
| 33 |
+
| License | Apache 2.0 |
|
| 34 |
+
|
| 35 |
+
## Quick Start with Ollama
|
| 36 |
+
|
| 37 |
+
1. Download the GGUF and Modelfile from this repo
|
| 38 |
+
2. Create the model:
|
| 39 |
+
```bash
|
| 40 |
+
ollama create harshell -f Modelfile
|
| 41 |
+
```
|
| 42 |
+
3. Run it:
|
| 43 |
+
```bash
|
| 44 |
+
ollama run harshell "list all pdf files in my downloads folder"
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
### Example Usage
|
| 48 |
+
|
| 49 |
+
| Input | Output |
|
| 50 |
+
|---|---|
|
| 51 |
+
| list all pdf files in downloads | `find ~/Downloads -name "*.pdf"` |
|
| 52 |
+
| show disk usage of current folder | `du -sh .` |
|
| 53 |
+
| kill the process on port 3000 | `lsof -ti:3000 \| xargs kill` |
|
| 54 |
+
| compress this folder into a zip | `zip -r archive.zip .` |
|
| 55 |
+
| show my ip address | `ifconfig \| grep "inet " \| grep -v 127.0.0.1` |
|
| 56 |
+
|
| 57 |
+
## System Prompt
|
| 58 |
+
|
| 59 |
+
The model uses this system prompt:
|
| 60 |
+
|
| 61 |
+
> You are a macOS terminal assistant. Convert natural language into safe shell commands. Return only the command, nothing else.
|
| 62 |
+
|
| 63 |
+
## Ollama Modelfile
|
| 64 |
+
|
| 65 |
+
The included `Modelfile` configures:
|
| 66 |
+
- **Temperature**: 0.3 (low for deterministic command output)
|
| 67 |
+
- **Top-p**: 0.9
|
| 68 |
+
- **Max tokens**: 128
|
| 69 |
+
- **Chat template**: ChatML format (`<|im_start|>` / `<|im_end|>`)
|
| 70 |
+
|
| 71 |
+
## Training Details
|
| 72 |
+
|
| 73 |
+
- **Method**: LoRA (Low-Rank Adaptation)
|
| 74 |
+
- **LoRA Rank**: 8
|
| 75 |
+
- **Training iterations**: 1000
|
| 76 |
+
- **Base model**: Qwen/Qwen2.5-1.5B
|
| 77 |
+
- **Dataset**: Curated natural language → macOS shell command pairs
|
| 78 |
+
- **Quantization**: Converted to GGUF Q8_0 using llama.cpp
|
| 79 |
+
|
| 80 |
+
## Files
|
| 81 |
+
|
| 82 |
+
- `harsh-shell-q8_0.gguf` — The quantized model (Q8_0, ~1.5GB)
|
| 83 |
+
- `Modelfile` — Ollama configuration file
|
| 84 |
+
|
| 85 |
+
## Limitations
|
| 86 |
+
|
| 87 |
+
- Optimized for **macOS** commands; Linux/Windows commands may be less accurate
|
| 88 |
+
- Best for single-line commands; complex multi-line scripts may not generate correctly
|
| 89 |
+
- Always review generated commands before running them, especially destructive operations (`rm`, `mv`, etc.)
|