@turbobase/cli 1.1.7 → 1.1.10
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 +230 -70
- package/dist/turbobase-standalone.mjs +130 -125
- package/dist/turbobase.js +127 -122
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
# turbobase
|
|
2
2
|
|
|
3
|
-
The
|
|
4
|
-
and conduits — against a running TurboBase instance. It talks to the instance
|
|
5
|
-
over its HTTP API using a personal access token (PAT); it is **not** a way to
|
|
6
|
-
stand up TurboBase yourself (instances are provisioned and operated as a managed
|
|
7
|
-
service — see [console.turbobase.io](https://console.turbobase.io/)).
|
|
3
|
+
The command-line interface to your [TurboBase](https://turbobase.io/) instance.
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
Build and ship the apps your team uses, author the extensions that run inside
|
|
6
|
+
your instance, promote a reviewed configuration from sandbox to production, and
|
|
7
|
+
give an AI coding agent the context it needs to work against your live data
|
|
8
|
+
model — all from one binary, over your instance's HTTP API.
|
|
9
|
+
|
|
10
|
+
**Full documentation: [docs.turbobase.io](https://docs.turbobase.io/)**
|
|
11
|
+
|
|
12
|
+
TurboBase is a managed service: your instance is provisioned and operated for
|
|
13
|
+
you at [console.turbobase.io](https://console.turbobase.io/). This CLI drives an
|
|
14
|
+
instance you already have — it is not a way to run the platform yourself.
|
|
11
15
|
|
|
12
16
|
## Install
|
|
13
17
|
|
|
@@ -15,105 +19,261 @@ server uses, so the CLI and the Claude Code surface never drift.
|
|
|
15
19
|
curl -fsSL https://console.turbobase.io/install-cli.sh | bash
|
|
16
20
|
```
|
|
17
21
|
|
|
18
|
-
On Windows:
|
|
22
|
+
On Windows:
|
|
23
|
+
|
|
24
|
+
```powershell
|
|
25
|
+
powershell -c "irm https://console.turbobase.io/install-cli.ps1 | iex"
|
|
26
|
+
```
|
|
19
27
|
|
|
20
28
|
The installer verifies the download's checksum, installs into `~/.turbobase`,
|
|
21
|
-
and puts `turbobase` on your PATH — no sudo, no package manager.
|
|
22
|
-
|
|
29
|
+
and puts `turbobase` on your PATH — no sudo, no package manager. If the machine
|
|
30
|
+
has no suitable Node.js it fetches a private one rather than touching your
|
|
31
|
+
system install.
|
|
23
32
|
|
|
24
|
-
This npm package is the same CLI for anyone who would rather manage it
|
|
25
|
-
their other global tools:
|
|
33
|
+
This npm package is the same CLI, for anyone who would rather manage it
|
|
34
|
+
alongside their other global tools:
|
|
26
35
|
|
|
27
36
|
```sh
|
|
28
37
|
npm install -g @turbobase/cli
|
|
29
38
|
turbobase --version
|
|
30
39
|
```
|
|
31
40
|
|
|
32
|
-
|
|
33
|
-
one-line install leaves out; `turbobase ext extras install` fetches them on demand
|
|
34
|
-
(an npm install already has them as dependencies).
|
|
41
|
+
Requires **Node 22, or 24 and newer**.
|
|
35
42
|
|
|
36
|
-
##
|
|
43
|
+
## Sign in
|
|
37
44
|
|
|
38
|
-
Mint a
|
|
39
|
-
it. This is the only sign-in path
|
|
45
|
+
Mint a personal access token in your TurboBase app under **Settings › Access
|
|
46
|
+
tokens**, then hand it to the CLI. This is the only sign-in path.
|
|
40
47
|
|
|
41
48
|
```sh
|
|
42
49
|
turbobase auth login --base-url https://acme.turbobase.app --token tb_pat_xxxxxxxx
|
|
43
50
|
```
|
|
44
51
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
the base URL doesn't serve the `/v1` API (the local-dev trap of pointing at the
|
|
50
|
-
app dev-server port instead of the instance API) or if the token is rejected —
|
|
51
|
-
pass `--no-verify` to skip the probe.
|
|
52
|
+
The instance you last signed in to becomes the **active default**, so you never
|
|
53
|
+
repeat `--base-url` for the instance you're working on — pass it only to reach a
|
|
54
|
+
*different* stored instance. One machine can hold credentials for many
|
|
55
|
+
instances.
|
|
52
56
|
|
|
53
57
|
```sh
|
|
54
|
-
turbobase auth status
|
|
55
|
-
turbobase auth use https://beta.turbobase.app # switch the
|
|
56
|
-
turbobase auth logout
|
|
58
|
+
turbobase auth status # the active instance (*) and every stored sign-in
|
|
59
|
+
turbobase auth use https://beta.turbobase.app # switch the default, no token re-paste
|
|
60
|
+
turbobase auth logout # drop a sign-in (--base-url <url> / --all)
|
|
57
61
|
```
|
|
58
62
|
|
|
59
|
-
Credentials
|
|
60
|
-
`
|
|
61
|
-
|
|
63
|
+
Credentials live in `~/.turbobase/credentials`, written `0600`. Point
|
|
64
|
+
`TURBOBASE_HOME` elsewhere to relocate them. On login the CLI checks that the
|
|
65
|
+
URL really serves the instance API and that the token is accepted, and warns
|
|
66
|
+
loudly if not; `--no-verify` skips the probe.
|
|
67
|
+
|
|
68
|
+
→ [Access tokens](https://docs.turbobase.io/tenant/access-tokens/)
|
|
69
|
+
|
|
70
|
+
## What you can do
|
|
71
|
+
|
|
72
|
+
Eight groups. Run `turbobase --help` for the list, `turbobase <group> --help` to
|
|
73
|
+
go deeper.
|
|
74
|
+
|
|
75
|
+
| Group | What it does |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `auth` | Sign in, switch the active instance, manage stored credentials. |
|
|
78
|
+
| `apps` | Build, preview, and ship hosted apps served inside your TurboBase app. |
|
|
79
|
+
| `ext` | Author, test, deploy, and observe extensions — hooks and conduits — plus the marketplace. |
|
|
80
|
+
| `project` | Scaffold a project and generate the files an AI agent session reads. |
|
|
81
|
+
| `release` | Ship your project from your own CI — deploy, status, rollback, list. |
|
|
82
|
+
| `sandbox` | Ephemeral local sandboxes seeded from a redacted slice of an instance (`create` not available yet). |
|
|
83
|
+
| `kb` | Write findings into your instance's knowledge base. |
|
|
84
|
+
| `mcp` | Run the local authoring MCP server that Claude Code talks to. |
|
|
62
85
|
|
|
63
|
-
##
|
|
86
|
+
## Ship a hosted app
|
|
87
|
+
|
|
88
|
+
Hosted apps are served from your instance at `/a/<slug>`, so anyone who can open
|
|
89
|
+
your TurboBase app can open them — no separate hosting, no separate login.
|
|
90
|
+
|
|
91
|
+
Because the app is served same-origin, it inherits your instance's auth: no
|
|
92
|
+
sign-in page to build, no callback, no CORS, no app-owned keys. Visitors who
|
|
93
|
+
aren't signed in are redirected before your bundle loads, and every read runs
|
|
94
|
+
under that user's row-level security.
|
|
64
95
|
|
|
65
96
|
```sh
|
|
66
|
-
turbobase
|
|
97
|
+
turbobase apps init reorder-desk ./app # scaffold locally (Vite + React + TS)
|
|
98
|
+
turbobase apps create reorder-desk # register the app on your instance
|
|
99
|
+
turbobase apps push reorder-desk ./app # record the source — no build, nothing goes live
|
|
100
|
+
turbobase apps deploy reorder-desk ./app # build and cut a new live version
|
|
101
|
+
turbobase apps list
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`create` is required before the first deploy — or pass `deploy --create` to fold
|
|
105
|
+
it in. `init` is local-only and touches nothing on the instance. The build runs
|
|
106
|
+
**on your machine**; TurboBase serves the result.
|
|
107
|
+
|
|
108
|
+
`push` and `deploy` are deliberately separate: `push` records the source on the
|
|
109
|
+
instance so the app can be pulled and refined from another machine (or by a
|
|
110
|
+
coding agent) with `turbobase apps pull`, while `deploy` is what actually goes
|
|
111
|
+
live. Push freely, deploy when ready.
|
|
112
|
+
|
|
113
|
+
Ship it for review before it goes live. `apps deploy --preview` builds and
|
|
114
|
+
serves the result at its own URL and leaves `/a/<slug>` untouched; promoting
|
|
115
|
+
re-points the app at **the exact bytes that were reviewed**, with no rebuild:
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
turbobase apps deploy reorder-desk ./app --preview
|
|
119
|
+
turbobase apps preview list reorder-desk
|
|
120
|
+
turbobase apps promote reorder-desk <preview-id>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Preview links stop resolving after 7 days; the build stays in deploy history and
|
|
124
|
+
can still be promoted. Set the app's display name and description in
|
|
125
|
+
`turbobase.json` — the manifest is applied on every deploy. The slug is fixed
|
|
126
|
+
once created: it is the URL, and nothing redirects the old one.
|
|
127
|
+
|
|
128
|
+
→ [Build apps on TurboBase](https://docs.turbobase.io/build-apps/)
|
|
129
|
+
|
|
130
|
+
## Author and deploy extensions
|
|
131
|
+
|
|
132
|
+
Extensions run inside your instance. **Hooks** fire on record changes;
|
|
133
|
+
**conduits** move data between a source and your mirror.
|
|
134
|
+
|
|
135
|
+
```sh
|
|
136
|
+
turbobase project types # types.ts from your live catalog
|
|
67
137
|
turbobase ext new hook --record salesOrder --field memo
|
|
68
|
-
turbobase project samples
|
|
69
|
-
turbobase ext
|
|
70
|
-
turbobase ext
|
|
71
|
-
turbobase ext
|
|
138
|
+
turbobase project samples # fixtures from the live catalog
|
|
139
|
+
turbobase ext lint hooks/<file>.ts # catch semantic foot-guns
|
|
140
|
+
turbobase ext test hooks/<file>.ts # run it in a production-parity sandbox
|
|
141
|
+
turbobase ext deploy hooks/<file>.ts # ship it
|
|
142
|
+
turbobase ext logs <id> --follow # watch it run
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
→ [Writing hooks](https://docs.turbobase.io/extending/writing-hooks/) ·
|
|
146
|
+
[Writing conduits](https://docs.turbobase.io/extending/writing-conduits/) ·
|
|
147
|
+
[Sandboxes and testing](https://docs.turbobase.io/extending/sandboxes-and-testing/)
|
|
148
|
+
|
|
149
|
+
## Promote a configuration between environments
|
|
150
|
+
|
|
151
|
+
Your instance's extension configuration can be snapshotted to a file, reviewed
|
|
152
|
+
as code, diffed against a target, and promoted:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
turbobase ext export # snapshot the live instance to turbobase/bundle.json
|
|
156
|
+
turbobase ext plan --to prod # diff the local bundle against prod — no writes
|
|
157
|
+
turbobase ext deploy --to prod # apply the whole bundle
|
|
158
|
+
turbobase ext promote --from sandbox --to prod --confirm acme
|
|
72
159
|
```
|
|
73
160
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
161
|
+
`promote` is fail-closed: you type the exact target instance slug to confirm, or
|
|
162
|
+
nothing happens.
|
|
163
|
+
|
|
164
|
+
→ [Deploy, plan, promote](https://docs.turbobase.io/extending/deploy-plan-promote/)
|
|
165
|
+
|
|
166
|
+
## Work with an AI agent
|
|
167
|
+
|
|
168
|
+
`turbobase project init` scaffolds a project Claude Code can drive — an
|
|
169
|
+
authoring guide, a `.mcp.json` pointing your editor at your instance's MCP
|
|
170
|
+
servers, skills, and a session hook that keeps generated types fresh.
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
turbobase project init
|
|
174
|
+
turbobase project types # types.ts from the live catalog
|
|
175
|
+
turbobase project grounding # INSTANCE.md — source primer, record anatomy, KB retrieval
|
|
176
|
+
turbobase project adopt # what changed in the platform that this project must act on
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`grounding` writes the same brief the in-product AI surfaces use, so your editor
|
|
180
|
+
answers questions about your data the way your instance does. `adopt` asks the
|
|
181
|
+
instance what changed in the releases since you last adopted, and leaves the
|
|
182
|
+
file alone when there's nothing new.
|
|
183
|
+
|
|
184
|
+
The scaffolded `.mcp.json` wires two servers on your instance: an **authoring**
|
|
185
|
+
server (scaffold, generate types, dry-run, deploy, tail logs — the same library
|
|
186
|
+
functions the subcommands call) and a **data** server (catalog, record anatomy,
|
|
187
|
+
knowledge base, RLS-scoped reads). `turbobase mcp` is a separate local stdio
|
|
188
|
+
server, for clients you'd rather point at a process than a URL.
|
|
189
|
+
|
|
190
|
+
> **`.mcp.json` holds a live access token.** The scaffold writes it `0600` and
|
|
191
|
+
> adds it to `.gitignore`. Keep it out of version control, and rotate the token
|
|
192
|
+
> if it was ever pushed.
|
|
193
|
+
|
|
194
|
+
→ [Connect Claude Code](https://docs.turbobase.io/build-apps/claude-code/)
|
|
195
|
+
|
|
196
|
+
## Marketplace
|
|
197
|
+
|
|
198
|
+
```sh
|
|
199
|
+
turbobase ext install acme-recipes
|
|
200
|
+
turbobase ext publish hooks/<file>.ts --name acme-recipes --pkg-version 1.0.0
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Both need a registry credential — set `TURBOBASE_REGISTRY_URL` and
|
|
204
|
+
`TURBOBASE_REGISTRY_TOKEN` from the token TurboBase support issues you. It is
|
|
205
|
+
separate from your instance's access token and is revocable on its own.
|
|
206
|
+
Publishing requires a publisher allowlist.
|
|
207
|
+
|
|
208
|
+
→ [Marketplace](https://docs.turbobase.io/extending/marketplace/)
|
|
209
|
+
|
|
210
|
+
## In CI
|
|
211
|
+
|
|
212
|
+
`turbobase project ci` scaffolds a ready-made GitHub Action that signs in with a
|
|
213
|
+
`releases:write` token from your secrets and ships the checkout:
|
|
214
|
+
|
|
215
|
+
```sh
|
|
216
|
+
turbobase project ci # writes .github/workflows/turbobase-release-deploy.yml
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
It runs in **your** repo on **your** runner and uploads your checkout's bytes —
|
|
220
|
+
TurboBase clones nothing and holds no GitHub App key. The CLI is the equal front
|
|
221
|
+
door if you'd rather drive it yourself:
|
|
222
|
+
|
|
223
|
+
```sh
|
|
224
|
+
turbobase release deploy --target auto --project . --ref HEAD --follow
|
|
225
|
+
turbobase release list
|
|
226
|
+
turbobase release rollback <id>
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
`ext lint`, `ext test`, and `ext replay` take `--reporter junit|json`, so
|
|
230
|
+
results land in your CI's test report:
|
|
231
|
+
|
|
232
|
+
```sh
|
|
233
|
+
turbobase ext lint hooks/ --reporter junit
|
|
234
|
+
turbobase ext test hooks/<file>.ts --reporter junit --ci
|
|
235
|
+
```
|
|
78
236
|
|
|
79
|
-
|
|
80
|
-
|
|
237
|
+
These commands need no instance and run fully offline: `ext new`, `ext lint`,
|
|
238
|
+
`ext test`, `ext replay --fixture`, `project init`, and `project ci`. Everything
|
|
239
|
+
else resolves an instance and token from your credential store, and says so
|
|
240
|
+
plainly when you aren't signed in. Sign in non-interactively with
|
|
241
|
+
`turbobase auth login --base-url … --token "$TURBOBASE_PAT"` from a secret.
|
|
81
242
|
|
|
82
|
-
|
|
243
|
+
`ext test` and `ext replay` execute your extension in a real sandbox, which
|
|
244
|
+
needs two native packages. An `npm install -g` already has them; with the
|
|
245
|
+
one-line installer, fetch them once with `turbobase ext extras install`
|
|
246
|
+
(`turbobase ext extras status` reports what you have).
|
|
83
247
|
|
|
84
|
-
|
|
85
|
-
calls, a live stage + percent bar for `--follow` jobs, aligned tables (`auth status`,
|
|
86
|
-
`apps list`, `ext binding`), and boxed result cards. When a command needs an
|
|
87
|
-
instance and several are stored with no active default, it arrow-picks one
|
|
88
|
-
instead of erroring.
|
|
248
|
+
## Output
|
|
89
249
|
|
|
90
|
-
Colour
|
|
91
|
-
`--reporter` output, streamed
|
|
92
|
-
captured output are never disturbed. Colour
|
|
93
|
-
isn't a
|
|
94
|
-
`NO_COLOR=1`.
|
|
250
|
+
Colour, spinners, and progress bars are **chrome, written to stderr**. Command
|
|
251
|
+
results — ids, tables, JSON, `--reporter` output, streamed logs — go to
|
|
252
|
+
**stdout**, so pipes and captured output are never disturbed. Colour turns
|
|
253
|
+
itself off when stdout isn't a terminal, and can be forced off with `--no-color`
|
|
254
|
+
or `NO_COLOR=1`.
|
|
95
255
|
|
|
96
|
-
##
|
|
256
|
+
## Versioning
|
|
97
257
|
|
|
98
|
-
|
|
99
|
-
`
|
|
100
|
-
|
|
101
|
-
|
|
258
|
+
This package's version is the TurboBase release it shipped with, so
|
|
259
|
+
`turbobase --version` tells you which platform release the CLI was built and
|
|
260
|
+
tested against. A version reaches the `latest` tag only after that release is
|
|
261
|
+
live in production.
|
|
102
262
|
|
|
103
|
-
|
|
104
|
-
into `.mcp.json`) runs from a published install — no source checkout needed.
|
|
263
|
+
→ [Releases and adopt notes](https://docs.turbobase.io/releases/)
|
|
105
264
|
|
|
106
|
-
##
|
|
265
|
+
## Documentation
|
|
107
266
|
|
|
108
|
-
|
|
109
|
-
|
|
267
|
+
- [Getting started](https://docs.turbobase.io/getting-started/what-is-turbobase/) — what TurboBase is, and the path to a live instance
|
|
268
|
+
- [CLI overview](https://docs.turbobase.io/cli/overview/) — installing, signing in, and the shape of the tool
|
|
269
|
+
- [CLI reference](https://docs.turbobase.io/cli/reference/) — every command, its flags, and an example
|
|
270
|
+
- [Build apps on TurboBase](https://docs.turbobase.io/build-apps/) — building against your instance
|
|
271
|
+
- [Extending TurboBase](https://docs.turbobase.io/extending/writing-hooks/) — hooks, conduits, sandboxes, promotion
|
|
110
272
|
|
|
111
|
-
|
|
112
|
-
`isolated-vm` binary, and prebuilt binaries exist only for current Node
|
|
113
|
-
releases — on older ones every install would fall back to compiling it.
|
|
273
|
+
Questions the docs don't answer: [support@turbobase.io](mailto:support@turbobase.io).
|
|
114
274
|
|
|
115
275
|
## Licence
|
|
116
276
|
|
|
117
|
-
Proprietary — see `LICENSE`. You may install and run it to
|
|
118
|
-
deploy
|
|
119
|
-
|
|
277
|
+
Proprietary — see `LICENSE`. You may install and run it to build, test, and
|
|
278
|
+
deploy against instances you are authorised to access, including on your own CI
|
|
279
|
+
runners. Redistribution and reverse engineering are not permitted.
|