This guide provides instructions for installing AgbCloud CLI on Windows using PowerShell.
Before installing AgbCloud CLI, please ensure:
- Windows 10 or later (Windows Server 2016 or later)
- PowerShell 5.1 or later (PowerShell 7+ recommended)
- Internet connection
- Administrator privileges (recommended for PATH configuration)
Install AgbCloud CLI with a single PowerShell command:
powershell -Command "irm https://agbcloud.github.io/agbcloud-cli/windows | iex"The installation script will:
- Detect system architecture (amd64/arm64)
- Download the latest version from GitHub Releases
- Create installation directory (
%LOCALAPPDATA%\agbcloudby default) - Install the binary as
agb.exe - Update PATH environment variable (user-level)
- Verify installation automatically
After installation, verify that AgbCloud CLI is installed correctly:
# Close current PowerShell window and open a new one
Start-Process powershell -Verb RunAs; exit
# Or refresh the environment variables
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")# Check if agb command is available
agb --versionExpected Output:
AgbCloud CLI version 1.0.0
Git commit: abc1234
Build date: 2025-01-15T10:30:00Z
# Display help information
agb --helpExpected Output:
Command line interface for AgbCloud services
Usage:
agb [command]
Available Commands:
image Manage images
login Log in to AgbCloud
logout Log out from AgbCloud
version Show version information
help Help about any command
Flags:
-h, --help help for agb
-v, --verbose Enable verbose output
Use "agb [command] --help" for more information about a command.
# Test image command
agb image --help
# Test version command
agb version# Show help
agb --help
# Show version
agb version
# Login to AgbCloud
agb login
# List available images
agb image list
# Create a custom image
agb image create myImage --dockerfile ./Dockerfile --imageId agb-code-space-1
# Activate an image
agb image activate img-7a8b9c1d0e
# Deactivate an image
agb image deactivate img-7a8b9c1d0e# Use -v flag for detailed output
agb -v image list
agb --verbose login# Error: 'agb' is not recognized as an internal or external commandSolutions:
-
Restart PowerShell or refresh environment variables:
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
-
Check installation directory:
Get-ChildItem "$env:LOCALAPPDATA\agbcloud"
# Error: Failed to download AgbCloud CLISolutions:
- Check internet connection
- Try running the installation command again
- Use manual download from GitHub Releases if needed
# Error: Access denied or execution policy restrictionSolutions:
-
Run as Administrator:
# Right-click PowerShell and select "Run as Administrator" -
Check execution policy:
Get-ExecutionPolicy Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
If you encounter issues:
- Check the installation log for error messages
- Verify system requirements (Windows version, PowerShell version)
- Try manual installation from GitHub Releases
- Contact support with error details and system information
To remove AgbCloud CLI:
# Remove installation directory
Remove-Item -Path "$env:LOCALAPPDATA\agbcloud" -Recurse -Force# Remove from user PATH
$agbPath = "$env:LOCALAPPDATA\agbcloud"
$currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
$newPath = ($currentPath.Split(';') | Where-Object { $_ -ne $agbPath }) -join ';'
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")# This should return an error
agb --version- OS: Windows 10/11, Windows Server 2016+
- Architecture: x64 (amd64) or ARM64
- PowerShell: 5.1+ (7+ recommended)
- Disk Space: ~50MB
- Network: Internet connection for download
- Default:
%LOCALAPPDATA%\agbcloud\agb.exe
- GitHub Repository: https://github.com/agbcloud/agbcloud-cli
- Releases: https://github.com/agbcloud/agbcloud-cli/releases
- Documentation: https://github.com/agbcloud/agbcloud-cli/blob/main/docs/USER_GUIDE.md
- Issues: https://github.com/agbcloud/agbcloud-cli/issues
Note: This installation method downloads the latest stable release. For development versions or specific releases, please visit the GitHub Releases page.