convez.ai
Agente
pascualmg

claude-doom

pascualmg/claude-doom

Ver no GitHub
InicialPluginScore · de 0 a 100

Let a Claude agent drive your Emacs — set breakpoints and debug your code live, in your editor, in any language

Instalação

$npx convez-ai pascualmg/claude-doom

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
v0.1.0
Issues abertas
0
Contribuidores
2

README

A tradução para o português deste README ainda está na fila.

claude-doom

Let a Claude agent drive your Emacs — open files, set breakpoints, and debug your code live, in your editor, while you just watch. Works with any language that has a debugger.

"pAIr programming": not an agent that suggests text, but an agent that works inside your tool, with you watching. Read the story behind it: pAIr programming

▶ Watch the demo: an agent debugging a recursive factorial, live

The idea

Emacs can run as a persistent daemon. An agent lives in there and talks to it with emacsclient --eval — a direct console to the editor's brain. Your screen is a lightweight client connected to the same daemon, so when the agent opens a file, jumps to a line, sets a breakpoint or reads a variable, you see it happen live.

┌──────────────────────────────────────────────────────────────────┐
│  THE AGENT (Claude)                                               │
│  speaks:  emacsclient --eval "(set-breakpoint, read-variable...)" │
└─────────────────────────────┬────────────────────────────────────┘
                              │  (socket — NOT your keyboard)
                              ▼
┌──────────────────────────────────────────────────────────────────┐
│  EMACS DAEMON  (persistent, shared)                              │
│  ┌──────────┐   ┌───────────┐   ┌──────────────────────────┐     │
│  │ buffers  │   │ debugger  │   │ YOUR screen = a window    │     │
│  │ (reads   │   │ (drives   │   │  into what the agent does │     │
│  │  code)   │   │  it)      │   │  YOU WATCH, agent drives  │     │
│  └──────────┘   └─────┬─────┘   └────────────┬─────────────┘     │
└──────────────────────┼──────────────────────┼───────────────────┘
                       ▼                       ▼
              language debugger        your terminal
              (via DAP / dape)         (what you see)

Key insight: the agent talks to the daemon, not to your keyboard. Your TUI frame is a viewer. (Bonus: the infamous kitty-keyboard-protocol ESC bug in emacs -nw becomes irrelevant — the agent never types through that door.)

Not just PHP — any language

Under the hood is a Debug Adapter Protocol client (dape). It's language agnostic. The control commands —set breakpoint, read variable, get the stack, step— are identical regardless of language. Only how you launch the program changes.

LanguageDebugger underneath
PHPXdebug
Haskellits debugger (hdb)
Pythondebugpy
Godelve
Rustcodelldb
JS/NodeV8 inspector
C/C++gdb / lldb

What you get

A small CLI, doomctl, that wraps emacsclient --eval with predictable subcommands:

doomctl setup                 # daemon + helpers + TUI client + live-view
doomctl open file.php 105     # show a file in the user's screen, go to line
doomctl bp file.php 88        # set a breakpoint (the most used command)
doomctl debug-run file.php    # launch with the debugger attached (autodetects flake)
doomctl wait-stop             # wait for the breakpoint hit + show where
doomctl scope                 # local variables at the stop point
doomctl stack                 # the call stack
doomctl continue              # F9 (or the user drives with F-keys)

doomctl help lists everything. The library of Lisp helpers (claude/*) lives in lib/claude-doom.el, loaded once into the daemon and reused.

Architecture: resident library + thin facade

  • lib/claude-doom.el — ~20 claude/* helper functions, loaded once into the daemon (hot, no restart) and resident. Not re-injected per command.
  • bin/doomctl — a bash facade that translates a subcommand into a single emacsclient --eval calling the already-loaded function.

Requirements

  • Emacs (or Doom Emacs) running as a daemon, with evil and dape.
  • A dape adapter for your language (e.g. vscode-php-debug for PHP, listen mode on port 9003).
  • F7/F8/F9/Shift-F8 mapped to dape-step-in/next/continue/step-out (recommended, so the human can drive the debugger).
  • A terminal multiplexer (zellij/tmux) for the TUI client — optional.

Install

git clone https://github.com/pascualmg/claude-doom ~/.local/share/claude-doom
ln -sfn ~/.local/share/claude-doom ~/.claude/skills/doom
ln -sf  ~/.local/share/claude-doom/bin/doomctl ~/.local/bin/doomctl

doomctl --version    # -> doom 0.1.0
doomctl setup        # daemon + helpers + client + live-view

See SKILL.md for the full guide: mental model, workflows, gotchas, multi-language, and remote/cross-machine use.

License

MIT. Built by doomguru (a Claude agent) in one night, with a human directing. The story: https://pascualmg.dev/blog/doomguru/pair-programming

Ver o original no GitHub

Bom para

Relacionados