CLI tool to switch between multiple versions of istioctl
Project description
istioswitch
A cross-platform CLI tool for Windows, Linux, and macOS to switch between multiple versions of istioctl binaries easily. Inspired by tfswitch.
Features
- Cross-Platform: Native support for Windows (x64), Linux (amd64, arm64), and macOS (Intel, Apple Silicon).
- Standalone Binaries: No Python required! Download the executable and run it directly.
- Automated Downloads: Fetches binaries directly from official Istio GitHub releases.
- Auto-Detection: Detects the required Istio version from your current Kubernetes cluster (
istiodimage). - Shim Management: Automatically manages wrapper scripts injected into your PATH.
- Caching: Caches downloaded versions locally to avoid repeated downloads.
Installation
Option 1: Download Standalone Binary (Recommended)
You can download the pre-compiled binary for your OS directly from the GitHub Releases page.
- Download the executable:
- Windows:
istioswitch-windows-amd64.exe(rename it toistioswitch.exe) - Linux:
istioswitch-linux-amd64(rename toistioswitchandchmod +x istioswitch) - macOS:
istioswitch-darwin-amd64(rename toistioswitchandchmod +x istioswitch)
- Windows:
- Place the executable in a directory that is in your system's
PATH.
Option 2: Install via pip
If you prefer using Python, you can install the tool via pip:
pip install istioswitch
(Note: If not published on PyPI yet, clone the repo and run pip install .)
Post-installation Setup (Shim configuration)
To allow istioswitch to switch istioctl versions on the fly, it creates a "shim" (a small wrapper script) that needs to be accessible globally.
You must add its bin directory to your PATH:
- Windows (PowerShell):
$env:PATH += ";$env:USERPROFILE\.istioswitch\bin" [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH, [System.EnvironmentVariableTarget]::User)
- Linux/macOS:
export PATH="$HOME/.istioswitch/bin:$PATH"
(Add the Linux/macOS line to your ~/.bashrc or ~/.zshrc to make it persistent).
Usage
List available and cached versions:
istioswitch list
Install a specific version without switching to it:
istioswitch install 1.25.3
Use a specific version (will download and install it if missing):
istioswitch use 1.25.3
Show the currently active version:
istioswitch current
Detect Istio version from the current Kubernetes context and use it:
istioswitch detect
(Tip: You can pass a specific context using istioswitch detect --context my-cluster-ctx)
Uninstall a cached version to free up disk space:
istioswitch uninstall 1.24.6
Contributing
We follow GitHub Flow:
mainis always stable.- Open a PR for any features/fixes from a
feature/*orhotfix/*branch. - Squash merges are preferred to maintain a clean history.
- Ensure all tests pass (
pytest --cov). We maintain an 80% coverage minimum.
GitHub Branch Protection Rules (For Admins)
- Require a Pull Request before merging to
main. - Require status checks to pass (CI workflows).
- Require at least 1 approving review.
- No force pushes allowed on
main.
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file istioswitch-0.4.0.tar.gz.
File metadata
- Download URL: istioswitch-0.4.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73cc759425792d778c93d0c4136f91085303186f08af40da150991f78fb20928
|
|
| MD5 |
ad00bc6ff3d26299c91f70ba37e0d413
|
|
| BLAKE2b-256 |
b44a2846cfef657ce771865b5be27ddc38c990f19139da9a1c57126ff9173697
|
Provenance
The following attestation bundles were made for istioswitch-0.4.0.tar.gz:
Publisher:
release-please.yml on crux85/istioswitch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
istioswitch-0.4.0.tar.gz -
Subject digest:
73cc759425792d778c93d0c4136f91085303186f08af40da150991f78fb20928 - Sigstore transparency entry: 1181878500
- Sigstore integration time:
-
Permalink:
crux85/istioswitch@68e6f8e22543645e2f215ac23e6122afcf9c80dd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/crux85
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@68e6f8e22543645e2f215ac23e6122afcf9c80dd -
Trigger Event:
push
-
Statement type:
File details
Details for the file istioswitch-0.4.0-py3-none-any.whl.
File metadata
- Download URL: istioswitch-0.4.0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
369313f94f795049cc414ccee7cd474140e9824461aac148f579fe3bf4bee063
|
|
| MD5 |
f4ac6825d3c18c0956b0cbf8fef996de
|
|
| BLAKE2b-256 |
b649756d1b61dd036c06a5931f68cca1a5ccf8fe8754a290065b62abca6f1681
|
Provenance
The following attestation bundles were made for istioswitch-0.4.0-py3-none-any.whl:
Publisher:
release-please.yml on crux85/istioswitch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
istioswitch-0.4.0-py3-none-any.whl -
Subject digest:
369313f94f795049cc414ccee7cd474140e9824461aac148f579fe3bf4bee063 - Sigstore transparency entry: 1181878507
- Sigstore integration time:
-
Permalink:
crux85/istioswitch@68e6f8e22543645e2f215ac23e6122afcf9c80dd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/crux85
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yml@68e6f8e22543645e2f215ac23e6122afcf9c80dd -
Trigger Event:
push
-
Statement type: