DEV Community

f4ban
f4ban

Posted on

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

If you're an Emacs user and a fan of GitHub Codespaces, I have great news for you! I've taken over maitenance of:

GitHub logo f4ban / codespaces.el

Emacs support for easy access to GitHub Codespaces.

codespaces.el

https://github.com/F4ban/codespaces.el/actions/workflows/check.yml/badge.svg https://melpa.org/packages/codespaces-badge.svg https://img.shields.io/github/license/F4ban/codespaces.el.svg

About

This package provides support for managing GitHub Codespaces in Emacs and connecting to them via TRAMP. It provides a handy completing-read UI that lets you choose from all your created codespaces.

./demo.gif

Here is an example use-package declaration:

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

You will need to:

  1. Have the GitHub command line tools (gh) installed
    • If you use use-package-ensure-system-package, Emacs can install this for you automatically:
    (use-package use-package-ensure-system-package :ensure t)
    (use-package codespaces
      :ensure-system-package gh
      :config (codespaces-setup))
        
    Enter fullscreen mode Exit fullscreen mode
  2. Authorize gh to access your codespaces:
    • Running gh codespace list will verify if permissions are correctly set.
    • You can grant the required permission by running gh auth refresh -h github.com -s codespace.

Because the TRAMP package, which underpins this package’s functionality, connects to remote servers over SSH, your codespace needs to have an SSH server…

What is codespaces.el?

codespaces.el is an Emacs package that enables seamless interaction with GitHub Codespaces. If you're unfamiliar Learn more about codespaces here.

With this package, you can interact with your Codespaces directly from within Emacs, whether it's creating a new one or connecting to a existing codespace, all from the comfort of your favorite editor.

Key Features:

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

Contributing

If you’d like to contribute to the project, feel free to create issues and submit a pull request! I’m always open to new ideas and improvements.

Links:
Melpa
GitHub

Top comments (1)

Collapse
 
liamnyc profile image
liam smut

cool