Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@lenml/apply_edits

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lenml/apply_edits

A CLI tool for batch file editing with SEARCH/REPLACE and MATCH/REPLACE patterns, supporting atomic transactions and cross-platform compatibility. Designed for AI coding assistants like Codex.

latest
Source
npmnpm
Version
1.1.5
Version published
Maintainers
1
Created
Source

English | 中文

@lenml/apply_edits

Global CLI tool for batch file editing with SEARCH/REPLACE and MATCH/REPLACE patterns. Atomic transactions, sequential same-file simulation, encoding auto-detection.

Windows PowerShell Note: PowerShell 5 (powershell.exe) defaults to UTF-16 LE when piping, which breaks encoding. Upgrade to PowerShell 7+ (pwsh.exe). On PS5, pipe from a UTF-8 file instead of using here-strings.

Install

npm install -g @lenml/apply_edits

Usage

See SKILL.md for full documentation — command format, MATCH mode, multiple files, error handling, and API.

Tip: Code fences around blocks are optional. The autofixer adds them if missing.

Basic example (PowerShell 7+):

apply-edits --workspace . @'
src/main.py
<<<<<<< SEARCH
print("hello")
=======
print("hello world")
>>>>>>> REPLACE
'@

Or via heredoc (Bash):

apply-edits --workspace . << 'EOF'
src/main.py
<<<<<<< SEARCH
print("hello")
=======
print("hello world")
>>>>>>> REPLACE
EOF

Install as Agent Skill

Send this message to your AI coding agent:

install it: https://raw.githubusercontent.com/lenML/apply_edits_tool/refs/heads/main/skill/SKILL.md

Or via CDN:

install it: https://cdn.jsdelivr.net/npm/@lenml/apply_edits/skill/SKILL.md
install it: https://unpkg.com/@lenml/apply_edits/skill/SKILL.md

Keywords

code-editing

FAQs

Package last updated on 19 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts