Introducing codespaces.el: The Best Way to Use GitHub Codespaces

Published: (February 28, 2026 at 10:41 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

codespaces.el

GitHub Actions status
Melpa package
License: MIT

About

codespaces.el provides Emacs integration for managing GitHub Codespaces and connecting to them via TRAMP. It offers a completing-read UI to select any of your existing codespaces.

Demo GIF

Example use-package declaration

(use-package codespaces
  :config (codespaces-setup)
  :bind ("C-c S" . #'codespaces-connect))

Prerequisites

  • GitHub CLI (gh) must be installed.
    If you use use-package-ensure-system-package, Emacs can install it automatically:
(use-package use-package-ensure-system-package :ensure t)

(use-package codespaces
  :ensure-system-package gh
  :config (codespaces-setup))
  • Authorize gh to access your codespaces:
gh auth refresh -h github.com -s codespace

Running gh codespace list will verify that the permissions are set correctly.

Because TRAMP connects over SSH, the target codespace needs an SSH server running.

What is codespaces.el?

codespaces.el is an Emacs package that enables seamless interaction with GitHub Codespaces directly from your editor. You can create, start, stop, delete, and connect to codespaces without leaving Emacs.

Feature GIF

Key Features

  • Connect to Codespaces via Emacs TRAMP
  • Create new and delete existing Codespaces
  • Start and stop Codespaces

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

Links

0 views
Back to Blog

Related posts

Read more »