### Install Zeabur CLI using npx Source: https://github.com/zeabur/cli/blob/main/README.md Installs and runs the Zeabur CLI directly using Node Package Execute (npx). Requires Node.js to be installed on the system. This is the recommended installation method. ```shell npx zeabur --version ``` -------------------------------- ### Upload Local Project to Zeabur using CLI Source: https://context7.com/zeabur/cli/llms.txt Uploads your local project to Zeabur without immediately deploying. This command returns a URL where you can complete the deployment setup. ```bash # Upload current directory npx zeabur upload # Output: # https://dash.zeabur.com/uploads/ ``` -------------------------------- ### Get Help for Zeabur CLI Commands Source: https://github.com/zeabur/cli/blob/main/README.md Displays help information for any Zeabur CLI command, providing details on usage, options, and subcommands. ```shell npx zeabur --help ``` -------------------------------- ### Get Template Details with Zeabur CLI Source: https://context7.com/zeabur/cli/llms.txt Retrieves detailed information about a specific Zeabur template. You can query by template ID or a unique template code. ```bash # Get template by ID npx zeabur template get --id # Get template by code npx zeabur template get --code nextjs-starter ``` -------------------------------- ### Get Zeabur Deployment Info (Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Retrieves the latest deployment information for the current project and service context. ```shell npx zeabur deployment get ``` -------------------------------- ### Get Zeabur Deployment Info using CLI Source: https://context7.com/zeabur/cli/llms.txt Retrieves information about the latest deployment for a service. This can be done using context, for a specific service by name and environment ID, or by service ID and environment ID. ```bash # Get latest deployment using context npx zeabur deployment get # Get deployment for specific service npx zeabur deployment get --service-name my-api --env-id # Get by service ID npx zeabur deployment get --service-id --env-id ``` -------------------------------- ### Get Zeabur Deployment Info (Non-Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Retrieves deployment information using explicit environment and service identifiers. Can omit parameters if contexts are already set. ```shell # get deployment info by name npx zeabur deployment get --env-id --service-name # or by id # npx zeabur deployment get --env-id --service-id ``` -------------------------------- ### Get Zeabur Deployment Logs (Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Fetches the latest deployment logs, either for runtime or build, within the current context. Supports specifying log type. ```shell # get the latest deployment log(runtime) npx zeabur deployment log -t=runtime # get the latest deployment log(build) npx zeabur deployment log -t=build ``` -------------------------------- ### Get Zeabur Deployment Logs (Non-Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Fetches deployment logs (runtime or build) using explicit environment and service identifiers. Supports specifying log type and service ID. ```shell # get runtime logs npx zeabur deployment log -t=runtime --env-id --service-name # get build logs npx zeabur deployment log -t=build --env-id --service-name ``` -------------------------------- ### Deploy Local Project to Zeabur using CLI Source: https://context7.com/zeabur/cli/llms.txt Deploys your local project directly to Zeabur. The CLI packages your code and uploads it to the platform. Options include interactive deployment, deploying to an existing service, deploying with a custom domain, or creating a new service for deployment. ```bash # Interactive deploy - prompts for project, environment, and service npx zeabur deploy # Deploy to existing service npx zeabur deploy --service-id --environment-id # Deploy with custom domain npx zeabur deploy --domain myapp # Create new service for deployment npx zeabur deploy --create --name my-new-service # Output: # Service deployed successfully, you can access it via: # https://dash.zeabur.com/projects//services/?envID= ``` -------------------------------- ### List Templates with Zeabur CLI Source: https://context7.com/zeabur/cli/llms.txt Lists all available Zeabur templates in your account. The output includes the template ID, name, and a brief description. ```bash # List all templates npx zeabur template list # Output: # ID NAME DESCRIPTION # tpl-123 nextjs-app Next.js starter template # tpl-456 express-api Express.js API template ``` -------------------------------- ### List Zeabur Domains using CLI Source: https://context7.com/zeabur/cli/llms.txt Lists all domains configured for a service. This can be done using context or for a specific service by name and environment ID. ```bash # List domains using context npx zeabur domain list # List for specific service npx zeabur domain list --service-name my-api --env-id # Output: # DOMAIN TYPE STATUS ``` -------------------------------- ### List Zeabur Environment Variables using CLI Source: https://context7.com/zeabur/cli/llms.txt Lists all environment variables configured for a service. This can be done using context or for a specific service by name and environment ID. An alias 'var ls' is also available. ```bash # List variables using context npx zeabur variable list # or use alias npx zeabur var ls # List for specific service npx zeabur variable list --service-name my-api --env-id # Output: # KEY VALUE # DATABASE_URL postgresql://... # API_KEY sk-xxx... # NODE_ENV production ``` -------------------------------- ### Create Domain with Zeabur CLI Source: https://context7.com/zeabur/cli/llms.txt Adds a new domain to a Zeabur service. Supports both Zeabur-generated subdomains and custom domains. Requires service name, environment ID, and the desired domain name. Can also handle redirects. ```bash # Interactive mode - prompts for domain type and name npx zeabur domain create # Create generated domain (*.zeabur.app) npx zeabur domain create --service-name my-api --env-id \ --domain myapp --generated # Create custom domain npx zeabur domain create --service-name my-api --env-id \ --domain api.example.com # Create with redirect to existing domain npx zeabur domain create --service-name my-api --env-id \ --domain www.example.com --redirect api.example.com # Output: # Domain myapp.zeabur.app added ``` -------------------------------- ### Deploy Template with Zeabur CLI Source: https://context7.com/zeabur/cli/llms.txt Deploys a Zeabur template from a local or remote YAML file. Templates define complete application stacks. Supports specifying file path, project ID, variables, and skipping validation. ```bash # Deploy from local file npx zeabur template deploy -f ./my-template.yaml # Deploy from remote URL npx zeabur template deploy -f https://example.com/template.yaml # Deploy to specific project npx zeabur template deploy -f ./template.yaml --project-id # Deploy with variables (non-interactive) npx zeabur template deploy -f ./template.yaml \ --var PUBLIC_DOMAIN=myapp \ --var DATABASE_NAME=mydb # Skip template validation npx zeabur template deploy -f ./template.yaml --skip-validation # Example template.yaml: # apiVersion: zeabur.com/v1 # kind: Template # metadata: # name: my-fullstack-app # spec: # variables: # - key: PUBLIC_DOMAIN # type: DOMAIN # name: Domain # description: The subdomain for your app # services: # - name: web # template: NEXTJS ``` -------------------------------- ### View Zeabur Deployment Logs using CLI Source: https://context7.com/zeabur/cli/llms.txt Retrieves build or runtime logs for a deployment, essential for debugging. Logs can be viewed for runtime (default) or build, and can be watched in real-time. Specific deployments can also be targeted. ```bash # Get runtime logs (default) npx zeabur deployment log # Get build logs npx zeabur deployment log -t=build # Get runtime logs explicitly npx zeabur deployment log -t=runtime # With explicit service and environment npx zeabur deployment log -t=runtime --service-name my-api --env-id # Watch logs in real-time npx zeabur deployment log -t=runtime --watch # Get logs for specific deployment npx zeabur deployment log --deployment-id -t=build ``` -------------------------------- ### Create Zeabur Environment Variables using CLI Source: https://context7.com/zeabur/cli/llms.txt Creates new environment variables for a service. Variables can be created interactively, as a single key-value pair, or multiple pairs at once. Confirmation can be skipped with the -y flag. ```bash # Interactive mode - prompts for key=value pairs npx zeabur variable create # Create single variable npx zeabur variable create --name my-api --env-id -k DATABASE_URL=postgresql://localhost:5432/mydb # Create multiple variables npx zeabur variable create --name my-api --env-id \ -k API_KEY=sk-abc123 \ -k DEBUG=true \ -k PORT=3000 # Skip confirmation npx zeabur variable create --name my-api --env-id -k NEW_VAR=value -y ``` -------------------------------- ### Manage Zeabur Projects (Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Provides commands to list and set the project context interactively. Uses arrow keys for selection, simplifying resource management. ```shell # list all projects npx zeabur project ls # set project context, the following commands will use this project context # you can use arrow keys to select the project npx zeabur context set project ``` -------------------------------- ### Authenticate Zeabur CLI with Browser Source: https://github.com/zeabur/cli/blob/main/README.md Logs into Zeabur CLI by opening a browser window for authentication. This method is suitable when a graphical environment is available. ```shell npx zeabur auth login ``` -------------------------------- ### Redeploy Zeabur Service using CLI Source: https://context7.com/zeabur/cli/llms.txt Triggers a new deployment for a service, pulling the latest code from the connected repository. This can be done using context or for a specific service by name and environment ID. ```bash # Redeploy using context npx zeabur service redeploy # Redeploy specific service npx zeabur service redeploy --name my-api --env-id ``` -------------------------------- ### Restart Zeabur Service using CLI Source: https://context7.com/zeabur/cli/llms.txt Restarts a specified service on Zeabur. It can be done using context, explicit service and environment names, or by service ID. Confirmation can be skipped with the -y flag. ```bash npx zeabur service restart npx zeabur service restart --service-name my-api --env-id npx zeabur service restart --service-id --env-id npx zeabur service restart --name my-api --env-id -y ``` -------------------------------- ### Manage Zeabur Services (Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Lists and manages services within the current project context interactively. Allows setting service context for subsequent commands. ```shell # list all services in the project npx zeabur service ls # set service context(optional) npx zeabur context set service ``` -------------------------------- ### Manage Zeabur Environments (Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Allows setting the environment context interactively, which can be used for subsequent commands related to services or deployments. ```shell # set environment context(optional) npx zeabur context set env ``` -------------------------------- ### Authenticate Zeabur CLI with Token Source: https://github.com/zeabur/cli/blob/main/README.md Logs into Zeabur CLI using a pre-generated authentication token. This is useful for automated or non-interactive login scenarios. ```shell npx zeabur auth login --token ``` -------------------------------- ### Manage Zeabur Projects (Non-Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Lists projects and sets project context using explicit parameters, suitable for scripting and CI/CD pipelines. Disables interactive prompts with `-i=false`. ```shell # list all projects npx zeabur project ls -i=false # set project context by name npx zeabur context set project --name # or by id # npx zeabur context set project --id ``` -------------------------------- ### Generate Shell Completion Scripts with Zeabur CLI Source: https://context7.com/zeabur/cli/llms.txt Generates shell completion scripts for various shells including bash, zsh, fish, and PowerShell. This helps in autocompleting Zeabur CLI commands and arguments. ```bash # Generate bash completion npx zeabur completion bash > /etc/bash_completion.d/zeabur # Generate zsh completion npx zeabur completion zsh > "${fpath[1]}/_zeabur" # Generate fish completion npx zeabur completion fish > ~/.config/fish/completions/zeabur.fish # Generate PowerShell completion npx zeabur completion powershell > zeabur.ps1 ``` -------------------------------- ### Update Zeabur Environment Variables using CLI Source: https://context7.com/zeabur/cli/llms.txt Updates existing environment variables for a service by specifying the service name, environment ID, and the key-value pair to update. ```bash # Update variable value npx zeabur variable update --name my-api --env-id -k DATABASE_URL=postgresql://newhost:5432/mydb ``` -------------------------------- ### Manage Zeabur Services (Non-Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Lists services and sets service context using explicit parameters like name or ID, ideal for automated workflows. ```shell # list all services in the project npx zeabur service ls # set service context by name npx zeabur context set service --name # or by id # npx zeabur context set service --id ``` -------------------------------- ### Export Zeabur Environment Variables using CLI Source: https://context7.com/zeabur/cli/llms.txt Exports environment variables in shell format, suitable for local development. The output can be piped to 'eval' to set the variables in the current shell session. ```bash # Export variables to stdout npx zeabur variable env --name my-api --env-id # Output: # export DATABASE_URL="postgresql://..." # export API_KEY="sk-xxx..." # Use with eval for local development eval $(npx zeabur variable env --name my-api --env-id ) ``` -------------------------------- ### Delete Domain with Zeabur CLI Source: https://context7.com/zeabur/cli/llms.txt Removes a domain from a Zeabur service. Requires the service name, environment ID, and the domain name to be deleted. ```bash # Delete domain npx zeabur domain delete --service-name my-api --env-id --domain myapp.zeabur.app ``` -------------------------------- ### Enable Debug Mode with Zeabur CLI Source: https://context7.com/zeabur/cli/llms.txt Enables debug logging for troubleshooting Zeabur CLI issues. Debug mode provides verbose output, including API calls and internal state, and can be applied to any Zeabur command. ```bash # Enable debug mode for any command npx zeabur --debug auth login npx zeabur --debug deploy npx zeabur --debug service list # Debug output includes: # - API request/response details # - Authentication token info (partially redacted) # - Internal state transitions ``` -------------------------------- ### Suspend Zeabur Service using CLI Source: https://context7.com/zeabur/cli/llms.txt Temporarily stops a service to save resources. Services can be suspended interactively, by name, or by ID. The confirmation skip flag (-y) is available. ```bash # Suspend service interactively npx zeabur service suspend # Suspend by name npx zeabur service suspend --name my-api-service --env-id # Suspend by ID with confirmation skip npx zeabur service suspend --id --env-id -y # Output: # Service suspended successfully ``` -------------------------------- ### Restart Zeabur Service (Non-Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Restarts a service using explicit environment and service identifiers (name or ID). Useful for CI/CD pipelines where context might not be pre-set. ```shell # restart service by name npx zeabur service restart --env-id --service-name # or by id # npx zeabur service restart --env-id --service-id ``` -------------------------------- ### Restart Zeabur Service (Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Restarts the currently selected service. Assumes the service context has been set. ```shell npx zeabur service restart ``` -------------------------------- ### Manage Zeabur Environments (Non-Interactive Mode) Source: https://github.com/zeabur/cli/blob/main/README.md Sets the environment context using its ID, which is necessary for non-interactive commands that require environment specification. ```shell # set environment context(only --id is supported) npx zeabur context set env --id ``` -------------------------------- ### Delete Zeabur Environment Variables using CLI Source: https://context7.com/zeabur/cli/llms.txt Removes environment variables from a service by specifying the service name, environment ID, and the key of the variable to delete. ```bash # Delete variable npx zeabur variable delete --name my-api --env-id --key DATABASE_URL ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.