@gonvex/cli 0.1.9 → 0.1.12
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 +58 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +947 -39
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +2 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/templates/vite-react/_gitignore +10 -0
- package/dist/templates/vite-react/gonvex/_generated/react.ts +2 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -25,6 +25,28 @@ Most apps run it through a package script:
|
|
|
25
25
|
|
|
26
26
|
## Commands
|
|
27
27
|
|
|
28
|
+
Authenticate with an account session or an existing personal access token:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx gonvex login --runtime-url https://gonvex.example.com --email you@example.com
|
|
32
|
+
npx gonvex login --runtime-url https://gonvex.example.com --token gvx_pat_...
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Create a scoped account token and provision a project without leaving the terminal:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx gonvex token create "Developer CLI"
|
|
39
|
+
npx gonvex project create my-app
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The default token permissions are `projects:read`, `projects:create`, and
|
|
43
|
+
`projects:keys:read`. Use repeated `--permission` flags or `--permission 'projects:*'`
|
|
44
|
+
to choose broader owner-scoped access. Dashboard administrators can combine
|
|
45
|
+
`projects:*` with `admin:projects` for runtime-wide project automation, or create the
|
|
46
|
+
same admin key from their profile in the dashboard. Account credentials are stored
|
|
47
|
+
per runtime in a user config file with mode `0600`; project credentials stay in the
|
|
48
|
+
app's `.env.local`.
|
|
49
|
+
|
|
28
50
|
Initialize Gonvex files in an existing app:
|
|
29
51
|
|
|
30
52
|
```bash
|
|
@@ -55,16 +77,52 @@ Manage project environment variables:
|
|
|
55
77
|
|
|
56
78
|
```bash
|
|
57
79
|
npx gonvex env list
|
|
80
|
+
npx gonvex env get NAME
|
|
58
81
|
npx gonvex env set NAME value
|
|
59
82
|
npx gonvex env push .env.production
|
|
60
83
|
npx gonvex env remove NAME
|
|
61
84
|
```
|
|
62
85
|
|
|
86
|
+
Enable native Google login for an app without Firebase or a per-app Google Cloud
|
|
87
|
+
project:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx gonvex auth add google --origin http://localhost:5173
|
|
91
|
+
npx gonvex auth status
|
|
92
|
+
npx gonvex auth doctor
|
|
93
|
+
npx gonvex auth users
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The command registers the exact callback with the runtime and writes
|
|
97
|
+
`gonvex/auth.tsx`, which exports a configured provider, hook, and Google sign-in
|
|
98
|
+
button. A Gonvex installation operator configures one central Google OAuth client;
|
|
99
|
+
future app projects reuse it through the runtime.
|
|
100
|
+
|
|
101
|
+
For a new app, provision and wire everything at once:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npm create gonvex@latest my-app -- --runtime-url https://gonvex.example.com --google-auth --origin https://my-app.example.com
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Both single-database and multi-tenant projects are supported. Use
|
|
108
|
+
`--signup-mode personal|inviteOnly`, `gonvex auth tenants`, and
|
|
109
|
+
`gonvex auth memberships` for workspace onboarding. An invite-only app created in
|
|
110
|
+
one command also takes `--owner <verified-google-email>` to bootstrap its first
|
|
111
|
+
scope/workspace invitation. Retire a callback with
|
|
112
|
+
`gonvex auth remove google --origin <url>` without disabling the provider.
|
|
113
|
+
|
|
63
114
|
`env push` resolves the file from the selected project root and atomically
|
|
64
115
|
replaces that project's server-side environment-variable set. Pass a dedicated
|
|
65
116
|
deployment env file; the CLI refuses to upload `GONVEX_PROJECT_KEY` and related
|
|
66
117
|
CLI credentials.
|
|
67
118
|
|
|
119
|
+
Environment commands require a runtime built from Gonvex v0.1.9 or newer. The
|
|
120
|
+
CLI sends the selected project key in both supported authentication headers, and
|
|
121
|
+
the runtime scopes that key to the exact project in the request. If environment
|
|
122
|
+
commands return `dashboard sign-in is required` while `gonvex dev --once` works,
|
|
123
|
+
upgrade and recreate the runtime; updating this npm package alone does not update
|
|
124
|
+
the deployed Go runtime.
|
|
125
|
+
|
|
68
126
|
## Runtime Settings
|
|
69
127
|
|
|
70
128
|
The CLI reads `.env.local` and `.env`:
|
package/dist/index.d.ts
CHANGED