Installation and configuration¶
This guide covers supported platforms, installation methods, required setup steps, how helm-env discovers configuration, and common troubleshooting.
Supported platforms¶
Prebuilt binaries are currently produced for:
darwin/amd64darwin/arm64linux/amd64linux/arm64
If your platform is not listed, install from source.
Prerequisites¶
- A POSIX-like shell (e.g.
bashorzsh). - Permission to create and write files in your chosen
HELMENV_ROOTdirectory. - Network access to GitHub:
helm-env install,helm-env latest, andhelm-env list-remotefetch information from GitHub.
No existing helm installation is required; helm-env manages the helm binaries it installs.
Install methods¶
- Download the binary for your platform from the project's GitHub releases.
- Make it executable and move it into a directory on your
PATH.
Example (Linux x86_64):
The binary will be available at build/helm-env.
Initial setup¶
1) Choose and export HELMENV_ROOT¶
HELMENV_ROOT is required. It defines where helm-env stores installed versions, the shim, and the global version file.
Add this to your shell profile (e.g. ~/.bashrc or ~/.zshrc):
Required permissions:
helm-env initcreates directories under$HELMENV_ROOT.helm-env installwriteshelmbinaries under$HELMENV_ROOT/versions/<version>/helm.helm-env globalwrites$HELMENV_ROOT/version.
2) Initialize shell integration¶
Add the following to your shell profile, after the HELMENV_ROOT export. Pick the tab for your shell:
Add to ~/.bashrc:
Add to ~/.zshrc:
Add to ~/.config/fish/config.fish:
What eval "$(helm-env init)" does:
- Prepends
$HELMENV_ROOT/shimsto yourPATHsohelmresolves to the shim. - Defines an
helm-envshell function that enableshelm-env shellto affect the current shell environment.
Optionally, enable shell completion (bash, zsh, fish or powershell; see the CLI reference):
3) Install an helm version¶
Or install the latest stable version:
4) Configure which version to use¶
Pick one of:
- Global default (applies everywhere unless overridden):
- Per-directory (creates
.helm-versionin the current directory):
- Per-shell session (sets
HELMENV_VERSION; requireseval "$(helm-env init)"):
Environment variables¶
| Variable | Purpose | Default |
|---|---|---|
HELMENV_ROOT |
Required. Where versions, shims, the global version file and the cache live. | none |
HELMENV_VERSION |
Shell-level version (highest priority). Usually set by helm-env shell. |
unset |
HELMENV_AUTO_INSTALL |
When truthy (1, true, yes, on, case-insensitive), missing versions are installed automatically by the shim, helm-env resolve and helm-env exec. exec --no-auto overrides it per call. |
unset (disabled) |
HELMENV_CACHE_TTL |
Freshness of the release-list cache, as a Go duration (30m, 24h, 0s disables). See caching. |
1h |
SHELL |
Used by helm-env completion to pick a shell when none is given. |
from your login shell |
Example: install whatever .helm-version asks for on first use.
export HELMENV_AUTO_INSTALL=1
cd my-chart # contains .helm-version with "~3.14"
helm version # installs the newest 3.14.x on first run, then runs it
How configuration is discovered/loaded¶
When the helm shim runs, it selects a version using this priority order:
HELMENV_VERSION(shell version).helm-versionin the current directory or any parent directory (local version)$HELMENV_ROOT/version(global version)
Notes:
- The
.helm-versionlookup walks upward until the filesystem root. - All version values are treated as strings and trimmed for whitespace.
Common troubleshooting¶
HELMENV_ROOT not set¶
Symptoms:
helm-env initprints instructions and exits with an error.
Fix
Export HELMENV_ROOT and re-run shell integration:
helm-env: no helm version configured¶
This is emitted by the helm shim when none of the version sources are configured.
version <X> not installed¶
helm-env validates that a version is installed before setting it via global, local, or shell, and the shim also verifies the installed binary is present.
GitHub API rate limit exceeded¶
Some commands query the GitHub releases API. If GitHub returns 403, helm-env reports a rate limit error.
Fix
- Wait and retry later.
- If running in CI or heavily automated use, consider reducing frequency of
list-remote/latestcalls.