Skip to content

Installation

This guide covers all installation methods for cuenv across different platforms and environments.

  • Operating System: Linux, macOS, or Windows (WSL2 recommended)
  • Rust: 1.70 or later
  • Memory: 4 GB RAM minimum, 8 GB recommended
  • Storage: 1 GB free space
  • Nix Package Manager: For enhanced package management features
  • Docker: For containerized environments
  • Git: For version control integration

If you have Nix installed, this is the preferred way to install cuenv:

Terminal window
# Install from flake
nix profile install github:cuenv/cuenv
# Or run directly
nix run github:cuenv/cuenv -- --help

For macOS and Linux users with Homebrew:

Terminal window
brew install cuenv/cuenv
Terminal window
cargo install cuenv-cli

Download pre-built binaries from the releases page.

Build from source for the latest development features:

Terminal window
# Clone the repository
git clone https://github.com/cuenv/cuenv.git
cd cuenv
# Build with optimizations
cargo build --release
# Install to cargo bin directory
cargo install --path crates/cuenv-cli

For contributors and developers:

Terminal window
# Clone and enter development environment
git clone https://github.com/cuenv/cuenv.git
cd cuenv
# Enter the development shell
nix develop
# Or using direnv (if configured)
direnv allow
Terminal window
# Install dependencies
sudo apt update
sudo apt install build-essential pkg-config libssl-dev
# Install Rust if not already installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Install cuenv
cargo install cuenv-cli
Terminal window
# Install dependencies
sudo dnf install gcc pkg-config openssl-devel
# Install Rust if not already installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Install cuenv
cargo install cuenv-cli
Terminal window
# Install dependencies
sudo pacman -S base-devel openssl pkg-config
# Install Rust if not already installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Install cuenv
cargo install cuenv-cli
Terminal window
brew install cuenv/cuenv
Terminal window
# Install Xcode Command Line Tools
xcode-select --install
# Install Rust if not already installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Install cuenv
cargo install cuenv-cli
Terminal window
# Install WSL2 and Ubuntu
wsl --install -d Ubuntu
# Follow Linux installation steps inside WSL
Terminal window
# Install Visual Studio Build Tools
# Download from: https://visualstudio.microsoft.com/downloads/
# Install Rust
# Download from: https://rustup.rs/
# Install cuenv
cargo install cuenv-cli

After installation, verify cuenv is working correctly:

Terminal window
# Check version
cuenv version
# Test basic functionality
mkdir test-cuenv
cd test-cuenv
# Create a simple configuration
echo 'package cuenv' > env.cue
echo 'env: {}' >> env.cue
echo 'tasks: {}' >> env.cue
# Verify it loads
cuenv env print

Add to ~/.bashrc:

Terminal window
# cuenv shell integration
source <(cuenv shell init bash)

Add to ~/.zshrc:

Terminal window
# cuenv shell integration
source <(cuenv shell init zsh)

Add to ~/.config/fish/config.fish:

# cuenv shell integration
cuenv shell init fish | source
Terminal window
# For CUE syntax highlighting (available now)
code --install-extension cuelang.cue

Add CUE syntax support with vim-cue:

" Add to your vimrc
Plug 'jjo/vim-cue'

Command not found

Ensure ~/.cargo/bin is in your PATH:

Terminal window
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Permission denied

On Linux/macOS, ensure the binary is executable:

Terminal window
chmod +x ~/.cargo/bin/cuenv

Build failures

Update Rust to the latest version:

Terminal window
rustup update

SSL/TLS errors

Update certificates and try again:

Terminal window
# Ubuntu/Debian
sudo apt update && sudo apt install ca-certificates
# macOS
brew install ca-certificates

If you encounter issues:

  1. Check the troubleshooting guide
  2. Search existing GitHub issues
  3. Create a new issue with:
    • Your operating system and version
    • Rust version (rustc --version)
    • Installation method used
    • Complete error message

After installation: