Hashline banner
quangdang46 quangdang46

Hashline

Development community

Description

Stable line-addressed file editing for Claude Code, Codex, ... using content-hashed anchors instead of fragile string replacement.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

hashline

hashline — Hash-anchored file editing for AI coding agents

![Release](https://img.shields.io/github/v/release/quangdang46/hashline?logo=github&label=release) ![CI](https://img.shields.io/github/actions/workflow/status/quangdang46/hashline/ci.yml?branch=main&logo=github&label=CI) ![License](https://img.shields.io/badge/License-MIT-green.svg) ![Rust](https://img.shields.io/badge/Rust-1.85+-blue?logo=rust)

**Hash-anchored file editing for Claude Code, AI coding agents, and patch-safe automation.** Every line gets a stable xxh32 hash (`42:a3`). Patch by anchor, not by fragile text match. Stale reads are caught and rejected before they corrupt your work.

curl -fsSL "https://raw.githubusercontent.com/quangdang46/hashline/main/install.sh?$(date +%s)" | bash

🤖 Agent Quickstart (MCP / Robot Mode)

hashline ships a 6-tool MCP server that works with Claude Code, Codex, Cursor, Windsurf, Gemini CLI, and OpenCode. The installer auto-configures it.

# MCP stdio server (auto-wired by installer)
hashline mcp

# Read a file with hashes — agents copy anchors, not lines
hashline read src/auth.js

# Patch by anchor — survives nearby edits (compact output)
hashline patch src/auth.js 'SWAP 2:b2:
+  const decoded = jwt.verify(token, env.SECRET)'
# OK src/auth.js#7f2a edits=1 changed=1
# ~2:f9|  const decoded = jwt.verify(token, env.SECRET)

# Dry-run before applying
hashline patch src/auth.js 'DEL 3' --dry-run

**Output architecture** — agent-first, token-minimal by default:

Mode Flag Description
Compact (default) OK path#hash edits=N changed=N + changed lines only
Verbose --verbose Full file dump after mutation (human-readable)
JSON --json Structured JSON with changed lines array

**Output conventions**

  • stdout = data only