3 ms·
Show HN: VT Code – Rust TUI coding agent with Tree-sitter and AST-grep
I’ve been building VT Code, a Rust-based terminal coding agent that combines semantic code intelligence (Tree-sitter + ast-grep) with multi-provider LLMs and a defense-in-depth execution model. It runs in your terminal with a streaming TUI, and also integrates with editors via ACP and a VS Code extension.
* Semantic understanding: parses your code with Tree-sitter and does structural queries with ast-grep.
* Multi-LLM with failover: OpenAI, Anthropic, xAI, DeepSeek, Gemini, Z.AI, Moonshot, OpenRouter, MiniMax, and Ollama for local—swap by env var.
* Security first: tool allowlist + per-arg validation, workspace isolation, optional Anthropic sandbox, HITL approvals, audit trail.
* Editor bridges: Agent Conext Protocol supports (Zed); VS Code extension (also works in Open VSX-compatible editors like Cursor/Windsurf).
* Configurable: vtcode.toml with tool policies, lifecycle hooks, context budgets, and timeouts.
GitHub: https://github.com/vinhnx/vtcode https://github.com/vinhnx/vtcode
- billconan 1y agoI have a question, how do you reliably find the original code line and apply the ai generated code? I'm not building a coding agent, I'm building an English writing improvement agent. I ask the agent to generate things like: { original_sentence: xxxx, improved_sentence: yyyy } and I use the original_sentence to locate the original content, and replace it with the improved_sentence. but, the thing is, ai would hallucinate the original_sentence. in some cases, the generated original_sentence doesn't match the actual original sentence. How does a coding agent solve it?
- vinhnx 1y agoHi, for me, I will try my best to answer. In my experience, it all about giving the agent the right tool for job. We give them a grep tool and search, then the accuracy and reliability rely on the capable of the running model. > I ask the agent to generate things like: > { original_sentence: xxxx, improved_sentence: yyyy } > and I use the original_sentence to locate the original content, and replace it with the improved_sentence. To mitigate this, I build the apply patch pattern. [0][1] [0] https://github.com/vinhnx/vtcode/blob/main/vtcode-core/tests/apply_patch_alias.rs https://github.com/vinhnx/vtcode/blob/main/vtcode-core/tests... [1] https://github.com/vinhnx/vtcode/blob/main/vtcode-core/src/tools/apply_patch.rs https://github.com/vinhnx/vtcode/blob/main/vtcode-core/src/t...