Edit

opencenter shell-init

Output shell integration script for session-scoped active clusters

Synopsis

Outputs shell integration code to be evaluated in your shell.

This enables session-scoped active clusters, where each terminal can have its own active cluster context without affecting other terminals.

Add to your shell configuration file:

Bash (~/.bashrc): eval "$(opencenter shell-init)"

Zsh (~/.zshrc): eval "$(opencenter shell-init)"

Fish (~/.config/fish/config.fish): opencenter shell-init --shell fish | source

Features: • Session-isolated cluster contexts • Visual prompt indicator showing active cluster • Automatic cleanup on shell exit • Compatible with existing persistent selection

opencenter shell-init [flags]

Examples

  # Auto-detect shell and output integration script
  opencenter shell-init

  # Specify shell explicitly
  opencenter shell-init --shell zsh

  # Install to shell config
  echo 'eval "$(opencenter shell-init)"' >> ~/.zshrc

Options

  -h, --help           help for shell-init
      --shell string   Shell type (bash, zsh, fish) - auto-detected if not specified

SEE ALSO

  • opencenter.md[opencenter] - opencenter CLI manages cluster configurations and GitOps scaffolding

Auto generated by spf13/cobra on 28-Apr-2026