pulumi-env
Manage Pulumi environment configurations
TLDR
List all environments
Create an environment
Set a value in an environment
Edit an environment definition
Delete a value from an environment
Delete an environment entirely
Display help
SYNOPSIS
pulumi-env [command] [arguments...]
PARAMETERS
install
Installs a specified version of the Pulumi CLI. Versions are typically fetched from Pulumi's official release channels.
use
Sets the specified Pulumi CLI version for the current shell session. This allows temporary switching without affecting other shells or projects.
global
Sets the specified Pulumi CLI version as the default for all shells. This version will be used unless overridden by a local or session-specific setting.
local
Sets the specified Pulumi CLI version for the current directory and its subdirectories. This is useful for project-specific versioning, managed by a .pulumi-version file.
versions
Lists all installed Pulumi CLI versions on the system, indicating the currently active, global, and local versions.
uninstall
Removes a specified installed version of the Pulumi CLI from the system.
rehash
Rebuilds the Pulumi shims (executables) to reflect changes in installed versions. This command is often needed after installing or uninstalling versions.
init
Initializes pulumi-env for the current shell. This typically involves setting up environment variables and shell functions for proper operation.
help
Displays help information and a list of available commands.
DESCRIPTION
pulumi-env is a community-driven command-line tool designed to manage multiple versions of the Pulumi CLI on a single system. Modeled after popular version managers like pyenv for Python or nvm for Node.js, it provides a convenient way to install, switch, and manage different Pulumi CLI versions without conflicts. This is particularly useful for developers working on projects that require specific Pulumi versions, or for testing compatibility across different versions. It helps ensure consistent development environments and simplifies the process of upgrading or downgrading the Pulumi CLI.
CAVEATS
pulumi-env is a community-maintained tool and is not officially supported by Pulumi Inc. Its functionality depends on the continued availability and structure of Pulumi's public CLI release channels. Proper installation requires manual setup of shell environment variables (e.g., modifying PATH) to ensure its shims are prioritized over system-wide Pulumi installations.
DISTINCTION FROM PULUMI STACKS
It's important to distinguish pulumi-env from Pulumi's concept of stacks. While Pulumi stacks represent isolated environments for your infrastructure deployments (e.g., 'dev', 'staging', 'prod'), pulumi-env focuses solely on managing the version of the Pulumi CLI executable itself. It does not manage your infrastructure deployments or their configurations.
INSTALLATION AND SETUP
Installation typically involves cloning the pulumi-env Git repository and adding its bin directory to your shell's PATH environment variable, usually through your shell's configuration file (e.g., .bashrc, .zshrc). The init command helps automate parts of this setup.
HISTORY
pulumi-env emerged from the need within the Pulumi community for a robust and standardized way to manage different versions of the Pulumi CLI. Prior to tools like pulumi-env, managing multiple Pulumi versions often involved manual downloads, PATH manipulation, or containerization, which could be cumbersome. It was developed to provide a familiar and convenient '-env' style version management experience, mirroring successful patterns seen in other language ecosystems.