This guide provides comprehensive instructions for installing and configuring APEX on Windows systems.
- Windows 10 (version 1903 or later)
- Windows 11
- Windows Server 2019 or later
-
Node.js 18 or higher
- Download from nodejs.org
- Choose the LTS version for stability
- Includes npm package manager
-
Git for Windows
- Download Git for Windows
- Provides Git Bash, Git GUI, and Git from Command Line
- Required for all APEX Git operations
-
Terminal Application
- Windows Terminal (recommended) - Microsoft Store
- Command Prompt (built-in)
- PowerShell 5.1+ (built-in)
- Git Bash (included with Git for Windows)
- Windows Subsystem for Linux (WSL2) - For advanced development workflows
- Visual Studio Code - Code editor with excellent Git and terminal integration
- Windows Package Manager (winget) - For package installation
This method works with any terminal application.
# Using winget (Windows 10 1909+ or Windows 11)
winget install OpenJS.NodeJS
# Or download and install manually from https://nodejs.org/# PowerShell (recommended)
npm install -g @apexcli/cli
# Command Prompt
npm install -g @apexcli/cliapex --version
apex --help# Install Node.js first if not already installed
winget install OpenJS.NodeJS
# Install APEX via npm
npm install -g @apexcli/cliFor contributing to APEX or local development:
# Clone the repository
git clone https://github.com/JoshuaAFerguson/apex.git
cd apex
# Install dependencies
npm install
# Build all packages
npm run build
# Link for global usage
npm link
# Verify installation
apex --versionAPEX requires an Anthropic API key. Choose one method below:
PowerShell:
$env:ANTHROPIC_API_KEY="your_api_key_here"Command Prompt:
set ANTHROPIC_API_KEY=your_api_key_hereOption A: System Properties GUI
- Press
Win + R, typesysdm.cpl, press Enter - Click "Environment Variables" button
- Under "User variables", click "New"
- Variable name:
ANTHROPIC_API_KEY - Variable value:
your_api_key_here - Click OK and restart your terminal
Option B: PowerShell (Administrator required)
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "your_api_key_here", "User")
# Restart your terminal after running thisOption C: Command Prompt (Administrator required)
setx ANTHROPIC_API_KEY "your_api_key_here"
# Restart your terminal after running thisTest that everything is working:
# Check APEX installation
apex --version
# Check API key (should not show "not set" error)
apex config
# Test basic functionality
cd your-project-directory
apex initIf apex command is not recognized after installation:
- Find npm global installation path:
npm config get prefix
# Usually: C:\Users\<username>\AppData\Roaming\npm- Add to PATH environment variable:
- Follow the same steps as API key setup
- Add the npm global path to your PATH variable
- Restart your terminal
Windows Terminal (Recommended):
- Best Unicode and color support
- Multiple tab support
- Customizable appearance
- Works with PowerShell, Command Prompt, and Git Bash
PowerShell:
- Native Windows scripting environment
- Full APEX compatibility
- Good for automation scripts
Command Prompt:
- Basic but reliable
- Full APEX functionality
- Familiar to Windows users
Git Bash:
- Unix-like environment
- May have minor display formatting differences
- Good for developers familiar with Unix commands
If you encounter script execution errors in PowerShell:
# Check current execution policy
Get-ExecutionPolicy
# Set policy to allow local scripts (recommended)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Or allow all scripts (less secure, use with caution)
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUserWindows Defender may occasionally flag Node.js operations:
-
Add npm global directory to exclusions:
- Open Windows Security
- Go to Virus & threat protection
- Add exclusion for folder:
%APPDATA%\npm
-
Add your project directories to exclusions if you encounter performance issues
# Navigate to your project
cd C:\Users\<username>\Projects\my-project
# Initialize APEX
apex init
# Follow the prompts for project configuration
# Run your first task
apex run "Add a health check endpoint to the API"# Start the APEX API server
apex serve
# Or with custom options
apex serve --port 3000 --host 0.0.0.0Since Windows service management is not yet implemented, use these alternatives:
- Open Task Scheduler (
Win + R→taskschd.msc) - Create Basic Task
- Name: "APEX Service"
- Trigger: "When the computer starts"
- Action: "Start a program"
- Program/script:
cmd.exe - Arguments:
/c "cd /d C:\path\to\your\project && apex serve"
# Install NSSM
winget install NSSM.NSSM
# Create Windows service
nssm install apex-service
# In the NSSM GUI:
# - Application path: <path-to-node.exe>
# - Startup directory: <your-project-path>
# - Arguments: <path-to-apex-cli> serveSolution:
- Ensure npm global directory is in PATH
- Restart your terminal
- Try reinstalling:
npm uninstall -g @apexcli/cli && npm install -g @apexcli/cli
Solution:
- Run terminal as Administrator (not recommended for regular use)
- Or configure npm to use a user directory:
npm config set prefix %APPDATA%\npm
Solution:
- Download Node.js installer directly from nodejs.org
- Run as Administrator
- Ensure "Add to PATH" is checked during installation
- Restart your computer if necessary
Solution:
- Ensure Git for Windows is installed
- Add Git to PATH: usually
C:\Program Files\Git\bin - Test with:
git --version
- Use Windows Terminal instead of Command Prompt
- Add project directories to Windows Defender exclusions
- Use an SSD for better file I/O performance
- Increase PowerShell buffer size in terminal settings
- Enable Developer Mode in Windows Settings
- Use WSL2 for Linux-like development environment
- Install Windows Terminal Preview for latest features
- Getting Started Guide - Basic usage instructions
- Troubleshooting Guide - Common issues and solutions
- Configuration Guide - Advanced configuration options
- Windows Terminal - Modern terminal application
- Windows Package Manager - Package installation
- PowerShell - Windows PowerShell documentation
- GitHub Issues - Report Windows-specific issues
- GitHub Discussions - Community help
✅ Fully Supported:
- Core APEX functionality (task orchestration, AI agents, workflows)
- CLI interface and all commands
- API server and WebSocket streaming
- Git operations and worktree management
- Build, test, and development workflows
- Database operations (SQLite)
- File operations and project management
- Service management (manual alternatives available)
- Some Unix-specific file operations (automatically skipped in tests)
🔄 Planned:
- Native Windows service integration
- PowerShell-specific optimizations
- Windows-specific deployment options
APEX provides excellent Windows compatibility for all core functionality. While some Unix-specific features like service management are not yet implemented, workarounds are available and Windows service support is planned for future releases.