Skip to main content
Skip to main content
🚧 Work in Progress

Available Commands

Usage​

zcli {command} [flags]

Example output​

bash
Welcome in Zerops!
You are loged as <Name> <Email>
and your VPN connection is not active.

Usage:
──────
zcli [flags]
zcli [command]

Available Commands:
───────────────────
completion Generate the autocompletion script for the specified shell
env Displays global environment variables, their paths and additional options
help Help about any command
login Login into Zerops with generated Zerops token
logout Disconnect from VPN and log out from your Zerops account
project Project commands group
push Builds your application in Zerops and deploys it
scope Scope commands group
service Zerops service commands group
show-debug-logs Shows zCLI debug logs
support How to contact Zerops support for assistance
version Shows the current zCLI version
vpn VPN commands group

Flags:
──────
-h, --help help for zcli

Use "zcli [command] --help" for more information about a command.

Commands​


help​

This command lists available commands and flags on a command by placing help, -h or --help flag after the command.

zcli help
# or
zcli --help
# or
zcli -h

env​

Displays global environment variables, their paths and additional options.

zcli env [flags]

Available flags​

  • -h, --help: Help for the env command

completion​

Generate the autocompletion script for the specified shell.

zcli completion {bash|fish|powershell|zsh} [flags]

Available flags​

  • -h, --help: Help for completion
  • --no-descriptions: Disable completion descriptions (bash only)

login​

Logs you into Zerops. Use a generated Zerops token or your login e-mail and password.

zcli login <token>

project​

Project related commands.

zcli project {sub-command} [arguments] [flags]

Available sub-commands​

  • delete: Deletes a project and all of its services
  • list: Lists all projects
  • project-import: Creates a new project with one or more services
  • service-import: Creates one or more Zerops services in an existing project

Available flags​

  • delete

    • --confirm: If set, zCLI will not ask for confirmation of destructive operations
    • --projectId <id>: Required if you have access to multiple projects
    • -h, --help: Help for project delete
  • list

    • -h, --help: Help for project list
  • project-import

    • --orgId <id>: Required if you have access to multiple organizations
    • --workingDir <path>: Sets custom working directory (default: "./")
    • -h, --help: Help for project import

push​

zcli push {flags}

Available flags​

  • --archiveFilePath <path>: Creates a tar.gz archive of the application code at the specified path relative to the working directory. If not set, no archive is created.
  • --deployGitFolder: Includes the .git folder in the upload. By default, the .git folder is excluded.
  • --projectId <project-id>: Required if you have access to multiple projects. Specifies the target project ID for command execution.
  • --serviceId <service-id>: Required if you have access to multiple services. Specifies the target service ID for command execution.
  • --versionName <version-name>: Sets a custom version name. If the VERSIONNAME environment variable exists, its value is used automatically.
  • --workingDir <path>: Sets a custom working directory. Defaults to the current directory (./).
  • --zeropsYamlPath <path>: Specifies a custom path to the zerops.yml file relative to the working directory. By default, zCLI looks for zerops.yml in the working directory.

scope​

zcli scope [sub-command] <project-id>

Available sub-commands​

  • project: Sets the scope for project. All commands that require project ID will use the selected one.
  • reset: Resets the scope for project and service.

Required parameters​

  • project-id

service​

Service related commands.

zcli service {sub-command} [arguments] [flags]

Available sub-commands​

  • delete - Deletes the Zerops service
  • deploy - Deploys your application to Zerops
  • enable-subdomain - Enables access through Zerops subdomain
  • list - Lists all services in the project
  • log - Get service runtime or build log to stdout
  • push - Builds your application in Zerops and deploys it
  • start - Starts the Zerops service
  • stop - Stops the Zerops service

Available flags​

  • delete

    • --confirm: If set, zCLI will not ask for confirmation of destructive operations
    • --projectId <id>: Required if you have access to multiple projects
    • --serviceId <id>: Required if you have access to multiple services
  • deploy

    • --archiveFilePath <path>: Creates a tar.gz archive of the application code at the specified path
    • --deployGitFolder: Includes the .git folder in the upload
    • --projectId <id>: Required if you have access to multiple projects
    • --serviceId <id>: Required if you have access to multiple services
    • --versionName <name>: Sets a custom version name
    • --workingDir <path>: Sets a custom working directory (default: ./)
    • --zeropsYamlPath <path>: Specifies a custom path to the zerops.yml file
  • enable-subdomain

    • --projectId <id>: Required if you have access to multiple projects
    • --serviceId <id>: Required if you have access to multiple services
  • list

    • --projectId <id>: Required if you have access to multiple projects
  • log

    • --follow: Continuously poll for new log messages
    • --format <format>: The format of returned log messages (FULL, SHORT, JSON, JSONSTREAM)
    • --formatTemplate <template>: Set a custom log format
    • --limit <number>: Number of most recent log messages to return (1-1000, default: 100)
    • --messageType <type>: Select APPLICATION or WEBSERVER log messages
    • --minimumSeverity <severity>: Returns log messages with requested or higher severity
    • --projectId <id>: Required if you have access to multiple projects
    • --serviceId <id>: Required if you have access to multiple services
    • --showBuildLogs: Return build log messages instead of runtime log messages
  • push

    • Same flags as deploy
  • start

    • --projectId <id>: Required if you have access to multiple projects
    • --serviceId <id>: Required if you have access to multiple services
  • stop

    • --projectId <id>: Required if you have access to multiple projects
    • --serviceId <id>: Required if you have access to multiple services

.deployignore​

Add a .deployignore file to the root of your project to specify which files and folders Zerops should ignore during deploy. The syntax is the same as a .gitignore file.

Example to ignore src/file.txt file in deploy:

zerops.yml
zerops:
- setup: app
build:
deployFiles: ./
.deployignore
src / file.txt;

show-debug-logs​

Log debug-logs

zcli show-debug-logs

version​

Shows zCLI's current version

zcli version

vpn​

zcli vpn [up|down] <projectId> [flags]

Available sub-commands​

  • up: Connects to the Zerops VPN.
  • down: Disconnects from the Zerops VPN.

Available flags​

  • --auto-disconnect: if set, zCLI will automatically disconnect from the VPN if it is already connected
  • --projectId: if you have access to more than one project, you must specify the project ID for which the command is to be executed