@rindle/cli 0.4.3 → 0.4.4
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 +11 -53
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -15,73 +15,35 @@ This is the network counterpart of [`@rindle/replica`](../replica): both run the
|
|
|
15
15
|
whereas `rindled` is the standalone daemon **executable** that serves many clients over the wire.
|
|
16
16
|
Talk to a running daemon from JS with [`@rindle/daemon-client`](../daemon-client).
|
|
17
17
|
|
|
18
|
-
> The all-TypeScript [`@rindle/server`](../reference/server) is the *reference* implementation of
|
|
19
|
-
> the same wire protocol; `rindled` is its production replacement.
|
|
20
|
-
|
|
21
|
-
## Install & run
|
|
22
|
-
|
|
23
18
|
```sh
|
|
24
19
|
npm i -D @rindle/cli
|
|
25
|
-
npx rindle init # scaffold daemon.json
|
|
20
|
+
npx rindle init # scaffold daemon.json + migrations/
|
|
26
21
|
npx rindle up --migrate --gen shared/schema.gen.ts --watch
|
|
27
22
|
# start + supervise rindled, apply migrations, regenerate the typed schema,
|
|
28
23
|
# and re-run apply/gen whenever migrations/ changes
|
|
29
24
|
```
|
|
30
25
|
|
|
31
|
-
`rindle up` prints the address the daemon is reachable at (default `http://127.0.0.1:7600`) and how
|
|
32
|
-
to talk to it. From another terminal:
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npx rindle status # inspect the running daemon
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
…or from your app, via [`@rindle/daemon-client`](../daemon-client) pointed at the same URL.
|
|
39
|
-
|
|
40
26
|
Installing pulls in exactly one prebuilt-binary package for your platform via
|
|
41
27
|
`optionalDependencies` (the esbuild/napi pattern) — nothing is compiled, and the other platforms'
|
|
42
28
|
binaries are never downloaded.
|
|
43
29
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
`npm run <name>` runs a **script**, so add this to *your* `package.json` to drive `rindle` through
|
|
47
|
-
your package scripts:
|
|
48
|
-
|
|
49
|
-
```jsonc
|
|
50
|
-
{
|
|
51
|
-
"scripts": {
|
|
52
|
-
"rindle": "rindle"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
```
|
|
30
|
+
## Docs
|
|
56
31
|
|
|
57
|
-
|
|
58
|
-
|
|
32
|
+
Full docs — the command reference, flags & env vars, the local dev loop, and remote-daemon usage:
|
|
33
|
+
**[rindle.sh/docs/rindle-cli](https://rindle.sh/docs/rindle-cli)** · markdown mirror:
|
|
34
|
+
[`rindle-cli.md`](https://rindle.sh/docs/rindle-cli.md) · for agents:
|
|
35
|
+
[llms.txt](https://rindle.sh/llms.txt)
|
|
59
36
|
|
|
37
|
+
## Embedding the daemon in your own supervisor
|
|
60
38
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```sh
|
|
66
|
-
npx rindle up --migrate --gen shared/schema.gen.ts --watch
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
That starts and supervises the local `rindled`, waits until it is ready, applies pending
|
|
70
|
-
`migrations/*.sql`, regenerates the `@rindle/client` schema TypeScript, and then watches the
|
|
71
|
-
migrations directory. On each change it re-applies and re-generates; keep your app server/Vite
|
|
72
|
-
process in a separate terminal. Drop `--watch` for a one-shot apply/gen, or use only
|
|
73
|
-
`--migrate` / only `--gen <out>` if your workflow splits those steps.
|
|
74
|
-
|
|
75
|
-
## The daemon (`rindled`)
|
|
76
|
-
|
|
77
|
-
`rindled` is **not** exposed as a CLI command here — this package is a dev convenience, and `rindle
|
|
78
|
-
up` is the way to run a local daemon. The binary still ships (co-located with `rindle`), so for
|
|
79
|
-
embedding it in your own Node supervisor there are programmatic helpers:
|
|
39
|
+
`rindled` is **not** exposed as a CLI command here — `rindle up` is the way to run a local daemon.
|
|
40
|
+
The binary still ships (co-located with `rindle`), so for embedding it in your own Node supervisor
|
|
41
|
+
there are programmatic helpers:
|
|
80
42
|
|
|
81
43
|
```ts
|
|
82
44
|
import { spawnRindled, rindledBinaryPath } from "@rindle/cli";
|
|
83
45
|
|
|
84
|
-
const child = spawnRindled(["--config", "./
|
|
46
|
+
const child = spawnRindled(["--config", "./daemon.json"]); // inherits stdio
|
|
85
47
|
// …or just locate the binary and manage the process yourself:
|
|
86
48
|
const bin = rindledBinaryPath();
|
|
87
49
|
```
|
|
@@ -143,7 +105,3 @@ node scripts/build-npm-packages.mjs --bin-dir ./bins --version 0.1.0 --update-ro
|
|
|
143
105
|
`--update-root` writes this package's `version` + `optionalDependencies` in lockstep. Then publish
|
|
144
106
|
each `npm/<key>` package, then the umbrella. (The binaries + targets live in `package.json` under
|
|
145
107
|
`"rindle"`, the single source of truth shared by the generator and the runtime resolver.)
|
|
146
|
-
|
|
147
|
-
> This package is currently `"private": true` / `0.0.0` while the API surface settles. Clear
|
|
148
|
-
> `private` and set a real version (the generator's `--version`/`--update-root` does the latter)
|
|
149
|
-
> before the first publish.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindle/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -89,12 +89,12 @@
|
|
|
89
89
|
"typescript": "^5.7.0"
|
|
90
90
|
},
|
|
91
91
|
"optionalDependencies": {
|
|
92
|
-
"@rindle/cli-darwin-arm64": "0.4.
|
|
93
|
-
"@rindle/cli-darwin-x64": "0.4.
|
|
94
|
-
"@rindle/cli-linux-arm64-gnu": "0.4.
|
|
95
|
-
"@rindle/cli-linux-arm64-musl": "0.4.
|
|
96
|
-
"@rindle/cli-linux-x64-gnu": "0.4.
|
|
97
|
-
"@rindle/cli-linux-x64-musl": "0.4.
|
|
98
|
-
"@rindle/cli-win32-x64-msvc": "0.4.
|
|
92
|
+
"@rindle/cli-darwin-arm64": "0.4.4",
|
|
93
|
+
"@rindle/cli-darwin-x64": "0.4.4",
|
|
94
|
+
"@rindle/cli-linux-arm64-gnu": "0.4.4",
|
|
95
|
+
"@rindle/cli-linux-arm64-musl": "0.4.4",
|
|
96
|
+
"@rindle/cli-linux-x64-gnu": "0.4.4",
|
|
97
|
+
"@rindle/cli-linux-x64-musl": "0.4.4",
|
|
98
|
+
"@rindle/cli-win32-x64-msvc": "0.4.4"
|
|
99
99
|
}
|
|
100
100
|
}
|