Quality of life plugin.
I like vibe coding and yolo
mode, this is to make using local devcontainers easier and more seamless for "safer" yolo.
I get GitHub Copilot through work, so getting "automatic" sign in to me is important. I have been learning neovim (and am use to vscode), so auto port forwarding.
This is a simple function wrapper around devpod which checks for devpod
and github cli.
- devpod - Development container management
- github cli - GitHub authentication and token generation
- gum - Interactive workspace selection
- jq - JSON processing for port monitoring
ssh
/scp
- Remote connection and file transferstdbuf
- Unbuffered output handling for port monitoring
Clone this repository into your Oh My Zsh custom plugins directory:
git clone https://github.com/scaryrawr/devpod-gh.zsh ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/devpod-gh
Then add devpod-gh
to your plugins array in ~/.zshrc
:
plugins=(... devpod-gh)
antidote install scaryrawr/devpod-gh.zsh
When you ssh into a devpod using devpod ssh
:
devpod ssh
It the wrapper injects the GH_TOKEN
environment using gh auth token
:
devpod ssh --set-env GH_TOKEN=`gh auth token`
This enables things like github copilot cli to just work... automagically, in devpods.
It magically enables the github cli feature.
The plugin automatically monitors and forwards ports that are bound inside your devpod workspace. When an application starts listening on a port inside the devpod, it will be automatically forwarded to your local machine on the same port.
This uses a background port monitoring process that watches for port binding events and establishes SSH tunnels as needed. The port forwarding is cleaned up automatically when you disconnect.