@turbobase/cli 1.1.7
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/LICENSE +48 -0
- package/README.md +119 -0
- package/dist/turbobase-standalone.mjs +1635 -0
- package/dist/turbobase.js +1588 -0
- package/package.json +37 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
TurboBase CLI — Software Licence
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Adam Kundrat. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software is proprietary. It is licensed, not sold.
|
|
6
|
+
|
|
7
|
+
The repository's root LICENSE governs the SOURCE, and grants no rights to
|
|
8
|
+
anyone. This file governs the PUBLISHED PACKAGE, which is a compiled artifact
|
|
9
|
+
handed to customers on a public registry: a customer who installs it needs the
|
|
10
|
+
right to run it, and "no rights granted" would not give them that.
|
|
11
|
+
|
|
12
|
+
1. GRANT. Subject to your compliance with these terms and to an active
|
|
13
|
+
agreement with the copyright holder covering the TurboBase service, you are
|
|
14
|
+
granted a non-exclusive, non-transferable, non-sublicensable, revocable
|
|
15
|
+
licence to install and run this software, for the sole purpose of
|
|
16
|
+
authoring, testing, and deploying extensions to TurboBase instances you are
|
|
17
|
+
authorised to access. Installing it on your own machines and on continuous
|
|
18
|
+
integration runners you control is permitted under this grant.
|
|
19
|
+
|
|
20
|
+
2. RESTRICTIONS. You may not: copy this software except as reasonably required
|
|
21
|
+
to install and run it under Section 1; modify, adapt, translate, or create
|
|
22
|
+
derivative works of it; reverse engineer, decompile, or disassemble it, or
|
|
23
|
+
otherwise attempt to derive its source code, except to the extent
|
|
24
|
+
applicable law expressly permits despite this limitation; redistribute,
|
|
25
|
+
publish, sublicense, sell, rent, lease, or otherwise make it available to
|
|
26
|
+
any third party; or remove, obscure, or alter this notice.
|
|
27
|
+
|
|
28
|
+
3. RESERVATION. All rights not expressly granted here are reserved by the
|
|
29
|
+
copyright holder. This licence covers this software only. It grants no
|
|
30
|
+
rights in the TurboBase service, which is governed by your service
|
|
31
|
+
agreement, and no rights in any trademark.
|
|
32
|
+
|
|
33
|
+
4. THIRD-PARTY COMPONENTS. This software incorporates third-party open source
|
|
34
|
+
components that remain governed by their own licences. Nothing here limits
|
|
35
|
+
any right you hold in those components under those licences.
|
|
36
|
+
|
|
37
|
+
5. NO WARRANTY. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
38
|
+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
39
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
40
|
+
|
|
41
|
+
6. LIMITATION OF LIABILITY. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE
|
|
42
|
+
FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
|
43
|
+
CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH
|
|
44
|
+
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
45
|
+
|
|
46
|
+
7. TERMINATION. This licence terminates automatically if you breach any of
|
|
47
|
+
these terms, and when your agreement covering the TurboBase service ends.
|
|
48
|
+
On termination you must stop using this software and delete all copies.
|
package/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# turbobase
|
|
2
|
+
|
|
3
|
+
The `turbobase` CLI authors, tests, and deploys **TurboBase extensions** — hooks
|
|
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/)).
|
|
8
|
+
|
|
9
|
+
Every subcommand wraps the same library functions the in-product authoring MCP
|
|
10
|
+
server uses, so the CLI and the Claude Code surface never drift.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
curl -fsSL https://console.turbobase.io/install-cli.sh | bash
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
On Windows: `powershell -c "irm https://console.turbobase.io/install-cli.ps1 | iex"`.
|
|
19
|
+
|
|
20
|
+
The installer verifies the download's checksum, installs into `~/.turbobase`,
|
|
21
|
+
and puts `turbobase` on your PATH — no sudo, no package manager. It also fetches
|
|
22
|
+
a private Node.js if the machine has none at v22 or newer.
|
|
23
|
+
|
|
24
|
+
This npm package is the same CLI for anyone who would rather manage it alongside
|
|
25
|
+
their other global tools:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm install -g @turbobase/cli
|
|
29
|
+
turbobase --version
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`turbobase ext test` and `turbobase ext replay` need two native packages that the
|
|
33
|
+
one-line install leaves out; `turbobase ext extras install` fetches them on demand
|
|
34
|
+
(an npm install already has them as dependencies).
|
|
35
|
+
|
|
36
|
+
## Authenticate
|
|
37
|
+
|
|
38
|
+
Mint a PAT in your TurboBase app under **Settings › Access tokens**, then paste
|
|
39
|
+
it. This is the only sign-in path — there is no browser flow today.
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
turbobase auth login --base-url https://acme.turbobase.app --token tb_pat_xxxxxxxx
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**The instance you last signed in to becomes the ACTIVE default** — every
|
|
46
|
+
command uses it when you don't pass `--base-url`, so you never repeat the flag
|
|
47
|
+
for the instance you're working on. `--base-url` is only needed to reach a
|
|
48
|
+
*different* stored instance. On login the CLI probes the instance and warns if
|
|
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
|
+
|
|
53
|
+
```sh
|
|
54
|
+
turbobase auth status # active instance (*) + every stored sign-in
|
|
55
|
+
turbobase auth use https://beta.turbobase.app # switch the active default (no PAT re-paste)
|
|
56
|
+
turbobase auth logout # remove the active sign-in (--base-url <url> / --all)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Credentials are stored in `~/.turbobase/credentials` (0600) as
|
|
60
|
+
`{ active, tenants: { "<base-url>": { token } } }`. Override the directory with
|
|
61
|
+
`TURBOBASE_HOME`.
|
|
62
|
+
|
|
63
|
+
## Author → test → deploy
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
turbobase project types # generate types.ts from the instance catalog
|
|
67
|
+
turbobase ext new hook --record salesOrder --field memo
|
|
68
|
+
turbobase project samples # fixtures from the live catalog
|
|
69
|
+
turbobase ext test hooks/<file>.ts # dry-run in the production-parity sandbox
|
|
70
|
+
turbobase ext deploy hooks/<file>.ts # POST /v1/extensions (lands active)
|
|
71
|
+
turbobase ext logs <id> # tail the deployed extension's logs
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The surface is seven groups: `auth` (sign-in + the credential store), `project`
|
|
75
|
+
(scaffold, types, grounding, adopt), `ext` (author → verify → ship → observe,
|
|
76
|
+
plus the marketplace), `apps` (hosted apps), `kb` (knowledge-base writes),
|
|
77
|
+
`sandbox` (ephemeral local instances), and `mcp` (the authoring server).
|
|
78
|
+
|
|
79
|
+
Run `turbobase --help` for the groups, `turbobase <group> --help` for what is in
|
|
80
|
+
one.
|
|
81
|
+
|
|
82
|
+
## Output & interactivity
|
|
83
|
+
|
|
84
|
+
On an interactive terminal the CLI renders colour, a spinner for long-running
|
|
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.
|
|
89
|
+
|
|
90
|
+
Colour + animation are **chrome on stderr**; command results — ids, tables, JSON,
|
|
91
|
+
`--reporter` output, streamed job logs — stay on **stdout**, so pipes and
|
|
92
|
+
captured output are never disturbed. Colour is off automatically when stdout
|
|
93
|
+
isn't a TTY, and can be forced off with `--no-color` (before the command) or
|
|
94
|
+
`NO_COLOR=1`. `--json` / `--reporter` output is always plain.
|
|
95
|
+
|
|
96
|
+
## Offline commands (no instance required)
|
|
97
|
+
|
|
98
|
+
`ext lint`, `ext test`, `ext replay --fixture`, `ext new`, `project init` and
|
|
99
|
+
`project ci` run fully offline.
|
|
100
|
+
The rest resolve an instance + PAT from your credential store and fail with a
|
|
101
|
+
clear message when you're not signed in.
|
|
102
|
+
|
|
103
|
+
`turbobase mcp` (the local authoring server that `turbobase project init` wires
|
|
104
|
+
into `.mcp.json`) runs from a published install — no source checkout needed.
|
|
105
|
+
|
|
106
|
+
## Version
|
|
107
|
+
|
|
108
|
+
This CLI is versioned independently of the instance runtime. It targets the
|
|
109
|
+
instance HTTP API and is forward/backward tolerant across platform releases.
|
|
110
|
+
|
|
111
|
+
Node 22 or newer. `turbobase ext test` and `turbobase ext replay` load a native
|
|
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.
|
|
114
|
+
|
|
115
|
+
## Licence
|
|
116
|
+
|
|
117
|
+
Proprietary — see `LICENSE`. You may install and run it to author, test, and
|
|
118
|
+
deploy extensions to instances you are authorised to access, including on your
|
|
119
|
+
own CI runners. Redistribution and reverse engineering are not permitted.
|