Skip to content

dmed - First release

Choose a tag to compare

@dedomorozoff dedomorozoff released this 25 Aug 15:45
· 176 commits to main since this release

Introducing dmed — Terminal-Native Code Editor with AI Agents as First-Class Participants

We're excited to announce the first public release of dmed, a terminal-native code editor built in Go with a single architectural rule: AI agents propose changes, but humans approve every diff. Nothing is modified behind your back.

What is dmed?

dmed is a full-featured, multi-file terminal editor with AI integration built in from the ground up. It combines the speed and focus of a terminal-native workflow with modern tooling — syntax highlighting, Git integration, LSP support, and a built-in terminal — alongside an AI layer where agents read, propose, and apply code changes through a transparent diff review process.

Key Features

Editing That Feels Right

  • Multi-file editing with tabs and splits (vertical/horizontal)
  • Fuzzy file finder (Ctrl+O) with subsequence scoring
  • Project tree sidebar (Ctrl+B) with fold/unfold navigation
  • Syntax highlighting (Chroma) for 100+ languages
  • Find & replace (Ctrl+F / Ctrl+H)
  • Full undo/redo with typing-run grouping — consecutive keystrokes form a single undo step
  • Multi-selection, clipboard, line duplication, line deletion, and move-line operations
  • Command palette (Ctrl+P / F2) — fuzzy-search all commands
  • Hot-reloadable config via .dmed.conf (INI format)
  • Layout-independent keybindings: Russian ЙЦУКЕН layouts are automatically mapped to QWERTY equivalents

AI, but Under Control

  • Chat panel (Alt+A) — streaming conversation with your codebase context
  • Inline rewrite (Alt+I) — select text, describe the change, review a side-by-side diff, then accept (y) or reject (n). No hidden modifications.
  • Multiple providers out of the box:
    • Ollama (local, free, offline)
    • OpenAI-compatible (OpenAI, DeepSeek, Groq, Together, vLLM, LM Studio)

Change Tracking Without External Binaries

  • fsnotify watcher — detects external file changes and offers reload or diff-based merge
  • Pure-Go Git integration (no git binary required):
    • Gutter indicators: added +, modified ~, deleted _
    • Side-by-side diff view vs HEAD
    • Stage/unstage/commit from the Git panel (Ctrl+G)
    • Hunk navigation (Alt+[ / Alt+])

Developer Tooling Built In

  • Built-in terminal (Alt+T) — persistent shell session, no context switching
  • LSP client — diagnostics, go-to-definition, go-to-references
  • Sessions — auto-save and restore open files across restarts
  • Help overlay (F1) — all keybindings at a glance

Architectural Principles

  • Buffer is the single source of truth. The view renders from buffer state and holds no editable state of its own.
  • No global mutable state. Models are values; mutations happen through small, named pointer-receiver methods.
  • Agent changes always pass through diff review. Inline AI: select text → describe change → AI streams response → side-by-side diff preview → accept or reject.
  • Files are stored with a trailing newline. Dirty checks compare against a normalized saved snapshot.

Getting Started

Requirements: Go 1.25.0 or later.

git clone https://github.com/user/dmed.git
cd dmed
make build
./dmed          # or dmed.exe on Windows
Or install directly:
go install github.com/user/dmed@latest
Open any file or directory:
./dmed main.go
./dmed ./my-project/