Skip to content

Kylar514/diglet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diglet

Go Version License Go Report Card

TUI tunnel manager — start, stop, and monitor SSH, kubectl, and Docker port-forward tunnels from your terminal.

image

Use case?

  • Forward ports from Kubernetes or remote servers for dev and troubleshooting. No one wants to remember 100 different hosts and ports, especially 6 months later when something breaks.

  • What's a fella to do? Save your configs in connections.yaml and toggle away. Great for poking databases through Dadbod (especially behind a jump host).

  • Tools like this can feel scary, you want to know what it's actually doing. So diglet shows a preview of the exact command. Even if you don't remember the syntax, it's one button press away.

Install

go install github.com/kylar514/diglet@latest

Or build from source:

git clone https://github.com/kylar514/diglet.git
cd diglet
go build -o diglet .

Usage

Run diglet. On first launch it scaffolds a config file at ~/.config/diglet/connections.yaml.

Key Action
j/k Navigate list
Enter Toggle tunnel on/off
/ Fuzzy-filter connections
t Filter by tunnel type
e Edit config in $EDITOR
K Kill all tunnels
q Quit

Config

~/.config/diglet/connections.yaml:

connections:
  - name: my-server
    tunnel_type: ssh
    ssh_host: user@example.com
    local_port: 9000
    remote_port: 8080
  - name: my-pod
    tunnel_type: kubectl
    resource: deployment/my-app
    namespace: default
    local_port: 3000
    remote_port: 80

Tunnel Types

  • SSHssh -L reverse forwarding
  • kubectlkubectl port-forward
  • Docker(not yet implemented)

Adding a new type: create a file in tunnel/ with an init() that calls tunnel.Register().

Session Recovery

Active tunnels are persisted to /tmp/diglet-state.json and automatically restored on restart. Zombie processes are detected and cleaned up.

License

MIT

About

TUI tunnel manager - toggle and save your port-forwards with ease.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages