2

GitHub - patrickt/codespaces.el: Emacs support for easy access to GitHub Codespa...

 2 years ago
source link: https://github.com/patrickt/codespaces.el
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

codespaces.el

This package provides support for connecting to GitHub Codespaces in Emacs via TRAMP. It provides a handy completing-read UI that lets you choose from all your created codespaces. Here's a screenshot (running with vertico):

screenshot.png

Here is an example use-package declaration:

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

You will need to have the GitHub command line tools (gh) installed. If you use use-package-ensure-system-package, Emacs can install them for you automatically:

(use-package use-package-ensure-system-package :ensure t)
(use-package codespaces
  :ensure-system-package gh
  :config (codespaces-setup))

User-facing commands

  • codespaces-connect brings up a list of codespaces, and upon selection opens a Dired buffer in /workspaces (the default Codespaces location).
  • codespaces-start/codespaces-stop bring up a list of applicable codespaces and upon selection spawns a task that starts or stops the selected codespace.

Missing features

  • Should ensure that gh codespace list works okay.
  • Completion should sort codespaces by most-recently-used.
  • Should have an unobtrusive special-mode buffer for outputs.

Credits

Thanks to Bas Alberts for writing the code to register ghcs as a valid TRAMP connection method.

License


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK