DOOM — Terminal Command Generator
A fine-tuned Qwen2.5-Coder-1.5B that translates natural-language requests into macOS terminal commands.
Want to use this model? Check out the CLI: Ahmad170412/DoomCLI
What It Does
You type what you want in plain English. The model outputs exactly one zsh command + a short explanation.
| You say | Model generates |
|---|---|
| "how much ram does this mac have" | sysctl hw.memsize |
| "create 50 folders named project-01 through 50" | mkdir -p project-{01..50} |
| "add my deepseek api key to zshrc" | echo 'export DEEPSEEK_API_KEY="sk-…"' >> ~/.zshrc |
| "which ports does ssh have open" | lsof -iTCP -sTCP:LISTEN -P | grep sshd |
| "delete all .o files recursively" | find . -name "*.o" -delete |
| "zip up this folder" | zip -r archive.zip . |
Usage
from mlx_lm import load, generate
# Load base model + adapter
model, tokenizer = load(
"mlx-community/Qwen2.5-Coder-1.5B-Instruct-4bit",
adapter_path="adapter"
)
messages = [
{"role": "system", "content": "You are Doom, a macOS terminal assistant. Output exactly one zsh command wrapped in ```zsh code fences, followed by a one-line explanation."},
{"role": "user", "content": "how much ram does this mac have"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
response = generate(model, tokenizer, prompt=prompt, max_tokens=256)
print(response)
Architecture
- Base:
Qwen2.5-Coder-1.5B-Instruct(4-bit quantized) - Method: QLoRA (rank 8, alpha 16, 8 layers)
- Training: MLX on Apple Silicon
Training Data
3,200 hand-crafted samples across 7 categories:
| Category | Samples |
|---|---|
| system_info | ~500 |
| file_ops | ~500 |
| config_edits | ~500 |
| process_ports | ~400 |
| search_inspect | ~400 |
| archive | ~400 |
| permissions | ~400 |
Each sample is a chat-format conversation with system context (OS version, shell, cwd).
Evaluation
Evaluated on 319 held-out prompts:
| Metric | Base Qwen 1.5B | DOOM |
|---|---|---|
| Combined correct | 25% | 50% |
| Exact string match | 19% | 38% |
| Format violations | 38 | 0 |
Limitations
- macOS only — trained on macOS commands (
sysctl,lsof,sw_vers) - 50% accuracy — common cases work well, edge cases need the edit flow
- One command only — no
&&,;, or multi-step workflows - No context — only knows cwd, OS version, and shell
License
MIT