Skip to content

xnip v0.2.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 20:53
· 37 commits to master since this release

xnip v0.2.0

This release completes the next default-editor workflow: exact file editing, no-clobber rename, text patch import, ordered file lifecycle batches and journal-assisted recovery.

本版补齐默认编辑工作流:精确文本编辑、整文件重命名、补丁导入、批量创建/删除及失败恢复。

New capabilities

  • xnip edit / xnip_edit: create files, replace unique literal blocks, delete regular files, and rename to an absent destination. CLI and MCP support preview/check and backups.
  • xnip apply --format patch: unified text diffs and *** Begin Patch documents, including add/update/delete/move, CRLF/EOF handling and Git-quoted UTF-8 paths. --patch-root / MCP patch_root explicitly selects the project directory.
  • Native/JSON/YAML manifests now support create, delete, rename and literal edit. File operations and patches use input-order virtual planning; --sequential enables dependent legacy operations too.
  • Commit failures attempt rollback and retain integrity-checked original/planned snapshots. xnip recover JOURNAL --check / --dry-run / restore, and MCP xnip_recover, allow explicit recovery after an interrupted transaction.
  • MCP apply now previews/checks without writing diffs to protocol stdout. The server exposes 10 tools.
  • Windows persistent-session doctor deadlocks are fixed. Skills use xnip as the default text editor while reusing known context; detailed references are loaded only as needed.

Install

# macOS / Linux
curl -fsSL https://github.com/SeaLoong/xnip/releases/latest/download/install.sh | sh
# Windows PowerShell
Invoke-RestMethod https://github.com/SeaLoong/xnip/releases/latest/download/install.ps1 | Invoke-Expression
# Source install, Rust 1.89+
cargo install --git https://github.com/SeaLoong/xnip --tag v0.2.0 --locked xnip

Six binary archives cover Linux musl, macOS and Windows in x86_64/ARM64 variants. SHA256 sidecars, both installers and six Agent integration packages are attached. Refresh the MCP connection after upgrading to load the new tool schemas.

Contracts and limits

  • Pure moves preserve identity with a no-clobber hard-link/unlink sequence on the same filesystem. There can briefly be two names; cross-device moves, unsupported hard-link filesystems and case-only moves on case-insensitive filesystems fail explicitly.
  • Batches validate before writing, but are not cross-file atomic visibility or a lock against external writers. Rollback can fail or refuse detected conflicts; inspect the journal/status before retrying. Recovery does not force-overwrite external changes.
  • Journals require temporary space and contain original/planned content. Successful commits clean them up; failed/interrupted transactions retain them for recovery. This is not an automatic undo history or a universal power-loss guarantee.
  • Patch import is UTF-8 text-only. Binary and mode-only patches are rejected. Literal editing remains byte-preserving.

中文说明 · Editing · Patch import · Recovery · Changelog

Final cross-platform CI