
Code Editing Agent
https://github.com/snarktank/code-editing-agent- Category
- AI Agents
- Rank
- No. 2126Tools index
Previous survey · No. 2074 ·
- Pricing
- Open Source
- Type
- AGENT
- Builder
- snarktank
- GitHub
- 24 stars
- Date
About
A simple AI developer agent that edits code.
What it does
A small TypeScript command-line agent sends your requests and conversation history to Claude, executes requested file operations, returns their results, and repeats. It can inspect text files, list directories, replace text, and create files.
Why it's ranked here
Its value is clarity: the repository exposes the complete tool-use loop without much abstraction, while still offering interactive, plain-text, and one-shot command modes. It is better suited to learning and small edits than broad software-development automation.
What's good
The three-tool design is easy to understand and reuse. Directory listing can be recursive, file reads report specific path errors, and editing escapes search text before global replacement. Model and response-token settings are configurable from the command line.
Tradeoffs
The editor replaces every matching occurrence, although its description says the search should match only once. Supplied paths lack an explicit working-directory boundary. The agent has no tools for running commands, tests, version control, or searching file contents.
How to use it well
Use it as a compact teaching project, a tool-use reference, or a lightweight assistant for controlled text edits. Review changes afterward and run validation separately. It does not replace an agent that can execute builds, tests, shell commands, or version-control workflows.
Technical notes+
package.json defines an ESM Node package, an npm binary, development and start scripts, and a Bun build targeting Node. src/cli.ts uses Commander to expose interactive, plain, and exec modes with configurable model and token limits. src/agents/PlainAgent.ts and src/agents/InkAgent.ts maintain Anthropic message history, dispatch tool requests, append tool results, and request follow-up output. src/tools/index.ts assembles the three tools. src/tools/editFile.ts escapes regular-expression characters but performs global replacement without enforcing the documented single-match condition. src/tools/readFile.ts and src/tools/listFiles.ts wrap filesystem errors with clearer messages. Path inputs reach Node filesystem APIs without an explicit workspace containment check.
Observed
- License
- MIT
- Primary language
- TypeScript, including TSX interface code
- Install surface
- npm package dependencies installed with npm install
- Interface
- Command-line application with interactive, plain-text, and one-shot execution modes
- Runtime
- ES module package built for Node.js
- Model provider
- Anthropic SDK with an Anthropic API key
- Tool surface
- File reading, directory listing, and text replacement or file creation
Read from README.md, package.json, src/cli.ts, src/main.ts, src/cli-app.tsx, src/ink-agent.tsx, src/agent-styled.ts, src/styled-agent.tsx, src/tools/index.ts, src/tools/types.ts, src/tools/editFile.ts, src/tools/readFile.ts, src/agents/InkAgent.ts, src/tools/listFiles.ts, src/agents/PlainAgent.ts.
What it can do
Generate code from natural language descriptions
Natural language description of desired functionality → Code implementation
Debug and fix code errors
Code with bugs or errors → Corrected code
Refactor existing code
Existing code that needs improvement → Refactored, optimized code
Add new features to existing codebase
Existing code and feature requirements → Enhanced code with new functionality
Convert code between programming languages
Code in one programming language → Equivalent code in different programming language
Optimize code performance
Code with performance issues → Performance-optimized code
Add code documentation and comments
Undocumented code → Well-documented code with comments
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.