cd /news/ai-tools/a-ghost-in-the-terminal-code-assassi… · home › topics › ai-tools › article
[ARTICLE · art-161859] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

A Ghost in the Terminal: Code Assassin

A developer built Code Assassin, a voice-driven coding assistant that runs entirely in the terminal on local open-weight models, pairing Qwen 2.5 Coder 3B via Ollama with Piper neural text-to-speech. The tool adds a custom streaming fence protocol for tool calls after native Ollama function calling proved unreliable with the small model, auto-approves only pytest, ruff and lint commands, and confines edits with backups and path restrictions. The developer notes the 3B model edits reliably only when given file contents and otherwise hallucinates existing lines.

by read3 min views1 publishedNov 1, 2026

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

This submission is technically a day late, but in the true spirit of Halloween, nothing stays dead forever. Better late than never.

Code Assassin is a speaking, voice-driven coding assistant that runs entirely in your terminal. It started as a workaround: I was building something else and needed text-to-speech, so I piped model output through a local TTS voice. Then I realized the same setup could be useful if the assistant had real access to my environment.

Because it runs locally next to my files, I can give it permission to review, rewrite, and test code and get work done without leaving the terminal or installing an extension. My workspace shrinks to a file directory and one open terminal.

It also has a personality. The system prompt gives the agent a blunt voice, so its commentary and feedback on my code is actually easy to listen to.

Before, Code Assassin was a "chat wrapper":

user input → context builder (injects @file, --file, --diff context that the *user* selects manually) → Ollama /api/chat streaming → parser splits <speak>/<detail> + fenced code blocks → editor applies fenced diffs with safety (backup, path confinement, no shell)

What I added:

pytest, ruff, and lint are auto-approved; everything else requires explicit user confirmation (or --allow-run). Nothing runs silently. tool type=read path=... fences parsed by an incremental streaming state machine. I tried native Ollama function calling first, but qwen2.5-coder:3b drifts on it; a custom fence protocol is reliable enough for a small model to actually use tools.127.0.0.1:11434) and ollama pull qwen2.5-coder:3b pip install -e ., and make sure assassin is on your global PATHassassin doctor to check the backend, then | Command | What it does | |---|---| | assassin | Interactive voice session | | assassin ask "prompt" | One-shot query | | assassin doctor | Health checks | | assassin voices list | Curated + local TTS voices | | assassin bench | Latency/VRAM benchmark | | --file ,--diff ,--staged | Context injection | | /task ,/voice ,/edits ,/undo ,/status ,/run | Slash commands |

qwen2.5-coder:3b edits reliably only when it can see the file contents (/file or --file). Without context, it hallucinates the current lines. Code Assassin is built entirely around local, open-weight AI:

en_GB-alan-medium) is a local neural TTS, so even audio is generated on-device.ToolExecutor for read/ list/ glob/` g Terminal voice-driven coding assistant powered by local Qwen 2.5 Coder 3B and Piper TTS.

uv

graph TD
    A[CLI] --> B[Context]
    B --> D[Ollama]
    D --> E[Parser]
    E --> F[Piper]
    E --> H[Terminal]
    I[Editor] --> J[Backups]
    B --> K[Memory]
cd D:\Projects
uv clone https://github.com/Kilo-Org/Code-Assassin Code-Assassin
cd Code-Assassin
powershell scripts\setup.ps1

powershell scripts\setup.ps1 -ProjectName "qwen2.5-coder:3b"

… ⚠️ AI Code Editing Disclaimer

Code Assassin can autonomously read, patch, and refactor code, but it relies heavily on the capabilities of the underlying model. Because it currently defaults to lightweight local weights (qwen2.5-coder:3b), there are some limitations.

── more in #ai-tools 4 stories · sorted by recency
── more on @code assassin 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/a-ghost-in-the-termi…] indexed:0 read:3min 2026-11-01 · —