A text editor designed for AI agents.
aifed's goal is to design a dedicated text editor for AI agents, implemented as a CLI, improving AI's editing efficiency, accuracy, and comfort.
- CLI is the best UI for AI - Text input/output, structured responses
- Progressive disclosure - Simple commands for simple tasks, advanced features on demand
- Decoupled from AI Agents - Any coding agent that supports shell can use it
See the Installation Guide for setup instructions.
| Feature | Status |
|---|---|
read - Read file content with hashlines |
Ready |
edit - Edit file with hashline verification |
Ready |
lsp - LSP integration (Rust first) |
Ready |
outline - Structural outline (8 languages; see below) |
Ready |
history/undo/redo - Edit history and recovery |
Ready |
copy/paste/clipboard - Clipboard operations |
Ready |
| Language | LSP Server | Status |
|---|---|---|
| Rust | rust-analyzer (shipped default) |
Supported |
| Nix | nil (shipped default) |
Supported |
Any via [[lsp]] config |
User-defined | Supported |
| Language | Extensions | Status |
|---|---|---|
| Rust | .rs |
Ready |
| Markdown | .md, .markdown, .mdx |
Ready |
| Go | .go |
Ready |
| Python | .py |
Ready |
| JavaScript | .js, .mjs, .cjs |
Ready |
| TypeScript | .ts, .tsx |
Ready |
| C | .c, .h |
Ready |
| C++ | .cpp, .cc, .cxx, .hpp, .hh, .hxx |
Ready |
Extensions are the shipped grammar defaults and may lag the code; they're
overridable via a [[language]] overlay (see the Configuration reference).
For code, the leading preamble collapses into a file header region and the
top-level ranges tile the whole file — read the ranges in order to reconstruct
it end-to-end.
| Platform | Supported | Tested |
|---|---|---|
| linux | Yes | Yes |
| Windows | No | N/A |
| Darwin (macOS) | Unknown | No |
Current focus: Optimizing the AI agent experience through real-world usage. Testing and refining the workflow in actual coding tasks.
Note: The examples below illustrate the typical workflow. All core commands (
read,edit,outline,lsp,history/undo/redo) are implemented.
AI agents can obtain the full usage guide with:
aifed --skillHere's how an AI agent might work with aifed in typical development scenarios:
# Survey structure first — ranges pass straight to `read`
aifed outline crates/aifed/src/outline/spec.rscrates/aifed/src/outline/spec.rs [rust] 96 lines, 8 items
file header [1,13]
────────────────────
struct Classified [14,27]
struct DocPolicy [28,66]
trait Spec [67,96]
fn language [73,74]
fn grammar_name [76,77]
fn expand [79,87]
fn classify [89,91]
fn doc_policy [93,95]
# Then read just the trait, using its range from the outline
aifed read crates/aifed/src/outline/spec.rs [67,96]# Read line 15 of main.rs with hashlines for safe editing
aifed read main.rs 1515:3K|let count = calculate_total(items);
# Get symbol locators on line 15 for LSP operations
aifed lsp symbols main.rs 1515:3K|let count = calculate_total(items);
S1:count
S2:calculate_total
S3:items
# Get type info for calculate_total function
aifed lsp hover main.rs 15:3K S2:calculate_total
# Go to definition of items
aifed lsp def main.rs 15:3K S3:items# Get symbol locators on line 10
aifed lsp symbols main.rs 1010:AB|let config = load_config();
S1:config
S2:load_config
# Find all references to config
aifed lsp refs main.rs 10:AB S1:config
# Rename config to settings across the codebase
aifed lsp rename main.rs 10:AB S1:config settings
# Edit line 10 with hashline verification
aifed edit main.rs <<'EOF'
- 10:AB
+ 10:AB "let settings = load_config();"
EOF# Check for errors after changes
aifed lsp diag main.rs# View recent edit history
aifed history main.rs --count 5
# Undo if something went wrong
aifed undo main.rs
# Redo if you change your mind
aifed redo main.rs- CLI Reference - Command documentation
- Design Notes - Design rationale and trade-offs
This project was inspired by:
- agent-browser - A browser designed for AI agents
- oh-my-pi - The Hashline Edit Mode inspired our Locator design
See CONTRIBUTING.md for ways to contribute to the project.