Skip to content

Installation

Install dotsecenv on your system and verify it’s working correctly.

  1. Choose your installation method

    The universal installer is the fastest way to install dotsecenv. It auto-detects your platform, downloads the correct binary, verifies checksums and GPG signatures, and installs shell completions, man pages, and the shell plugin automatically.

    Terminal window
    curl -fsSL https://get.dotsecenv.com/install.sh | bash

    Install a specific version:

    Terminal window
    curl -fsSL https://get.dotsecenv.com/install.sh | bash -s -- --version v1.2.3

    Customize with flags:

    Terminal window
    curl -fsSL https://get.dotsecenv.com/install.sh | bash -s -- \
    --install-dir ~/.local/bin \
    --no-install-shell-plugin

    Or use environment variables (useful for CI/CD):

    Terminal window
    VERSION=v1.2.3 INSTALL_DIR=/opt/bin \
    curl -fsSL https://get.dotsecenv.com/install.sh | bash

    Run with --help for all available options. CLI flags take precedence over environment variables, which take precedence over defaults.

  2. Verify the installation

    Terminal window
    dotsecenv version

    You should see output like:

    version: v0.5.2
    commit: abc1234
    build at: 2025-01-15T10:30:00Z
    go version: go1.24.0
    crypto: GOFIPS140=v1.26.0 (FIPS 140-3 mode enabled)
  3. Install shell completions (if not automatic)

    Terminal window
    # System-wide
    dotsecenv completion bash | sudo tee /etc/bash_completion.d/dotsecenv
    # Or user-level (add to ~/.bashrc)
    eval "$(dotsecenv completion bash)"

After installation, you should be able to:

Terminal window
# Check version
dotsecenv version
# See available commands
dotsecenv --help
# Tab-complete commands (after shell restart)
dotsecenv <TAB>

The universal install script (install.sh) supports both CLI flags and environment variables for every setting. This makes it equally convenient for interactive use (curl | bash -s -- --flags) and automated CI/CD pipelines (ENV_VAR=value curl | bash).

Precedence order: CLI flags > environment variables > defaults.

Terminal window
# Piped (simplest)
curl -fsSL https://get.dotsecenv.com/install.sh | bash
# Piped with CLI flags
curl -fsSL https://get.dotsecenv.com/install.sh | bash -s -- [OPTIONS]
# Piped with environment variables
VERSION=v1.2.3 curl -fsSL https://get.dotsecenv.com/install.sh | bash
# Downloaded and run locally
curl -fsSL https://get.dotsecenv.com/install.sh -o install.sh
chmod +x install.sh
./install.sh --version v1.2.3

Every setting can be configured via a CLI flag or an environment variable. CLI flags take precedence over environment variables.

SettingCLI FlagEnv VarDefaultDescription
Version--version VERSIONVERSIONlatestVersion to install (e.g., v1.2.3)
Install directory--install-dir DIRINSTALL_DIR~/.local/binBinary install path
System install--systemSYSTEM_INSTALL0Install everything system-wide
Shell plugin--[no-]install-shell-pluginINSTALL_SHELL_PLUGIN1 (yes)Install the shell plugin for zsh/bash/fish
Completions--[no-]install-completionsINSTALL_COMPLETIONS1 (yes)Install shell completions for bash, zsh, and fish
Man pages--[no-]install-man-pagesINSTALL_MAN_PAGES1 (yes)Install man pages
TF credentials helper--[no-]install-tf-credentials-helperINSTALL_TF_CREDENTIALS_HELPER1 (yes)Install the Terraform credentials helper
Verification--[no-]verifyVERIFY1 (yes)Verify SHA-256 checksums and GPG signatures
Help-h, --helpShow help and exit
  1. Detects your platform — OS (Linux or macOS) and architecture (x86_64 or arm64)
  2. Resolves the version — Queries the GitHub API for the latest release, or uses the version you specified
  3. Downloads the release archive — From GitHub Releases
  4. Verifies integrity — SHA-256 checksum verification and GPG signature verification (when gpg is available)
  5. Installs the binary — To ~/.local/bin by default (or /usr/local/bin with --system)
  6. Installs shell completions — For bash, zsh, and fish, placed in ~/.local/share/ by default (or system directories with --system)
  7. Installs man pages — To ~/.local/share/man/man1/ by default (or system man directories with --system)
  8. Installs the shell plugin — Clones to ~/.local/share/dotsecenv/plugin/ by default (or system share path with --system). Additionally integrates with detected plugin managers (Oh My Zsh, Zinit, Antidote, Oh My Bash, Fisher, Oh My Fish). Fish conf.d is linked automatically if fish is present.
  9. Installs the Terraform credentials helper — To ~/.terraform.d/plugins/ by default (or system share path with --system). Skip with --no-install-tf-credentials-helper
ComponentDefault (user)--system (macOS)--system (Linux)
Binary~/.local/bin//usr/local/bin//usr/local/bin/
Completions~/.local/share//usr/local/share//usr/share/
Man pages~/.local/share/man/man1//usr/local/share/man/man1//usr/local/share/man/man1/
Shell plugin~/.local/share/dotsecenv/plugin//usr/local/share/dotsecenv/plugin//usr/share/dotsecenv/plugin/
TF helper~/.terraform.d/plugins//usr/local/share/terraform/plugins//usr/share/terraform/plugins/

CI/CD: Install specific version, skip interactive components:

Terminal window
VERSION=v1.2.3 INSTALL_SHELL_PLUGIN=0 INSTALL_MAN_PAGES=0 \
curl -fsSL https://get.dotsecenv.com/install.sh | bash

Custom install directory with Terraform helper:

Terminal window
curl -fsSL https://get.dotsecenv.com/install.sh | bash -s -- \
--install-dir /opt/dotsecenv/bin \
--install-tf-credentials-helper

Minimal install (binary only):

Terminal window
curl -fsSL https://get.dotsecenv.com/install.sh | bash -s -- \
--no-install-shell-plugin \
--no-install-completions \
--no-install-man-pages

Download and inspect before running:

Terminal window
curl -fsSL https://get.dotsecenv.com/install.sh -o install.sh
less install.sh # review the script
bash install.sh --version v1.2.3

Download a specific version from GitHub releases:

Terminal window
VERSION="0.5.2"
curl -LO "https://github.com/dotsecenv/dotsecenv/releases/download/v${VERSION}/dotsecenv_${VERSION}_Linux_x86_64.tar.gz"

All packages are signed with the dotsecenv release key:

pub rsa4096 2025-12-19 [SC] [expires: 2027-12-19]
E60A1740BAEF49284D22EA7D3C376348F0921C59
uid DotSecEnv Releases <release@dotsecenv.com>

Verify the key from multiple sources:

Terminal window
# OpenPGP Keyserver
gpg --keyserver keys.openpgp.org --recv-keys E60A1740BAEF49284D22EA7D3C376348F0921C59
# Keybase
curl https://keybase.io/dotsecenv/pgp_keys.asc | gpg --import

All macOS binaries are code-signed with an Apple Developer ID certificate and notarized by Apple. This ensures Gatekeeper allows the binary to run without security warnings.

Verify code signature:

Terminal window
codesign --verify --verbose /usr/local/bin/dotsecenv
# Expected: valid on disk

Verify notarization status:

Terminal window
spctl --assess --verbose /usr/local/bin/dotsecenv
# Expected: accepted
# source=Notarized Developer ID

View signature details:

Terminal window
codesign -dv --verbose=4 /usr/local/bin/dotsecenv
Terminal window
brew uninstall dotsecenv
brew untap dotsecenv/tap