# Installer kubectx avec Homebrew, apk, chocolatey, apt, MacPorts, Nix, pacman, zypper, scoop, winget

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de kubectx pour les workflows d'agents IA.

## installation

```sh
sudo av install brew:kubectx
```

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

```sh
brew install kubectx
```

  Preuve: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install kubectx
```

  Preuve: MacPorts ports tree: sysutils/kubectx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add kubectx
```

  Preuve: Alpine Linux edge package indexes: kubectx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install kubectx
```

  Preuve: Debian stable package indexes: kubectx from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#kubectx
```

  Preuve: nixpkgs package indexes: pkgs/by-name/ku/kubectx/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S kubectx
```

  Preuve: Arch Linux sync databases: kubectx from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install kubectx
```

  Preuve: openSUSE Tumbleweed package metadata: kubectx from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install kubectx
```

  Preuve: Chocolatey community package catalog: kubectx from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','kindle'

- Scoop (92%):

```sh
scoop install main/kubectx
```

  Preuve: Scoop official bucket manifest trees: bucket/kubectx.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id ahmetb.kubectx -e
```

  Preuve: Windows Package Manager source index: ahmetb.kubectx from https://cdn.winget.microsoft.com/cache/source.msix

## Faits du paquet

- **Clé du paquet:** brew:kubectx
- **Gestionnaire de paquets:** Homebrew
- **Version:** 0.11.0
- **Résumé source:** Tool that can switch between kubectl contexts easily and create aliases
- **Page d'accueil:** <https://github.com/ahmetb/kubectx>
- **Dépôt:** <https://github.com/ahmetb/kubectx>
- **Dernière mise à jour:** 2026-07-27T21:58:45+02:00
- **Généré:** 2026-08-03T19:37:03+00:00

## exécutables

- kubectl-ctx (alias)
- kubectl-ns (alias)
- kubectx (alias)
- kubens (alias)

## Comportement d'installation

- Bouteille: non disponible

## Version et fraîcheur

- page générée: 2026-08-03
- version du gestionnaire: 0.11.0
## Historique du projet et usages

kubectx is a small Kubernetes command-line companion that packages two everyday workflow shortcuts: switching kubeconfig contexts with kubectx and switching namespaces with kubens. It became a widely installed kubectl-adjacent utility because it solves a repetitive operator problem without introducing a larger cluster-management framework.

### Historique du projet

The public GitHub repository was created on March 30, 2017, and the v0.1 release was published on April 25, 2017. The original project was shell-oriented; later releases added a Go implementation while retaining the simple command names and shell-completion focused workflow.

The README describes the package as 'Power tools for kubectl' and positions kubectx for faster cluster/context changes and kubens for namespace changes. That pairing made the project fit naturally beside kubectl rather than replacing it.

### Historique d'adoption

kubectx spread through multiple packaging ecosystems because it is useful on every workstation that touches more than one Kubernetes cluster. The official README documents installation through Homebrew, MacPorts, apt, pacman, Chocolatey, Scoop, winget, and Krew, which reflects cross-platform adoption by both Kubernetes operators and developers.

Its inclusion as Krew plugins named ctx and ns gave it a Kubernetes-native installation path, while Homebrew and Linux distribution packages made it familiar to package-manager users outside the Kubernetes plugin index.

### Modes d'utilisation

kubectx reads the user's kubeconfig contexts and switches the active context, including a shortcut for returning to the previous context. kubens similarly updates the namespace on the active context. Optional fzf integration adds interactive selection for long cluster and namespace lists.

The tool is commonly paired with shell completions and prompt helpers such as kube-ps1 or oh-my-posh so operators can both switch context quickly and see the selected cluster or namespace before running kubectl commands.

### Pourquoi les passionnés de paquets s'y intéressent

kubectx is a package-nerd staple because it is tiny, scriptable, and heavily repackaged: one upstream repository feeds native OS package managers, Windows package managers, and Krew. It is also a good example of a CLI whose adoption comes from reducing command friction rather than adding a new control plane.

### Chronologie

- 2017-03-30: Public GitHub repository created
- 2017-04-25: v0.1 release published
- 2021-07-06: v0.9.4 release published after the project had become a common kubectl companion
- 2026-03-27: v0.11.0 release published

### Related projects

- kubens is shipped from the same repository and handles namespace switching.
- Krew distributes kubectx and kubens as kubectl plugins named ctx and ns.
- fzf is an optional dependency for interactive context and namespace selection.
- kube-ps1 and oh-my-posh are prompt tools the README recommends for displaying Kubernetes context.

### Sources

- <https://api.github.com/repos/ahmetb/kubectx>
- <https://formulae.brew.sh/formula/kubectx>
- <https://github.com/ahmetb/kubectx>
- <https://github.com/ahmetb/kubectx/releases>


## Notes de sécurité

narrow executable package without higher-risk signals.

- **Risque Geiger:** vert / faible
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.kube/config
## Autres enregistrements de gestionnaires de paquets

- Debian apt - kubectx - 0.9.5-2+b10: normalized package name match | Debian stable package indexes: kubectx from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Fast way to switch between clusters and namespaces in kubectl | https://github.com/ahmetb/kubectx
- Nix - kubectx: normalized package name match | nixpkgs package indexes: pkgs/by-name/ku/kubectx/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - kubectx - 0.9.5-1: normalized package name match | Ubuntu 24.04 LTS package indexes: kubectx from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Fast way to switch between clusters and namespaces in kubectl | https://github.com/ahmetb/kubectx
- apk - kubectx - 0.11.0-r3: normalized package name match | Alpine Linux edge package indexes: kubectx from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Faster way to switch between clusters and namespaces in kubectl | https://kubectx.dev/
- apk - kubectx-bash-completion - 0.11.0-r3: normalized package name match | Alpine Linux edge package indexes: kubectx-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for kubectx | https://kubectx.dev/
- apk - kubectx-fish-completion - 0.11.0-r3: normalized package name match | Alpine Linux edge package indexes: kubectx-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for kubectx | https://kubectx.dev/
- apk - kubectx-zsh-completion - 0.11.0-r3: normalized package name match | Alpine Linux edge package indexes: kubectx-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for kubectx | https://kubectx.dev/
- pacman - kubectx - 0.11.0-1: normalized package name match | Arch Linux sync databases: kubectx from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Utility to manage and switch between kubectl contexts and Kubernetes namespaces | https://github.com/ahmetb/kubectx
- zypper - kubectx - 0.11.0-1.5: normalized package name match | openSUSE Tumbleweed package metadata: kubectx from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Faster way to switch between clusters and namespaces in kubectl | https://github.com/ahmetb/kubectx
- zypper - kubectx-bash-completion - 0.11.0-1.5: normalized package name match | openSUSE Tumbleweed package metadata: kubectx-bash-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Bash Completion for kubectx | https://github.com/ahmetb/kubectx
- zypper - kubectx-fish-completion - 0.11.0-1.5: normalized package name match | openSUSE Tumbleweed package metadata: kubectx-fish-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Fish Completion for kubectx | https://github.com/ahmetb/kubectx
- zypper - kubectx-zsh-completion - 0.11.0-1.5: normalized package name match | openSUSE Tumbleweed package metadata: kubectx-zsh-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Zsh Completion for kubectx | https://github.com/ahmetb/kubectx
- MacPorts - kubectx: normalized package name match | MacPorts ports tree: sysutils/kubectx/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - kubectx: normalized package name match | Chocolatey community package catalog: kubectx from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','kindle'
- Scoop - main/kubectx: normalized package name match | Scoop official bucket manifest trees: bucket/kubectx.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - ahmetb.kubectx: normalized package name match | Windows Package Manager source index: ahmetb.kubectx from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/kubectx.yml](https://github.com/mxcl/pkgdb/blob/main/combined/kubectx.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
