@volcano.dev/cli 0.0.4 → 0.1.0
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 +43 -104
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,144 +1,83 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Volcano CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Volcano is a hosting platform for building applications with functions,
|
|
4
|
+
databases, and authentication. Deploy backend logic, provision PostgreSQL
|
|
5
|
+
databases, and add user authentication—all through a unified API. The `volcano`
|
|
6
|
+
CLI helps you scaffold, run, and manage Volcano projects from your terminal.
|
|
6
7
|
|
|
7
8
|
## Quickstart
|
|
8
9
|
|
|
9
|
-
Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
curl -fsSL https://github.com/Kong/volcano-cli/releases/latest/download/install.sh | bash
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Or install from npm:
|
|
10
|
+
Install with npm:
|
|
16
11
|
|
|
17
12
|
```bash
|
|
18
13
|
npm install -g @volcano.dev/cli
|
|
19
14
|
volcano --help
|
|
20
15
|
```
|
|
21
16
|
|
|
22
|
-
|
|
23
|
-
platform-specific binary from the matching GitHub Release and verifies it
|
|
24
|
-
against that release's `SHA256SUMS`. Set `VOLCANO_SKIP_DOWNLOAD=1` to skip the
|
|
25
|
-
download (it is fetched on first run instead).
|
|
26
|
-
|
|
27
|
-
Build from source:
|
|
17
|
+
Or install with pnpm:
|
|
28
18
|
|
|
29
19
|
```bash
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
./volcano --version
|
|
33
|
-
make test
|
|
20
|
+
pnpm add -g @volcano.dev/cli
|
|
21
|
+
volcano --help
|
|
34
22
|
```
|
|
35
23
|
|
|
36
|
-
|
|
24
|
+
Or install with Bun:
|
|
37
25
|
|
|
38
26
|
```bash
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
cd ../volcano-quickstart
|
|
42
|
-
"$VOLCANO_CLI" init javascript
|
|
43
|
-
"$VOLCANO_CLI" start
|
|
44
|
-
"$VOLCANO_CLI" variables deploy
|
|
45
|
-
"$VOLCANO_CLI" functions deploy --all
|
|
46
|
-
"$VOLCANO_CLI" config deploy
|
|
47
|
-
"$VOLCANO_CLI" migrations deploy --all -d app
|
|
27
|
+
bun add -g @volcano.dev/cli
|
|
28
|
+
volcano --help
|
|
48
29
|
```
|
|
49
30
|
|
|
50
|
-
|
|
51
|
-
files, migrations directory, and README). Use a template to add
|
|
52
|
-
language-specific files: `javascript` (aliases: `js`, `node`, `nodejs`),
|
|
53
|
-
`nextjs`, `python`, or `ruby`.
|
|
54
|
-
|
|
55
|
-
## Authentication
|
|
56
|
-
|
|
57
|
-
New to Volcano? Create an account from the CLI:
|
|
31
|
+
Or install with Homebrew:
|
|
58
32
|
|
|
59
33
|
```bash
|
|
60
|
-
volcano
|
|
34
|
+
brew install Kong/volcano/volcano
|
|
35
|
+
volcano --help
|
|
61
36
|
```
|
|
62
37
|
|
|
63
|
-
|
|
64
|
-
when available (press Enter to accept, or type a different address), then
|
|
65
|
-
opens Volcano's web signup flow in your browser. Once you finish in the
|
|
66
|
-
browser, the CLI completes the device-authorization handshake and saves your
|
|
67
|
-
credentials to `~/.volcano/config.json` — so a single command signs you up
|
|
68
|
-
**and** logs you in.
|
|
69
|
-
|
|
70
|
-
Already have an account? Authenticate with `volcano login`:
|
|
38
|
+
Or install manually:
|
|
71
39
|
|
|
72
40
|
```bash
|
|
73
|
-
|
|
74
|
-
volcano
|
|
75
|
-
|
|
76
|
-
# Token-based login (for CI/CD)
|
|
77
|
-
volcano login --token pk-xxxxxxxxxx
|
|
78
|
-
|
|
79
|
-
# Or skip login entirely with an environment variable
|
|
80
|
-
export VOLCANO_TOKEN=pk-xxxxxxxxxx
|
|
41
|
+
curl -fsSL https://github.com/Kong/volcano-cli/releases/latest/download/install.sh | bash
|
|
42
|
+
volcano --help
|
|
81
43
|
```
|
|
82
44
|
|
|
83
|
-
|
|
84
|
-
token — revoke it in the Volcano dashboard to fully cut off access):
|
|
45
|
+
Create a project directory and start local development:
|
|
85
46
|
|
|
86
47
|
```bash
|
|
87
|
-
volcano
|
|
48
|
+
mkdir volcano-quickstart
|
|
49
|
+
cd volcano-quickstart
|
|
50
|
+
volcano init javascript
|
|
51
|
+
volcano start
|
|
52
|
+
volcano variables deploy
|
|
53
|
+
volcano functions deploy --all
|
|
54
|
+
volcano config deploy
|
|
55
|
+
volcano migrations deploy --all -d app
|
|
88
56
|
```
|
|
89
57
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
`VOLCANO_WEB_URL` only to force a specific web origin.
|
|
95
|
-
|
|
96
|
-
## Project configuration (`volcano-config.yaml`)
|
|
97
|
-
|
|
98
|
-
`volcano config deploy` reconciles declarative project configuration
|
|
99
|
-
(`volcano/volcano-config.yaml` or `./volcano-config.yaml`) against the active
|
|
100
|
-
target — the same manifest applies to local mode and cloud.
|
|
101
|
-
|
|
102
|
-
Functions may declare scheduled invocations. `name` and `cron` are required;
|
|
103
|
-
`enabled` (default `true`), `payload`, and `regions` are optional. A function
|
|
104
|
-
entry is valid if it sets `public` **or** declares at least one scheduler.
|
|
105
|
-
|
|
106
|
-
```yaml
|
|
107
|
-
version: 1
|
|
108
|
-
functions:
|
|
109
|
-
- name: hello
|
|
110
|
-
public: false
|
|
111
|
-
schedulers:
|
|
112
|
-
- name: refresh-cache # required, unique per function (the reconcile key)
|
|
113
|
-
cron: "*/5 * * * *"
|
|
114
|
-
enabled: true
|
|
115
|
-
payload: { job: refresh }
|
|
116
|
-
regions: [us-east-1] # omit to let the server pick one deployed region
|
|
117
|
-
```
|
|
58
|
+
`volcano init` without a template creates a base scaffold (environment
|
|
59
|
+
files, migrations directory, and README). Use a template to add
|
|
60
|
+
language-specific files: `javascript` (aliases: `js`, `node`, `nodejs`),
|
|
61
|
+
`nextjs`, `python`, or `ruby`.
|
|
118
62
|
|
|
119
|
-
|
|
120
|
-
are enforced; fields you omit are left server-managed.** An omitted `enabled`,
|
|
121
|
-
`payload`, or `regions` keeps whatever the scheduler already has on the server
|
|
122
|
-
(on first create the server applies its defaults — `enabled: true`, an empty
|
|
123
|
-
payload, and one chosen region). In particular, `config deploy` will not
|
|
124
|
-
re-enable a scheduler you disabled out of band unless the manifest sets
|
|
125
|
-
`enabled: true`. `cron` is always required and enforced.
|
|
63
|
+
More detail lives in `docs/`:
|
|
126
64
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
65
|
+
- [Installation details](docs/installation.md)
|
|
66
|
+
- [Authentication](docs/authentication.md)
|
|
67
|
+
- [Project configuration](docs/project-configuration.md)
|
|
68
|
+
- [CLI operations overview](docs/cli/overview.md)
|
|
69
|
+
- [Documentation search (`volcano docs`)](docs/docs-search.md)
|
|
132
70
|
|
|
133
71
|
## Contributing
|
|
134
72
|
|
|
135
|
-
See
|
|
136
|
-
notes, and pull request expectations.
|
|
137
|
-
|
|
73
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for local workflows, generated-code
|
|
74
|
+
guidance, building from source, release notes, and pull request expectations.
|
|
75
|
+
Participation is governed by [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
|
|
138
76
|
|
|
139
77
|
If you believe you have found a security vulnerability, do not open a public
|
|
140
|
-
issue. Follow
|
|
78
|
+
issue. Follow [SECURITY.md](SECURITY.md) instead.
|
|
141
79
|
|
|
142
80
|
## License
|
|
143
81
|
|
|
144
|
-
Volcano CLI is licensed under the Apache License, Version 2.0. See
|
|
82
|
+
Volcano CLI is licensed under the Apache License, Version 2.0. See
|
|
83
|
+
[LICENSE](LICENSE).
|
package/package.json
CHANGED