Show HN: Kubectl AutoHotkey Tool – Text shortcuts and GUI for kubectl command
6 hours ago (github.com)
Hi HN! I built a simple but effective AutoHotkey tool to eliminate the repetitive typing when working with kubectl commands. As someone who frequently switches between different Kubernetes namespaces and runs similar commands dozens of times per day, I was tired of typing kubectl get pods -n my-long-namespace-name over and over. Key features: Text shortcuts: Type @kpod → expands to kubectl get pods -n <current-namespace> Session namespace: Set once with @ksetns, and all subsequent commands automatically include the namespace GUI selector: Ctrl+Shift+K opens a command picker for less frequent operations Clipboard integration: @klog uses whatever pod name you've copied for instant log tailing The clever part: Uses AutoHotkey's global variables to maintain namespace context across your entire session. No config files, no complex setup – just run the script and start typing shortcuts. Example workflow: @ksetns → set namespace to "production" @kpod → outputs kubectl get pods -n production Copy a pod name, then @klog → kubectl logs -f --tail 200 <podname> -n production It's Windows-only (AutoHotkey limitation), but for those of us stuck on Windows workstations managing K8s clusters, it's been a huge productivity boost. The script is ~200 lines and took an evening to write, but I use it dozens of times daily now. Sometimes the simplest tools are the most useful ones.
No comments yet
Contribute on Hacker News ↗