Installation

This guide covers installing EnvFly CLI on different operating systems and package managers.

Prerequisites

Before installing EnvFly CLI, ensure you have:
  • Node.js 14.0.0 or higher
  • npm or yarn package manager
  • Git (for Git storage provider)

Quick Install

npm install -g envfly-cli

yarn

yarn global add envfly-cli

pnpm

pnpm add -g envfly-cli

Verify Installation

After installation, verify that EnvFly CLI is working:
envfly --version
You should see output similar to:
envfly-cli/1.0.0

Platform-Specific Installation

macOS

Using Homebrew

# Install Homebrew if you haven't already
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install EnvFly CLI
brew install envfly-cli

Using npm

npm install -g envfly-cli

Linux

Ubuntu/Debian

# Update package list
sudo apt update

# Install Node.js and npm (if not already installed)
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs

# Install EnvFly CLI
sudo npm install -g envfly-cli

CentOS/RHEL/Fedora

# Install Node.js and npm (if not already installed)
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
sudo yum install -y nodejs

# Install EnvFly CLI
sudo npm install -g envfly-cli

Arch Linux

# Install Node.js and npm (if not already installed)
sudo pacman -S nodejs npm

# Install EnvFly CLI
sudo npm install -g envfly-cli

Windows

Using Chocolatey

# Install Chocolatey if you haven't already
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

# Install EnvFly CLI
choco install envfly-cli

Using npm

npm install -g envfly-cli

Using Scoop

# Install Scoop if you haven't already
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex

# Install EnvFly CLI
scoop install envfly-cli

Development Installation

If you want to install from source for development:
# Clone the repository
git clone https://github.com/adarsh-technocrat/EnvFly-CLI.git
cd EnvFly-CLI

# Install dependencies
npm install

# Link globally for development
npm link

Docker Installation

You can also run EnvFly CLI using Docker:
# Pull the image
docker pull envfly/cli:latest

# Run commands
docker run --rm -v $(pwd):/workspace envfly/cli:latest init
docker run --rm -v $(pwd):/workspace envfly/cli:latest list

Installation Options

Global vs Local Installation

Version Management

Using nvm (Node Version Manager)

# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# Install specific Node.js version
nvm install 18
nvm use 18

# Install EnvFly CLI
npm install -g envfly-cli

Using fnm (Fast Node Manager)

# Install fnm
curl -fsSL https://fnm.vercel.app/install | bash

# Install specific Node.js version
fnm install 18
fnm use 18

# Install EnvFly CLI
npm install -g envfly-cli

Troubleshooting

Common Installation Issues

Platform-Specific Issues

macOS Issues

# If you get permission errors on macOS
sudo npm install -g envfly-cli

# Or use Homebrew for better permission management
brew install envfly-cli

Windows Issues

# If PowerShell execution policy blocks installation
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

# If you get path issues, restart your terminal after installation

Linux Issues

# If you get permission errors on Linux
sudo npm install -g envfly-cli

# Or install for current user only
npm install -g envfly-cli --prefix ~/.npm-global
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Uninstallation

To remove EnvFly CLI:
# Using npm
npm uninstall -g envfly-cli

# Using yarn
yarn global remove envfly-cli

# Using pnpm
pnpm remove -g envfly-cli

# Using Homebrew (macOS)
brew uninstall envfly-cli

# Using Chocolatey (Windows)
choco uninstall envfly-cli

Next Steps

After successful installation:
  1. Initialize a project: envfly init
  2. Check available commands: envfly --help
  3. Read the getting started guide: Getting Started