@gonvex/cli 0.1.4 → 0.1.6
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 +89 -0
- package/package.json +5 -4
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# @gonvex/cli
|
|
2
|
+
|
|
3
|
+
The Gonvex CLI for app-local development with the Gonvex runtime.
|
|
4
|
+
|
|
5
|
+
Gonvex gives you a Convex-style workflow with Go backend functions, generated
|
|
6
|
+
TypeScript bindings, React hooks, realtime subscriptions, and a local runtime
|
|
7
|
+
backed by Postgres.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -D @gonvex/cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Most apps run it through a package script:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "gonvex dev -- vite",
|
|
21
|
+
"gonvex:dev": "gonvex dev"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Commands
|
|
27
|
+
|
|
28
|
+
Initialize Gonvex files in an existing app:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx gonvex init
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Watch `gonvex/`, regenerate bindings, sync the runtime, and optionally run your
|
|
35
|
+
frontend dev server:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx gonvex dev -- vite
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Run a one-shot sync for CI or Docker builds:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx gonvex dev --once
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
By default, `gonvex dev` streams only runtime warnings and errors to the
|
|
48
|
+
terminal. To tail every query, mutation, and action:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx gonvex dev --verbose-logs -- vite
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Manage project environment variables:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx gonvex env list
|
|
58
|
+
npx gonvex env set NAME value
|
|
59
|
+
npx gonvex env remove NAME
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Runtime Settings
|
|
63
|
+
|
|
64
|
+
The CLI reads `.env.local` and `.env`:
|
|
65
|
+
|
|
66
|
+
```txt
|
|
67
|
+
GONVEX_PROJECT_ID=my-project
|
|
68
|
+
GONVEX_RUNTIME_URL=http://localhost:8080
|
|
69
|
+
GONVEX_PROJECT_KEY=gvx_...
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
For Vite/browser clients, also expose:
|
|
73
|
+
|
|
74
|
+
```txt
|
|
75
|
+
VITE_GONVEX_PROJECT_ID=my-project
|
|
76
|
+
VITE_GONVEX_URL=http://localhost:8080
|
|
77
|
+
VITE_GONVEX_WS_URL=ws://localhost:8080/ws
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Related Packages
|
|
81
|
+
|
|
82
|
+
- `@gonvex/client` - browser WebSocket client
|
|
83
|
+
- `@gonvex/react` - React provider and hooks
|
|
84
|
+
- `@gonvex/protocol` - shared TypeScript protocol types
|
|
85
|
+
- `create-gonvex` - project initializer
|
|
86
|
+
|
|
87
|
+
## Documentation
|
|
88
|
+
|
|
89
|
+
Full docs live at https://desarso.github.io/gonvex/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gonvex/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"gonvex": "./dist/index.js"
|
|
@@ -21,11 +21,12 @@
|
|
|
21
21
|
},
|
|
22
22
|
"types": "./dist/index.d.ts",
|
|
23
23
|
"files": [
|
|
24
|
-
"dist"
|
|
24
|
+
"dist",
|
|
25
|
+
"README.md"
|
|
25
26
|
],
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@gonvex/
|
|
28
|
-
"@gonvex/
|
|
28
|
+
"@gonvex/react": "0.1.2",
|
|
29
|
+
"@gonvex/client": "0.1.2"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/node": "^24.12.4",
|