zeabur 0.2.9 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -0
- package/package.json +6 -2
- package/zeabur_darwin_amd64_v1/zeabur +0 -0
- package/zeabur_darwin_arm64/zeabur +0 -0
- package/zeabur_linux_amd64_v1/zeabur +0 -0
- package/zeabur_linux_arm64/zeabur +0 -0
- package/zeabur_windows_amd64_v1/zeabur.exe +0 -0
- package/zeabur_windows_arm64/zeabur.exe +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Zeabur CLI
|
|
2
|
+
|
|
3
|
+
[Zeabur](https://zeabur.com/)'s official command line tool
|
|
4
|
+
|
|
5
|
+
> 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.
|
|
6
|
+
|
|
7
|
+
## How cool it is
|
|
8
|
+
|
|
9
|
+
1. Manage your Zeabur resources with CLI
|
|
10
|
+
2. Login with browser or token
|
|
11
|
+
3. Intuitive and easy to use
|
|
12
|
+
4. The design of the context makes it easier for you to manage services.
|
|
13
|
+
5. The seamless integration of interactive and non-interactive modes.
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### 1. Login
|
|
18
|
+
|
|
19
|
+
If you can open the browser:
|
|
20
|
+
|
|
21
|
+
```shell
|
|
22
|
+
npx zeabur auth login
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Or you can use token to login:
|
|
26
|
+
```shell
|
|
27
|
+
npx zeabur auth login --token <your-token>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Zeabur CLI will open a browser window and ask you to login with your Zeabur account.
|
|
31
|
+
|
|
32
|
+
### 3. Manage your resources(Interactive mode, recommended)
|
|
33
|
+
|
|
34
|
+
[](https://asciinema.org/a/Olf52EUOCrKU6NGJMbYTw24SL)
|
|
35
|
+
|
|
36
|
+
```shell
|
|
37
|
+
# list all projects
|
|
38
|
+
npx zeabur project ls
|
|
39
|
+
|
|
40
|
+
# set project context, the following commands will use this project context
|
|
41
|
+
# you can use arrow keys to select the project
|
|
42
|
+
npx zeabur context set project
|
|
43
|
+
|
|
44
|
+
# list all services in the project
|
|
45
|
+
npx zeabur service ls
|
|
46
|
+
|
|
47
|
+
# set service context(optional)
|
|
48
|
+
npx zeabur context set service
|
|
49
|
+
|
|
50
|
+
# set environment context(optional)
|
|
51
|
+
npx zeabur context set env
|
|
52
|
+
|
|
53
|
+
# restart the service
|
|
54
|
+
npx zeabur service restart
|
|
55
|
+
|
|
56
|
+
# get the latest deployment info
|
|
57
|
+
npx zeabur deployment get
|
|
58
|
+
|
|
59
|
+
# get the latest deployment log(runtime)
|
|
60
|
+
npx zeabur deployment log -t=runtime
|
|
61
|
+
|
|
62
|
+
# get the latest deployment log(build)
|
|
63
|
+
npx zeabur deployment log -t=build
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 4. Manage your resources(Non-interactive mode)
|
|
67
|
+
|
|
68
|
+
Non-interactive mode is useful when you want to use Zeabur CLI in a script(such as CI/CD pipeline, etc.)
|
|
69
|
+
|
|
70
|
+
Note: you can add `-i=false` to all commands to disable interactive mode.
|
|
71
|
+
**In fact, if the parameters are complete, it's same whether you use interactive mode or not.**
|
|
72
|
+
|
|
73
|
+
```shell
|
|
74
|
+
# list all projects
|
|
75
|
+
npx zeabur project ls -i=false
|
|
76
|
+
|
|
77
|
+
# set project context, the following commands will use this project context
|
|
78
|
+
npx zeabur context set project --name <project-name>
|
|
79
|
+
# or you can use project id
|
|
80
|
+
# npx zeabur context set project --id <project-id>
|
|
81
|
+
|
|
82
|
+
# list all services in the project
|
|
83
|
+
npx zeabur service ls
|
|
84
|
+
|
|
85
|
+
# set service context(optional)
|
|
86
|
+
npx zeabur context set service --name <service-name>
|
|
87
|
+
# or you can use service id
|
|
88
|
+
# npx zeabur context set service --id <service-id>
|
|
89
|
+
|
|
90
|
+
# set environment context(optional)(only --id is supported)
|
|
91
|
+
npx zeabur context set env --id <env-id>
|
|
92
|
+
|
|
93
|
+
# restart the service
|
|
94
|
+
# if service context is set, you can omit the service name; so does environment context
|
|
95
|
+
npx zeabur service restart --env-id <env-id> --service-name <service-name>
|
|
96
|
+
# or you can use service id
|
|
97
|
+
# npx zeabur service restart --env-id <env-id> --service-id <service-id>
|
|
98
|
+
|
|
99
|
+
# get the latest deployment info(if contexts are set, you can omit the parameters)
|
|
100
|
+
npx zeabur deployment get --env-id <env-id> --service-name <service-name>
|
|
101
|
+
# or you can use service id
|
|
102
|
+
# npx zeabur deployment get --env-id <env-id> --service-id <service-id>
|
|
103
|
+
|
|
104
|
+
# get the latest deployment log(runtime)(service id is also supported)
|
|
105
|
+
npx zeabur deployment log -t=runtime --env-id <env-id> --service-name <service-name>
|
|
106
|
+
# get the latest deployment log(build)(service id is also supported)
|
|
107
|
+
npx zeabur deployment log -t=build --env-id <env-id> --service-name <service-name>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
5. More commands
|
|
111
|
+
|
|
112
|
+
```shell
|
|
113
|
+
npx zeabur <command> --help
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Development Guide
|
|
117
|
+
|
|
118
|
+
[Development Guide](docs/development_guide.md)
|
|
119
|
+
|
|
120
|
+
## Acknowledgements
|
|
121
|
+
|
|
122
|
+
1. GitHub
|
|
123
|
+
* GitHub provides us a place to store the source code of this project and running the CI/CD pipeline.
|
|
124
|
+
* [cli/cli](https://github.com/cli/cli) provides significant inspiration for the organizational structure of this project.
|
|
125
|
+
* [cli/oauth](https://github.com/cli/oauth) we write our own CLI browser OAuth flow based on this project.
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|