Giter VIP home page Giter VIP logo

cli's Introduction

Zeabur CLI

Zeabur's official command line tool

Note: Zeabur CLI is currently in beta, and we are still working on it. If you have any questions or suggestions, please feel free to contact us.

How cool it is

  1. Manage your Zeabur resources with CLI
  2. Login with browser or token
  3. Intuitive and easy to use
  4. The design of the context makes it easier for you to manage services.
  5. The seamless integration of interactive and non-interactive modes.

Quick Start

1. Install

Using Script

Linux/macOS:

curl -sSL https://dub.sh/zeabur | bash

Windows

iwr -useb https://dub.sh/zb-win | iex

(then restart your powershell)

HomeBrew (Linux/macOS)

brew install zeabur/tap/cli

Scoop (Windows)

scoop bucket add zeabur https://github.com/zeabur/cli
scoop install zeabur

2. Login

If you can open the browser:

zeabur auth login

Or you can use token to login:

zeabur auth login --token <your-token>

Zeabur CLI will open a browser window and ask you to login with your Zeabur account.

3. Manage your resources(Interactive mode, recommended)

asciicast

# list all projects
zeabur project ls

# set project context, the following commands will use this project context
# you can use arrow keys to select the project
zeabur context set project

# list all services in the project
zeabur service ls

# set service context(optional)
zeabur context set service

# set environment context(optional)
zeabur context set env

# restart the service
zeabur service restart

# get the latest deployment info
zeabur deployment get

# get the latest deployment log(runtime)
zeabur deployment log -t=runtime

# get the latest deployment log(build)
zeabur deployment log -t=build

4. Manage your resources(Non-interactive mode)

Non-interactive mode is useful when you want to use Zeabur CLI in a script(such as CI/CD pipeline, etc.)

Note: you can add -i=false to all commands to disable interactive mode. In fact, if the parameters are complete, it's same whether you use interactive mode or not.

# list all projects
zeabur project ls -i=false

# set project context, the following commands will use this project context
zeabur context set project --name <project-name>
# or you can use project id
# zeabur context set project --id <project-id>

# list all services in the project
zeabur service ls

# set service context(optional)
zeabur context set service --name <service-name>
# or you can use service id
# zeabur context set service --id <service-id>

# set environment context(optional)(only --id is supported)
zeabur context set env --id <env-id>

# restart the service
# if service context is set, you can omit the service name; so does environment context
zeabur service restart --env-id <env-id> --service-name <service-name>
# or you can use service id
# zeabur service restart --env-id <env-id> --service-id <service-id>

# get the latest deployment info(if contexts are set, you can omit the parameters)
zeabur deployment get --env-id <env-id> --service-name <service-name>
# or you can use service id
# zeabur deployment get --env-id <env-id> --service-id <service-id>

# get the latest deployment log(runtime)(service id is also supported)
zeabur deployment log -t=runtime --env-id <env-id> --service-name <service-name>
# get the latest deployment log(build)(service id is also supported)
zeabur deployment log -t=build --env-id <env-id> --service-name <service-name>
  1. More commands
zeabur <command> --help

Development Guide

Development Guide

Acknowledgements

  1. GitHub
    • GitHub provides us a place to store the source code of this project and running the CI/CD pipeline.
    • cli/cli provides significant inspiration for the organizational structure of this project.
    • cli/oauth we write our own CLI browser OAuth flow based on this project.

cli's People

Contributors

aflybird0 avatar michaelyuhe avatar abdfnx avatar goreleaserbot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.