File size: 13,614 Bytes
0c23f4c 00957df 0c23f4c 912afe7 064bfd6 afbc7ed c17e1b4 912afe7 c17e1b4 648fa4b f212f8b 6256827 1f1f955 d7e83a1 2e2419b df64d6e 78702e5 8c87e19 648fa4b 96f34e3 648fa4b 96f34e3 648fa4b 96f34e3 648fa4b 064bfd6 c17e1b4 0c23f4c 064bfd6 c17e1b4 0c23f4c e2b4db9 d092f6f 96f34e3 064bfd6 772a712 648fa4b 28d3e1a 648fa4b 7f4aa7a 28d3e1a 190236a c376933 190236a 648fa4b a3acd97 190236a 648fa4b a3acd97 3fa929f 52c09f9 3fa929f 190236a 648fa4b 1c67f7b de6d9e9 38c9372 de6d9e9 1c67f7b 648fa4b d092f6f 064bfd6 7f4aa7a 648fa4b a47504b c17e1b4 064bfd6 c17e1b4 d092f6f 648fa4b 96f34e3 d092f6f c17e1b4 648fa4b 064bfd6 c17e1b4 064bfd6 c17e1b4 d092f6f 648fa4b c17e1b4 064bfd6 8c87e19 1ef6a2f 089ea28 1ef6a2f 8c87e19 2cca3b7 25861df 925af11 52c09f9 2cca3b7 1caee20 2cca3b7 8c87e19 648fa4b d092f6f f212f8b a3acd97 9086e0a a47504b 8c87e19 648fa4b a3acd97 e6f7e9a a3acd97 e6f7e9a a3acd97 8c87e19 a47504b 3949ea6 648fa4b 3949ea6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | ---
language: en
library_name: codev
tags:
- code-assistant
- terminal
- ai
---
# Codev: Co-Dev with AI via Terminal




<div align="center">
<img src="assets/ctx_auto_compose/ctx_line.png" alt="Codev" width="80%">
</div>
## π’ News
- **2026-07-08** πΌοΈ Image Search & Render Hardening β WebSearchTool now exposes an explicit `search_images` flag that routes to SearXNG while Tavily handles general search; ImageShowTool downloads URLs to temp files and passes them to timg by path, fixes kitty protocol concurrency corruption (in-band sequences are now non-concurrent), and computes dimensions from terminal height with aspect-ratio-aware width.
- **2026-07-04** πΌοΈ Inline Terminal Images β Native Kitty graphics protocol rendering via timg; WebSearch, WebFetch, and LocationTool results now display inline images directly in the TUI with cursor-safe hide/show and dynamic row layout.
- **2026-07-01** πΊοΈ LocationTool unlimited search β Amap places search now paginates (1000/page, up to 10000 results); Google Places uses `next_page_token` (up to 60); photo limits removed.
- **2026-06-22** π Groq Whisper STT β CLI `/voice` now uses Groq Whisper API (cloud whisper-large-v3, no Python needed) and `node-edge-tts` for TTS, matching Friend's stack.
- **2026-06-21** ποΈ Groq Free STT β Friend voice input now supports Groq Whisper API as STT provider; TypeScript-only, no Python subprocess required.
- **2026-06-21** π₯οΈ Friend Desktop β `/friend start` launches a Tauri desktop VRM companion app with full-screen mode, real-time TTS/STT, and inter-process communication.
- **2026-06-21** π€ Microphone Fix β Resolved Microphone access denied in WebKitGTK; switched to arecord/parecord subprocess audio capture.
- **2026-06-20** π€ /friend Command β In-process VRM companion service: SSE broadcast, voice capture (push-to-talk + streaming), Edge TTS / Qwen TTS, and persona generation from VRM screenshot.
- **2026-06-19** π /release-notes β New command to display version release notes and what's new.
- **2026-06-15** π― Goal Tracking β New `/goal` command with prompt input footsider and lastline display for real-time goal tracking.
- **2026-06-15** πΌοΈ WebSearch Image Preview β WebSearch markdown now displays inline image links natively.
- **2026-06-15** π Feishu Voice β Feishu integration now supports both VoxCPM and Edge-TTS voice synthesis.
- **2026-06-15** π Feishu Markdown β Feishu bot messages render with full markdown styling.
- **2026-06-15** π€ Feishu Connect β New Feishu (ι£δΉ¦) bot integration with message relay and voice TTS.
- **2026-06-14** π± Desktop Provider Sync β Desktop now syncs provider config from TUI; model list uses sidecar proxy to avoid CORS.
- **2026-06-14** π‘οΈ NVIDIA Sidecar Fix β Use sidecar for NVIDIA, direct fetch for OpenRouter/OpenCode.
- **2026-06-13** π£οΈ Voice CN/TW β Added Chinese (zh-CN) and Taiwanese (zh-TW) voice support for TTS.
- **2026-06-02** π€ Agent Team β Multi-agent collaboration via Tmux backend with teammate layout manager, dynamic team scaling, and spawn utilities for coordinated task execution.
- **2026-06-01** π§© SubAgent Swarm Topology β Dedicated Explore π, Plan π, and Verification π§ͺ subagents for autonomous multi-step task decomposition and execution.
- **2026-05-25** π€ AI Friend on Desktop β Companion mode with `real-time audio/video`, avatar & background image upload, edge glow effect on transcript, and localStorage persistence.
- **2026-05-25** π₯οΈ Desktop app launched β Tauri-based native UI with sidebar, tabs, title bar, and session management. Subagent inherits parent class config. Branding updated to Versper AI.
- **2026-05-23** π§ Added OpenCode Zen Provider β a new model provider for calm, focused AI interactions.
- **2026-05-22** π§ Fixed OpenCode login flow and refined prompt identity for clearer agent behavior.
- **2026-05-08** π Fixed model list not refreshing after `/login` opencode freemodel exit; subagent creation now works without API key in free mode.
- **2026-05-06** π Added OpenCode as a free provider β includes GPT-5 Nano and Big Pickle π₯ models, `/model` list with life-free model display, and auto-refresh. Introduced ctx_line context tracking with online persistence. Better collapsing fetch results and auto-compact documentation polish. Merged PR #6 for Tavily search backend migration.
- **2026-04-30** π Added Tavily as optional search backend in WebSearchTool via PR #6.
- **2026-04-24** π§Ή Cleaned up empty contributor docs.
- **2026-04-21** π‘οΈ Fixed auto-compact env in settings.json; Codev now handles Ctrl+C resume gracefully.
- **2026-04-20** π Documented ToolSearch behavior and <tr> table formatting.
- **2026-04-19** π Described auto-dream and subagent features in README; punctuation and layout polish. Tagged **v2.0.1** π·οΈ.
- **2026-04-18** π Snapshot auto-dream feature; ToolSearch now uses WebSearch under the hood.
- **2026-04-15** π Auto Dream β AI autonomously reflects and builds internal memory. Fixed chatId overflow by migrating from Number to String.
- **2026-04-13** π§ All tools allowed in auto mode without classifier; auto-compact triggers on context size exceeded; ToolSearch enabled by default for all providers; OpenRouter full model loading. Tagged **v2.0.0** π·οΈ.
- **2026-04-12** β‘ Live refresh typing status; WebFetch now supports shouldDefer for lazy loading; symbol links documented as usable everywhere.
- **2026-04-09** π¨ Major README overhaul β VersperAI branding with Banner & Logo, tabular layout, websearch/webfetch documentation, TypeScript main branch vs Python legacy explained. Tagged **v2.0.0** π·οΈ.
- **2026-04-08** π Full WebSearch toolchain β SearXNG integration, Jina AI websearch & fetch, WebFetch UI notes, build fix. Four search approaches landed in one day.
- **2026-04-07** π Zero-search prototype; Python env removed; TLS-enabled web search working end-to-end.
- **2026-04-06** π οΈ Open ripgrep via USE_BUILTIN_RIPGREP=0; WebFetch UI notes; skill message renamed; WebSearch API error fixed.
- **2026-04-05** π€ AutoMode β autonomous decision-making execution mode. `/sandbox` with sandbox-runtime @0.0.44. Project renamed to codev. OpenRouter β Local model switching, auto-refresh TUI, Telegram `/login` local model transition.
- **2026-04-04** π± Telegram backend β `/telegram` command, interactive commands, message receiving in TUI, chatId overflow fixed. `/buddy` companion mode; recent activity in individual directories.
- **2026-04-03** π Reborn as verspercode **v0.1.0** β complete `/login` system (OpenRouter + local models), `/model` search & UI, free OpenRouter model auto-load, onboarding flow. Local model filesystem-based provider.
<details>
<summary>Earlier news</summary>
- **2026-04-01** π§Ή Removed autoresearch, evolve modules, and Cursor scripts β streamlining toward v2. Tagged **v1.0.0** π·οΈ.
- **2026-03-31** π₯οΈ CLI update for better terminal interaction.
- **2026-03-30** π Fixed error type-in when using `/resume` session.
- **2026-03-29** π§ Memory routing β route-runtime-long_term for persistent context. CLI shell split to <10K lines. Browser vision click/control fixes. Paper GIF in README; --paper API call optimization.
- **2026-03-28** π Academic paper pipeline β `/evolve` autonomous evolution, `/compact` context compression, LaTeX paper template, main.pdf compilation. Chrome-based research v1.0.
- **2026-03-27** π¬ Research workflow β `/paper` and `/code` commands, 4-step research + autoresearch, ANN vector index, hybrid retrieval with semantic cache, external memory, token-budgeted evidence pipeline, IncompleteRead retry, long-term index cache. Workflows engine, `/resume` session toggle, CLI UI refresh.
- **2026-03-26** ποΈ Configuration overhaul β YAML β JSON + .env + TOML. Clean config dir.
- **2026-03-24** π Browser control β Chrome DevTools MCP integration, WeChat gateway, Telegram gateway. Setup wizard, README with demo GIF, version menu.
- **2026-03-22** π Initial commit β codev **v0.1.0** born.
</details>
## π¦ Install
```bash
# script install
curl -fsSL https://huggingface.co/chenbhao/codev/raw/main/install.sh | bash
# source install
git clone https://huggingface.co/chenbhao/codev && cd codev && bun install && bun run build && codev
# if want global use bin file
# cp dist/codev ~/.local/bin
ln -sf dist/codev ~/.local/bin/codev
# then can use Codev in everywhere after `/login`
```
### Git LFS & Xet (faster large-file transfer)
Asset files (images, screenshots) are tracked via Git LFS.
Install the **git-xet** custom transfer agent to replace the standard LFS protocol with
Xet's chunk-dedup transport for much faster push/pull:
```bash
curl --proto '=https' --tlsv1.2 -sSf \
https://raw.githubusercontent.com/huggingface/xet-core/refs/heads/main/git_xet/install.sh | sh
git xet install
```
After setup, use normal git workflow β `git-xet` automatically handles LFS objects:
```bash
git lfs pull # download all large files
```
## π Quick Start
> [!IMPORTANT]
> If you no need `auto-compact / dream / control context-window`
> and `websearch` feature. you can no configuration anything
>
> if you no need free `local-websearch` you can skip config `searxng``
> and just set`TAVILY_API_KEY` in env
```bash
# Maximum_Context_Window = min(CLAUDE_CODE_MAX_CONTEXT_TOKENS, CLAUDE_CODE_AUTO_COMPACT_WINDOW) - 20000
# set 200k env in ~/.claude/settings.json or terminal
# the 20k is used to compact as buffer band
# set tool_search env
# set agentteam in tmux
{
"env": {
"USER_TYPE": "ant",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "200000",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "200000",
"ENABLE_TOOL_SEARCH": "true",
"TAVILY_API_KEY": "",
# "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "0", default 1
"teammateMode": "tmux", # or in-process
"groqApiKey": "gsk_" # https://console.groq.com
# map locationtool
"AMAP_API_KEY": "b_",
"GOOGLE_MAPS_API_KEY": "AI_"
}
# set auto-dream config
"autoMemoryEnabled": true,
"autoDreamEnabled": true,
# stt-tts support zh-CN
# TW girl voice
"voiceLanguage": "zh-TW",
"voiceTTSVoice": "zh-TW-HsiaoChenNeural"
# CN girl voice
"voiceLanguage": "zh-CN",
"voiceTTSVoice": "zh-CN-XiaoxiaoNeural"
}
```
```bash
# Config SearXNG
# 1. docker configuration
# local config search engine - searxng in archlinux
# make sure have install docker and docker-compose
sudo pacman -S docker-compose && docker
docker --version && docker compose version
sudo usermod -aG docker $USER
# make sure open pc and now start docker daemon
sudo systemctl enable --now docker
# 2. docker-compose pull
# use VersperSearch a pre-build docker config in https://github.com/chenbhao/VersperSearch
# or install searxng in docker-compose by yourself
curl -fsSL \
-O https://raw.githubusercontent.com/searxng/searxng/master/container/docker-compose.yml \
-O https://raw.githubusercontent.com/searxng/searxng/master/container/.env.example
# add json source in formats behind html - jsonl in 87 lines
cd searxng/core-config/ && sudo nvim settings.yml
# start searxng engine
docker compose up -d
# 3. check search feature
# check in every browser
firefox http://localhost:8080
```
```bash
# test
HTTP_PROXY=http://127.0.0.1:8888 HTTPS_PROXY=http://127.0.0.1:8888 <commands>
mitmproxy -p 8888
```
```bash
# /voice
"voiceTTSVoice": "zh-TW-HsiaoChenNeural",
"voiceLanguage": "zh-TW",
# /imageshow
sudo pacman -S timg
# node-edge-tts
# local whisper-stt
uv venv
uv pip install faster-whisper edge-tts voxcpm
hf download Systran/faster-whisper-base \
--local-dir ~/.cache/huggingface/hub/models--Systran--faster-whisper-base
```
## β¨ Features
### ImageShow On Terminal
<table align="center">
<tr>
<td><img src="assets/imageshow.png"></td>
</tr>
</table>
### Agent Team and View via Tmux
<table align="center">
<tr>
<td><img src="assets/agentmate2.png"></td>
</tr>
</table>
### Auto Compact & Dream & SubAgent
#### π§ Core Mechanisms of Cycle Long Run
- Auto Compact β Automatically optimizes and compresses historical context to bypass sequence length bottlenecks.
- Dream β Asynchronously distills operational data into long-term insights.
#### ποΈ SubAgent Swarm Topology
| SubAgent Type | Core Responsibility |
| :--- | :--- |
| π‘οΈ **General-Purpose** | Orchestrates routing, high-level user interaction, and dispatching. |
| π **Explore** | Conducts deep semantic search and autonomous tool discovery. |
| π **Plan** | Handles multi-step chain-of-thought strategy and task decomposition. |
| π§ͺ **Verification** | Executes automated runtime validation, assertion checks, and fault tolerance. |
<table align="center">
<tr>
<td><img src="assets/ctx_auto_compose/compact_dream_subagent.png"></td>
</tr>
</table>
### WebSearch & WebFetch Tools
<table align="center">
<tr>
<td><img src="assets/WebSearchTool.png"></td>
<td><img src="assets/WebSearchTool2.png"></td>
<td><img src="assets/WebSearchTool3.png"></td>
</tr>
</table>
|