A Zsh plugin that displays the current kubectl context and namespace in your terminal prompt.
zsh-kubectl-prompt is a Zsh shell plugin that displays the current Kubernetes context and namespace directly in the terminal prompt. It helps developers and DevOps engineers quickly identify which cluster and namespace they are working with, reducing the risk of running commands in the wrong environment.
Kubernetes administrators, DevOps engineers, and developers who frequently use kubectl in the terminal and want to avoid context-switching mistakes.
It provides a lightweight, customizable way to keep Kubernetes context visible at all times, integrates seamlessly with popular Zsh plugin managers, and helps prevent accidental operations on the wrong cluster or namespace.
Display information about the kubectl current context and namespace in zsh prompt.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Adheres to Unix philosophy by solely displaying kubectl context and namespace without bloat, making it efficient and easy to maintain.
Allows extensive customization via zstyle, including separators, preprompt/postprompt characters, and conditional coloring based on user or context, as shown in the README examples.
Compatible with popular Zsh plugin managers like oh-my-zsh, antigen, and zgen, facilitating easy installation and management without manual setup hassles.
Supports hiding the namespace, using alternative binaries like oc, and dynamic styling, providing adaptability for different Kubernetes workflows.
Offers installation via Homebrew, manual cloning, or plugin managers, catering to diverse user preferences and system setups.
Users must edit .zshrc to configure RPROMPT and source the plugin, which can be error-prone and less intuitive compared to drop-in solutions.
Only displays context and namespace; lacks advanced data like pod status, resource usage, or cluster health indicators that other plugins might offer.
Executes kubectl commands on every prompt refresh, which could slow down terminal responsiveness, especially with slow network connections or large clusters.
Does not provide built-in fallbacks for when kubectl is unavailable or commands fail, potentially leading to prompt errors or empty displays.