# A Ghost in the Terminal: Code Assassin

> Source: <https://dev.to/nadinev/a-ghost-in-the-terminal-code-assassin-1njh>
> Published: 2026-11-01 05:12:55+00:00

*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)*

*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 PATH`assassin 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`

``` php
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]
# Clone and setup
cd D:\Projects
uv clone https://github.com/Kilo-Org/Code-Assassin Code-Assassin
cd Code-Assassin
# Setup with default values
powershell scripts\setup.ps1

# Or setup with custom options
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.
