Installation
Linux / macOS
/usr/bin or /usr/local/bin.
Windows
Execute the following command in PowerShell:C:\Program Files\ or C:\Program Files (x86)\.
Using Package Managers
NixOS
Make sure
nix-command and flakes are enabled. Alternatively, use --extra-experimental-features 'nix-command flakes' with nix.result/bin.
Manual Installation
Download the latest release directly from GitHub.Supported Platforms
- Linux (x86 & x64)
- macOS (x86-64 & ARM64)
- Windows (x64)
Personal Access Tokens
Personal access tokens allow you to securely access Zerops from the command line.Creating an Access Token
- Go to Access Token Management in the Zerops GUI
- Click Generate a new access token
- Copy the generated token
Using an Access Token
Log in to Zerops using your token:Managing Access Tokens
You can create multiple access tokens and manage them in the Zerops GUI. Delete tokens anytime from the Access Token Management page.Basic Usage
Configuration
zCLI supports configuration via:- Configuration files (
.zcli.yml) - Environment variables (
ZEROPS_*) - Command-line flags
Command Reference
Account & VPN
login
Log in to Zerops using a personal access token.logout
Disconnect from VPN and log out from your Zerops account.vpn up
Connect to the Zerops VPN for secure access to your services.Automatically disconnect from VPN if already connected
Set custom MTU value for WireGuard interface
Project ID (required when you have access to multiple projects)
Set a default project ID in
.zcli.yml or via the ZEROPS_PROJECTID environment variable. See Configuration.vpn down
Disconnect from the Zerops VPN.Project Management
scope project
Set the scope for a project. All commands requiring a project ID will use the selected one.scope reset
Reset the project scope.project create
Create a new project for a specified organization.Environment isolation rule:
service or noneProject mode:
light or seriousProject name
Organization ID to create the project for
Project tags (comma-separated or repeated flag)
project delete
Delete a project and all its services.Skip confirmation prompts for destructive operations
project env
Display environment variables for the current project scope.Prepend export keyword to each env:
export {{.Key}}={{.Value}}Service name in which context the environment variables are output
Output template
Exclude all non-user environment variables
project list
List all projects you have access to.project project-import
Create a new project with one or more services from a YAML definition.Organization ID (required for multiple organizations)
Custom working directory
project service-import
Create one or more services in an existing project from a YAML definition.Project ID (required when you have access to multiple projects)
Service Operations
service list
List all services in a project.Project ID (required when you have access to multiple projects)
service create
Create a new service in a specified project.Environment variables as secrets (comma-separated or repeated flag)
File with environment variables (max 1.0 MiB)
Service mode:
ha or non_haService name
Create service only if none with the same name exists
service push
Build and deploy your application to Zerops. This is the recommended deployment method.Create a tar.gz archive with application code
Include the .git folder in the upload
Disable logs during push
Upload entire working directory as-is (cannot be combined with —workspace-state or —deploy-git-folder)
Project ID (required when you have access to multiple projects)
Service ID (required when you have access to multiple services)
Choose setup to use from zerops.yml
Log additional debug data to the zCLI debug log file
Add a custom version name
Custom working directory
Version of workspace to push:
clean- HEAD without local changesstaged- Only staged filesall- All staged and unstaged files (default)
Custom path to the zerops.yml file
service deploy
Deploy your application to Zerops. Similar topush but focuses on deployment only.
service push.
service start / stop
Start or stop a Zerops service.Project ID (required when you have access to multiple projects)
Service ID (required when you have access to multiple services)
service delete
Delete a Zerops service.Skip confirmation prompts
service enable-subdomain
Enable access to your service through a Zerops subdomain.Zerops subdomains are suitable for testing and development. For production, configure a custom domain.
service log
Get service runtime or build logs to stdout.Continuously poll for new log messages
Log output format:
FULL, SHORT, JSON, or JSONSTREAMCustom log format template
Number of recent log messages to return (1-1000)
Select
APPLICATION or WEBSERVER log messagesFilter by severity level
Show build logs instead of runtime logs
Utility Commands
env
Display global environment variables and their paths.version
Show the current zCLI version.show-debug-logs
Display debug logs for troubleshooting.support
Display information about contacting Zerops support.completion
Generate shell autocompletion scripts.bash- Bash shellfish- Fish shellpowershell- PowerShellzsh- Zsh shell
Common Workflows
Initial Setup
- Install zCLI
- Create a personal access token in the Zerops GUI
- Log in with the token
Deploy an Application
- Ensure you have a
zerops.yamlin your repository root - Navigate to your project directory
- Push your code
Import a Project
- Create an import YAML file (see Import YAML Reference)
- Run the import command
Connect via VPN
- Connect to the VPN
- Access your services using their internal hostnames
View Logs
Configuration Best Practices
Use Configuration Files
Create a.zcli.yml in your project root:
Use Environment Variables
For CI/CD pipelines:Version Control
Add to.gitignore:
Troubleshooting
Enable Verbose Logging
View Debug Logs
VPN Connection Issues
Check the MTU setting:Permission Errors
Ensure you have the necessary permissions in your Zerops account. Contact your project administrator if needed.CI/CD Integration
GitHub Actions
GitLab CI
Related Resources
CLI Configuration
Detailed configuration options and environment variables
CLI Commands
Complete command reference
Import YAML
Learn about project and service import format
zerops.yaml
Build and runtime configuration