Skip to content

Clash v0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Feb 11:18
· 3 commits to main since this release

Clash v0.2.0

What's New

clash check — single-file conflict detection

Check any file for merge conflicts across all worktrees before editing it. Returns structured JSON with exit codes for scripting and automation.

clash check src/main.rs

Claude Code plugin

Install conflict detection as a plugin — no manual hook configuration needed:

claude plugin marketplace add clash-sh/clash
claude plugin install clash@clash-sh

Clash automatically runs before every Write/Edit and prompts you when conflicts are detected.

Claude Code hook support

When invoked without arguments, clash check reads Claude Code's hook JSON from stdin, extracts the file path, and returns a permissionDecision response — letting you approve or reject conflicting edits interactively.

Smarter worktree discovery

clash check now works from anywhere — pass a file path, relative path, or run from a parent directory. Discovery walks up from the path to find the containing worktree.

Bug Fixes

  • Fix main worktree discovery from linked worktrees — Previously, running from a linked worktree showed the wrong path/branch for the main worktree
  • Fix watch mode on macOS — File edits now trigger refreshes correctly (added ModifyKind::Any for FSEvents)
  • Fix hook for new files — discover_from now handles paths that don't exist yet (Write-to-new-file scenario)
  • Fix time crate vulnerability — Updated to 0.3.47 (RUSTSEC-2026-0009)

Infrastructure

  • Plugin version validation in release workflow
  • Install script testing across macOS (Intel + ARM), Linux (x64 + ARM)
  • CI summary job for branch protection

Getting Started

Step 1: Install

macOS/Linux

curl -fsSL https://clash.sh/install.sh | sh

Homebrew

brew install clash-sh/tap/clash

Cargo

cargo install clash-sh

Upgrade from v0.1.0

brew upgrade clash          # Homebrew
cargo install clash-sh      # Cargo
# Or re-run the install script

Step 2: Connect to your AI agent

Claude Code — Plugin (Recommended)

claude plugin marketplace add clash-sh/clash
claude plugin install clash@clash-sh
Alternative: Manual hook setup

Add the hooks key to your .claude/settings.json:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Write|Edit|MultiEdit",
        "hooks": [{ "type": "command", "command": "clash check" }]
      }
    ]
  }
}

Codex / Cursor / Windsurf / Other Agents

Add to your project instructions (.cursorrules, AGENTS.md, etc.):

Before editing any file, run clash check <file> to check for merge conflicts with other worktrees. Run clash status periodically for a full conflict overview.

See the full Getting Started guide in the README for more details.

Binary Downloads

See assets below for pre-compiled binaries.

Full Changelog: v0.1.0...v0.2.0