kmux

module
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2026 License: MIT

README

kmux

Personal Kubeconfig&tmuxinator manager tool
Doesn't keep global kubeconfig prone to accidental modifications.
Manages tmuxinator sessions per separate KUBECONFIGs.

Usage

Prepare $XDG_CONFIG_HOME/kmux/kmrc.yaml or ~/.config/kmux/kmrc.yaml config file:

log:
  level: warn

environments: # leave empty to use defaults
  - /tmuxinator_config_1
  - /tmuxinator_config_2

tmuxinatorTemplate: |
  name: {{ .Name }}
  root: {{ .Root }}
  pre_window: export KUBECONFIG={{ .Kubeconfig }} && tmux setenv KUBECONFIG {{ .Kubeconfig }}
  windows:
    - main:
        layout: main-horizontal
        # Synchronize all panes of this window, can be enabled before or after the pane commands run.
        # 'before' represents legacy functionality and will be deprecated in a future release, in favour of 'after'
        # synchronize: after
        panes:
          - main: []
          - secondary:
            - kgpw -o wide

Shell completions (zsh)

Generate the completion function and append it to your zshrc:

km completions zsh >> ~/.zshrc

Ensure autoload -Uz compinit && compinit runs earlier in your .zshrc (automatically done by oh-my-zsh/prezto).

Start session

Start a new tmux session (configured in kmrc.yaml):

km start <session-name>

Run in background without attaching:

km start --bg <session-name>

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL