From f4c22e4d6e11fe462185c1bcd86d4c51b6cedc33 Mon Sep 17 00:00:00 2001 From: Roman Scherer Date: Fri, 17 Oct 2025 16:20:12 +0200 Subject: [PATCH] gnu: Add emacs-claude-code-ide. * gnu/packages/emacs-xyz.scm (emacs-claude-code-ide): New variable. Change-Id: If52f00acdb621667603f0d821a762e8ea478b557 Signed-off-by: jgart --- gnu/packages/emacs-xyz.scm | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index ee4902f6778e40d4f54c68bd275f0385bd488c10..430fba676153ba508eb9460172a06298c7a1923c 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -16331,6 +16331,61 @@ circumstances, and leaves the keys untouched outside of those situations, allowing unprefixed keys to insert their respective characters as expected.") (license license:gpl3+)))) +(define-public emacs-claude-code-ide + ;; XXX: Upstream does not tag version bumps. Commit below matches latest + ;; version bump. + (let ((commit "c5e2de1a343bc6c0444789e0a99ad822cd56cfbe")) + (package + (name "emacs-claude-code-ide") + (version "0.2.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/manzaltu/claude-code-ide.el") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "17rha7rvv72r75lpa2hz65mphrjrzkfn4pz3xf9lfvivg7fc7n0d")))) + (build-system emacs-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'set-home + (lambda _ + (setenv "HOME" (getenv "TMPDIR"))))) + #:test-command + #~(list "emacs" "-batch" + "-L" "." + "-l" "ert" + "-l" "claude-code-ide-tests.el" + "--eval" + ;; Exclude failing test (uncaught throw) + (string-append + "(ert-run-tests-batch-and-exit " + "'(not claude-code-ide-mcp-server-test-ws-send-fix))")))) + (propagated-inputs + (list emacs-flycheck + emacs-transient + emacs-vterm + emacs-web-server + emacs-websocket)) + (home-page "https://github.com/manzaltu/claude-code-ide.el") + (synopsis "Claude Code IDE integration for Emacs") + (description + "This package provides native integration with Claude Code +@acronym{CLI, command-line interface} through the @acronym{MCP, Model +Context Protocol}. It creates a bidirectional bridge between Claude and +Emacs, enabling Claude to leverage Emacs features including @acronym{LSP, +Language Server Protocol}, project management, tree-sitter, and custom +Elisp functions. Features include automatic project detection and +session management, terminal integration with @code{vterm} or @code{eat}, +diagnostic integration with Flycheck and Flymake, advanced diff viewing +with ediff, and an extensible MCP tools server for accessing Emacs +commands such as xref and imenu.") + (license license:gpl3+)))) + (define-public emacs-clojure-mode (package (name "emacs-clojure-mode")