Greed

Greed is good. General Runtime for Editing, Extending and Delegating.

The Greed logo and the line “Greed is good.” beside a laptop showing a Greed config file, at a window over a fjord at sunrise.

Greed is an editor you can change while it runs. Edit the Helix way, the Vim way or without modes. Around your files: shells, terminals, tiled and floating panes, notes whose code runs, and agents. In a terminal or its own window, here or on the machine where the work runs.

A small Rust core does what needs speed. Keys, modes, commands, pickers, themes and the agents are Luau plugins you can read, change or replace.

Get started Write a plugin

$ greed src/main.rs          # in this terminal
$ greed --gui                # the same session in a window drawn on the GPU
:detach                      # leave it running: files, undo, servers, shells
$ greed attach               # and come back to it, from either

Three ways to edit, all first class

Pick the one your hands know. Each style has its own modes and keys, and they share the rest: commands, the leader menu, pickers and every plugin. :style switches while it runs.

Editing styles

Helix

Select, then act.

% s todo enter c done

Every todo in the file, changed at once.

Vim

Say what, then where.

:%s/todo/done/g

The changes show as you type, before it runs.

VS Code

No modes, the keys you know.

ctrl-d ctrl-d done

The next matches, one more each time.

Here, or where the work runs

The editor is a session you attach to, from a terminal or from its own window. Run it on the machine with the code and the builds, and look at it from your laptop: files, shells, terminals, language servers and agents all run over there, while your keys, your theme and your config come with you. Close the lid, and attach again later to everything as you left it.

Editing on another machine

your laptop

terminal or window

keys, theme, config

build-box

files and undo

shells, terminals

language servers

agents

$ greed ssh build-box        # a terminal
$ greed ssh build-box --gui  # a window

Panes, tabs and floats

Split the screen yourself, or let a layout do it: main-stack, columns, spiral or your own in Luau. Float any pane above the rest, and lay the floats out freely, tiled, cascaded or one at a time. The keys follow zellij and work everywhere, even while you type into a terminal.

Panes and their keys

src/server.rs
shell
agent
terminal · htop
NORMAL1 workmain-stack

A shell that keeps its output

Each command becomes a block you can search, fold, filter and run again. $3 is block 3's output. Tables from kubectl, docker or ps filter and sort in place, a watch marks what changed, and the rows are things to act on: a pod's logs, a file, a process. When you want your own shell, a terminal pane runs whatever you like.

The shell

❯ 1 kubectl get pods                  ✓ 0.4s · 2 rows
NAME                   READY   STATUS             RESTARTS
api-7d9f8b6c5-2xkqz    1/1     Running            0
worker-5c6b7d8f9-ab    0/1     CrashLoopBackOff   13
❯ 2 $1 | where RESTARTS > 0 | select NAME   ✓
NAME
worker-5c6b7d8f9-ab
⎇ main ⎈ prod:payments ~/s/infra ❯ |

Notes whose code runs

A fenced block in Markdown runs when you ask: sh, python, luau in the editor itself, http requests and more. Its output is saved under it, so the file reads well anywhere and a diff shows what changed. Name a block and feed its result to the next one, and a page becomes a small pipeline. Notes have links, todos and an agenda, all in plain files.

Runnable blocks · Notes

```python id=primes
primes = [n for n in range(2, 30)
          if all(n % d for d in range(2, n))]
print(*primes)
```

```result
2 3 5 7 11 13 17 19 23 29
```

```luau input=primes
local sum = 0
for n in string.gmatch(input, "%d+") do
	sum += tonumber(n)
end
return sum
```

```result
129
```

Agents, as clients and inside

Claude Code, Gemini, Codex or Greed's own agent with the model of your choice run in a pane next to your work. Outside agents connect over MCP, greed ctl and Claude Code's /ide. They see your unsaved changes and selections, and propose edits you review in the buffer. Ask one for a command or a setting and it can write you a plugin, which Greed type checks and tests before you approve it.

Agents

$ claude mcp add greed -- greed mcp
$ greed ctl focus
{ "path": "src/main.rs", "mode": "normal", "selections": [ ... ] }
$ greed ctl diagnostics

Plugins all the way down

What you see comes from Luau plugins written against the same typed API yours use. Each declares what it may touch (files, programs, the network), runs within a time budget, and takes everything it added with it when unloaded.

Terminal or window

The window draws on the GPU, with ligatures, images, PDFs, prose in a proportional font and Markdown shown as a document. The terminal gets the same session and the same theme.

A plugin is a folder

This one adds a command and binds it to the leader's U (space U, or ctrl-space U in the VS Code style). Put it in ~/.config/greed/plugins/upper/, or run greed new upper there to get one with a test. greed test upper runs its tests in a headless editor.

Writing plugins · The Luau API

local greed = require("@greed")

greed.command({
	name = "upper",
	doc = "Upper-case the selections",
	run = function(ctx)
		ctx.buffer:edit(function(e)
			for _, r in ctx.view:selection().ranges do
				local from, to = math.min(r.anchor, r.head), math.max(r.anchor, r.head)
				e:replace(from, to, string.upper(ctx.buffer:slice(from, to)))
			end
		end)
	end,
})

greed.keymap.bind({ layer = "leader" }, { U = "upper" })

Try it

Download Greed for Linux or macOS, x86_64 or arm, from the releases page: one binary with the terminal and the window, or Greed.app on a Mac. On Linux, unpack it into ~/.local:

$ tar -xzf greed-*-linux-x86_64.tar.gz -C ~/.local --strip-components=1
$ greed --gui README.md

On NixOS, nix run github:johnae/greed. For servers there's a static build of the terminal side that runs on any Linux. The default plugins are built into the binary, and the first start asks how you like to edit and which theme you want, and writes a config with settings to try. Then :tutor teaches your style's keys, with lines to practise on, and shows you around.