Skip to content

axm-edit

Atomic batch file editing for AI agents — replace, create, and delete files in a single MCP tool call

axm-audit axm-init Coverage


What it does

IDE agents edit files one-at-a-time. A refactor touching 30 files = 30 tool calls — 70 % of the agent's budget goes to mechanics. axm-edit replaces all of that with 1 call: a validated, atomic batch operation with git checkpoint rollback.

Features

  • batch_edit — Replace, create, and delete files in a single atomic operation with automatic ruff --fix
  • read_file — Read file content with optional line-range support
  • search_files — Grep-like search across project files (literal or regex)
  • list_dir — List files and directories with metadata (recursive, depth-limited)
  • run_command — Execute shell commands with timeout and output truncation
  • batch_rollback — Restore project state to a checkpoint via git stash
  • Atomic — All-or-nothing: validation runs before any file is touched
  • Bottom-to-top — Line edits applied in reverse order to avoid line-shift problems

Modules

Module What it provides
axm_edit.core.engine batch_apply — validate-then-apply batch engine
axm_edit.core.checkpoint create_checkpoint / rollback — git stash safety net
axm_edit.models.operations Edit, ReplaceOp, CreateOp, DeleteOp, BatchResult (incl. lint_errors) — Pydantic models
axm_edit.services.lint claude_fix — Claude subprocess auto-fix for remaining ruff errors (JSON old/new edit format)
axm_edit.services.lint_diff compute_lint_diffs, extract_rules_by_file — tagged plus/minus diffs between post-agent and post-lint snapshots
axm_edit.tools MCP tools: BatchEditTool, ReadFileTool, SearchFilesTool, RunCommandTool, BatchRollbackTool

Learn More

axm_edit

axm-edit — Atomic batch file editing for AI agents.

Replace, create, and delete files in a single atomic operation.