Skip to content

Epistates/turboedit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TurboEdit

LLM-optimized file editing MCP server with SEARCH/REPLACE blocks

TurboEdit is a high-performance file editing MCP (Model Context Protocol) server that provides intelligent file operations optimized for Large Language Models. It is built using best-in-class Rust libraries to ensure world-class performance, reliability, and security.

Key Features

1. LLM-Optimized SEARCH/REPLACE Editing

Instead of rewriting entire files, LLMs use precise SEARCH/REPLACE blocks with git merge conflict syntax. This reduces token usage, prevents "LLM laziness", and ensures structural integrity.

  • Ambiguity Detection: Fails on multiple matches, requiring unique search text.
  • SIMD-Accelerated: Ultra-fast string search using stringzilla.
  • Fuzzy Resiliency: Indentation-preserving and whitespace-insensitive matching.

2. Semantic Code Analysis (NEW in v0.2.0)

  • Tree-sitter integration for AST-aware code analysis.
  • Identify functions, classes, structs, and methods with precision.
  • Support for Rust, Python, JS/TS, Go, C#, C++, and Java.
  • Returns 1-based line ranges for easy navigation and targeted edits.

3. Native Git Integration (Modernized in v0.2.0)

  • Powered by gix (gitoxide) for SOTA performance.
  • Instant git_status reporting without shelling out.
  • High-performance, .gitignore-aware directory walking.

4. Persistent Snapshots & Rollback

  • Persistent history tracking using SQLite (WAL mode).
  • Create file or workspace-wide snapshots before risky operations.
  • Instant rollback to any previous state by hash.

5. StandardResponse Pattern

Consistent, LLM-friendly JSON response envelope with performance timing and suggested next_steps.


Usage

As MCP Server (STDIO) - Recommended for IDEs

turboedit --transport stdio --working-dir /path/to/project

As Network Server (SOTA v3)

TurboEdit v0.2.0 uses TurboMCP v3, enabling high-performance network transports:

# HTTP server
turboedit --transport http --port 3000 --working-dir /path/to/project

# WebSocket server
turboedit --transport websocket --port 3000

MCP Tools (v0.2.0)

All tools are prefixed with turboedit__ for consistent discovery.

turboedit__semantic_search(path)

Analyze code structure using tree-sitter. Returns a structured list of symbols with line ranges.

turboedit__edit_file(path, edits, [expected_hash], [dry_run])

Apply SEARCH/REPLACE blocks. Supports fuzzy matching and conflict detection.

turboedit__git_status()

Get current repository status (branch, modified, staged, untracked) using the gix engine.

turboedit__read_file(path)

Read complete contents with BLAKE3 hash for conflict detection.

turboedit__list_files_recursive(pattern, options)

Optimized recursive file listing with glob support and .gitignore respect.

turboedit__json_merge(path, updates)

Merge JSON objects or arrays with type-safe validation.

Other Core Tools:

  • write_file, delete_file, move_file, copy_file
  • list_directory, create_directory, tree
  • snapshot, rollback, list_snapshots
  • json_get, json_set, find_in_files, diff_files

Architecture

  • ropey: Efficient text representation (used by Helix editor).
  • stringzilla: SIMD-accelerated string operations.
  • tree-sitter: Incremental parsing for semantic analysis.
  • gix: Native Rust git implementation.
  • TurboMCP v3: SOTA MCP protocol stack.
  • rusqlite: ACID-compliant snapshot storage.

Installation

# Clone repository
git clone https://github.com/epistates/turboedit.git
cd turboedit

# Build & Install
cargo build --release
cargo install --path crates/turboedit-server

Security

  • Path Traversal Protection: All operations are strictly scoped to the working directory.
  • Hash Verification: Protects against concurrent modifications and lost updates.
  • Native Implementation: No shell execution; all operations use pure-Rust libraries.

License

MIT

About

TurboEdit is a high-performance file editing MCP server that provides intelligent file operations optimized for LLMs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages