{"slug": "a-ghost-in-the-terminal-code-assassin", "title": "A Ghost in the Terminal: Code Assassin", "summary": "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.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine](https://dev.to/challenges/hacktoberfest-week4-2026-10-26)*\n\n*This submission is technically a day late, but in the true spirit of Halloween, nothing stays dead forever. Better late than never.*\n\nCode 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.\n\nBecause 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.\n\nIt 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.\n\nBefore, Code Assassin was a \"chat wrapper\":\n\n`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)`\n\nWhat I added:\n\n`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`\n`pip install -e .`, and make sure `assassin` is on your global PATH`assassin doctor` to check the backend, then | Command | What it does | \n|---|---|\n| `assassin` | Interactive voice session | \n| `assassin ask \"prompt\"` | One-shot query | \n| `assassin doctor` | Health checks | \n| `assassin voices list` | Curated + local TTS voices | \n| `assassin bench` | Latency/VRAM benchmark | \n| `--file` ,`--diff` ,`--staged` | Context injection | \n| `/task` ,`/voice` ,`/edits` ,`/undo` ,`/status` ,`/run` | Slash commands | \n\n`qwen2.5-coder:3b` edits reliably only when it can see the file contents (`/file` or `--file`). Without context, it hallucinates the current lines.\nCode Assassin is built entirely around local, open-weight AI:\n\n`en_GB-alan-medium`) is a local neural TTS, so even audio is generated on-device.`ToolExecutor` for `read`/` list`/` glob`/` g\nTerminal voice-driven coding assistant powered by local Qwen 2.5 Coder 3B and Piper TTS.\n\n`uv`\n\n``` php\ngraph TD\n    A[CLI] --> B[Context]\n    B --> D[Ollama]\n    D --> E[Parser]\n    E --> F[Piper]\n    E --> H[Terminal]\n    I[Editor] --> J[Backups]\n    B --> K[Memory]\n# Clone and setup\ncd D:\\Projects\nuv clone https://github.com/Kilo-Org/Code-Assassin Code-Assassin\ncd Code-Assassin\n# Setup with default values\npowershell scripts\\setup.ps1\n\n# Or setup with custom options\npowershell scripts\\setup.ps1 -ProjectName \"qwen2.5-coder:3b\"\n```\n\n…\n⚠️ AI Code Editing Disclaimer\n\nCode 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.", "url": "https://wpnews.pro/news/a-ghost-in-the-terminal-code-assassin", "canonical_source": "https://dev.to/nadinev/a-ghost-in-the-terminal-code-assassin-1njh", "published_at": "2026-11-01 05:12:55+00:00", "updated_at": "2026-11-01 05:22:06.576649+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "large-language-models", "ai-products"], "entities": ["Code Assassin", "Ollama", "Qwen 2.5 Coder 3B", "Piper", "Kilo-Org", "Hacktoberfest"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/a-ghost-in-the-terminal-code-assassin", "markdown": "https://wpnews.pro/news/a-ghost-in-the-terminal-code-assassin.md", "text": "https://wpnews.pro/news/a-ghost-in-the-terminal-code-assassin.txt", "jsonld": "https://wpnews.pro/news/a-ghost-in-the-terminal-code-assassin.jsonld"}}