# Introducing ane: A language server-aware chord-based terminal code editor (for humans and agents)

I've been writing code alongside AI agents for long enough that I can see where they tend to waste time. The agents are good at knowing *what* to change. The problem is they suck at exploring and editing source code files efficiently — they end up reading an entire file to understand one function, and then either re-write it wholesale, or uses cryptic `sed` commands. That burns a lot of time and tokens on context that doesn't matter.

Code editors thus far generally weren't designed with agents in mind. They were designed for humans who have a cursor, a screen, and a keyboard. So agents have to resort to overly broad exploration and blunt, imprecise edits.

I started building `ane` for two reasons. First is that the idea for `ane`'s chord system has been burning a hole in my brain for over 2 years, having thought through how it would work over many iterations in a note on my phone. The second is to fix those inefficient agents by helping them be more precise and stop wasting tokens reading and generating text they don't need to. `ane` is a terminal code editor with a language-aware structured chord system — one that works equally well for a human typing in a TUI and an agent calling a CLI command.

---

**Install:**

```sh
curl -s https://prettysmart.dev/install/ane.sh | sh
```

The installer detects your platform and puts `ane` on your PATH. If you prefer cargo, mise, or building from source, see the [README](https://github.com/prettysmartdev/ane).

---

The core idea is chords. A chord has four parts: **action**, **positional**, **scope**, **component**. For example:

- `cifc` — **C**hange **I**nside **F**unction **C**ontents
- `dtle` — **D**elete **T**o **L**ine **E**nd
- `jnsn` — **J**ump **N**ext **S**truct **N**ame
- `yefs` - **Y**ank **E**ntire **F**unction **S**elf

An agent executing `ane exec --chord "cifc(target:render, value:'todo!()')" src/ui.rs` (to ChangeInsideFunctionContents for function `render`) gets back a unified diff of what changed. It doesn't need to read the full file first, and then again after. It probably won't need to send the whole file into the LLM in the first place. It names the function and states the new body. That's it.

For your code project, `ane init claude` (or `codex`, `gemini`, `opencode`, and a few others) drops a skill file into the right place and teaches the agent the chord grammar — in as few tokens as possible - so your agent becomes fluent quickly.

For humans, the editor TUI opens with a file tree and two modes: Chord mode for structured edits and Edit mode for direct typing. Short-form chords auto-execute when the cursor is sitting inside a recognized construct — type `cifc` and if your cursor is in a function, it executes immediately without pressing Enter. Chord history is a `Ctrl-R` away. Ctrl-E to switch between edit and chord mode, Ctrl-T to toggle the tree open/closed, Ctrl-S to write an edited buffer to disk, Ctrl-C twice to exit.

There is absolutely no configuration files, plugins, or options whatsoever yet, and that's intentional while I work to completely nail down the chord engine, language server integration, and code agent usability. Those things may come eventually, but for now I'm focusing on what makes [ane unique](https://github.com/prettysmartdev/ane/blob/main/docs/08-compared-to-other-editors.md).

<screenshot here>

Language servers are integrated by default: rust-analyzer, gopls, vtsls, basedpyright. They start in the background so you can start editing immediately — line and buffer chords work without waiting for LSP readiness, and LSP-dependent chords (targeting functions, variables, structs) wait automatically. If the server isn't installed, `ane` offers to install it. Tree-sitter provides structural highlighting on open; LSP semantic tokens layer on top once the server is ready.

In addition to the CLI and TUI, the chord engine, LSP engine, and everything else an agent harness would need to use `ane`'s capabilities directly are also available as a Rust crate so you can make your own custom agent harnesses more efficient at code editing.

This is an early release — there are chord components, languages, features, and polish still to add, and the TUI has room to grow. That said, it's my daily driver editor already, and the exec mode is what my code agents are already using to edit `ane` and [amux](https://github.com/prettysmartdev/amux). I'll be iterating on it pretty rapidly while I take a [short break](https://blog.cohix.network/that-refactor-sucked-but-amux-v0-8-is-out-now/) from amux development for a week or two.

---

Source and issues at [github.com/prettysmartdev/ane](https://github.com/prettysmartdev/ane). More at [prettysmart.dev](https://prettysmart.dev). Feedback, bug reports, and PRs are welcome.
