Zing Forum

Reading

Slivr: A Low-Cost Terminal Programming Assistant Based on Anchor Editing

Slivr is a terminal-based programming assistant focused on reducing the cost of editing large files. Its unique anchor editing engine avoids rewriting entire files, and tests show it can save 65-89% of token consumption. It supports any OpenRouter model, MCP protocol, multimodal input, and parallel orchestration.

编程助手代码编辑终端工具OpenRouterMCP锚点编辑成本控制AI辅助开发
Published 2026-06-14 16:07Recent activity 2026-06-14 16:20Estimated read 7 min
Slivr: A Low-Cost Terminal Programming Assistant Based on Anchor Editing
1

Section 01

Slivr: Introduction to the Low-Cost Terminal Programming Assistant Based on Anchor Editing

Slivr is a terminal-oriented programming assistant tool. Its core highlight is the anchor editing engine, which precisely locates code snippets instead of rewriting entire files. Tests show it can save 65-89% of token consumption. It supports any OpenRouter model, MCP protocol, multimodal input, parallel orchestration, and other features, aiming to reduce the cost of editing large files and improve reliability.

2

Section 02

Pain Points of Traditional Code Assistants and the Birth Background of Slivr

Traditional code assistants usually use the entire file rewriting mode when modifying large files, which requires transmitting the complete file content every time and results in huge token consumption. Slivr is designed to address this pain point; its anchor editing engine changes the way code is modified, fundamentally reducing unnecessary token usage.

3

Section 03

Anchor Editing Engine: Slivr's Core Mechanism

Working principle of the anchor editing engine: The system identifies a unique snippet in the code as an anchor, specifies insert, delete, or replace operations near the anchor, and only needs to send a small amount of positioning information and modification content without transmitting the entire file. This mechanism not only achieves 65-89% token savings but also has error-prevention features—if the anchor is not unique or cannot be located, the system will refuse to perform the edit to avoid silent errors.

4

Section 04

Functional Features of Slivr: Open, Versatile, and Flexible

Slivr's main functional features include:

  • Model Agnosticism: Supports any model such as Claude, GPT, Gemini via the OpenRouter interface, and can switch models during a session.
  • MCP Protocol Support: Acts as an MCP client, allowing connection to external tool servers to extend functionality.
  • Multimodal Capability: Supports view_image and view_pdf tools to handle vision-related tasks.
  • Orchestration and Planning: Parallel sub-agents, planning mode, real-time task lists to handle complex tasks.
  • Background and Scheduled Tasks: Supports detached background operation and scheduled scheduling.
  • Built-in Toolset: Covers common operations like read, edit, run, grep, git, etc.
5

Section 05

Security Design: Balancing Automation and Risk Control

Slivr adopts multiple security measures:

  • Diff Preview: Shows a diff preview before editing, allowing users to clearly see the modification content.
  • Destructive Command Blacklist: Hard rejects dangerous commands like rm -rf / and sudo.
  • Working Directory Sandbox: run_command is restricted to execution within the working directory.
  • Multi-level Approval Modes: Provides three modes: auto (fully automatic), edits (edits require confirmation), and all (all operations require confirmation).
6

Section 06

Usage Methods and Competitor Comparison

Usage Methods:

  • One-click installation: curl -fsSL https://raw.githubusercontent.com/dhyabi2/slivr/main/install.sh | bash
  • Run without installation: npx github:dhyabi2/slivr --help
  • Configuration priority: Command-line parameters > Project-level configuration > User-level configuration > Environment variables > Default values.

Competitor Comparison: Compared with tools like Claude Code and Aider, Slivr's advantages include: the lowest measured cost for large file editing, fully open model selection, BYOK mode (users manage their own API keys), and a complete set of modern tools (MCP, multimodal, etc.). Its code quality depends on the connected model, and its competitive points lie in cost, reliability, and openness.

7

Section 07

Applicable Scenarios and Summary

Applicable Scenarios:

  • Large codebase maintenance: Reduces API costs for frequent modifications.
  • High-frequency iterative development: Accumulates significant cost savings.
  • Multi-model comparison testing: Supports any OpenRouter model, making it easy to compare the performance of different models.
  • Automated workflows: Integrates into CI/CD pipelines to perform tasks like code review and document generation.

Summary: Slivr's innovation lies in cost optimization at the tool level. The anchor editing engine not only saves tokens but also improves editing reliability. For developers who value cost-effectiveness and tool autonomy, Slivr is a worthy alternative to consider, and its open design aligns with the community's pursuit of toolchain autonomy.