railcode 0.1.13 → 0.1.16
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 +20 -6
- package/dist/index.js +3217 -173
- package/dist/llm.js +20 -0
- package/dist/manifest.js +695 -0
- package/dist/query.js +94 -0
- package/package.json +2 -2
- package/static/react-template-assets/bigquery.png +0 -0
- package/static/react-template-assets/connectors/clerk.png +0 -0
- package/static/react-template-assets/connectors/mixpanel.png +0 -0
- package/static/react-template-assets/connectors/posthog.svg +1 -0
- package/static/react-template-assets/connectors/resend.svg +1 -0
- package/static/react-template-assets/connectors/stripe.png +0 -0
- package/static/react-template-assets/llm/anthropic.png +0 -0
- package/static/react-template-assets/llm/bedrock.png +0 -0
- package/static/react-template-assets/llm/gemini.png +0 -0
- package/static/react-template-assets/llm/openai.svg +1 -0
- package/static/react-template-assets/postgres.svg +1 -0
- package/static/sdk.js +29 -10
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@ on your `PATH`.
|
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
railcode login [--api-url <url>] Sign in and mint a personal API token
|
|
21
|
-
railcode
|
|
21
|
+
railcode login --setup-token <token> Sign in with a one-time onboarding setup token
|
|
22
|
+
railcode init <app> [--template react|static]
|
|
22
23
|
railcode deploy Build (if configured) and deploy the app here
|
|
23
24
|
railcode db <list|query> ... List data connectors / run read-only SQL
|
|
24
25
|
```
|
|
@@ -28,13 +29,26 @@ railcode db <list|query> ... List data connectors / run read-only SQL
|
|
|
28
29
|
personal API token, resolves your organization, and saves everything to
|
|
29
30
|
`~/.railcode/config.json` (dir `0700`, file `0600`). The JWT is used once and
|
|
30
31
|
never stored.
|
|
31
|
-
- **`
|
|
32
|
+
- **`login --setup-token <token>`** is the non-interactive onboarding path (no
|
|
33
|
+
TTY or browser — used by the dashboard's copied setup prompt). A setup token
|
|
34
|
+
(`rc_setup_...`) is a short-lived (~10 min), ONE-TIME bootstrap credential, not
|
|
35
|
+
a personal API token: the CLI exchanges it once for a personal API token and
|
|
36
|
+
writes the same config as a browser login. If it's expired or already used,
|
|
37
|
+
generate a fresh prompt from the dashboard.
|
|
38
|
+
- **`init <app>`** scaffolds a directory. By default it creates a React + Vite +
|
|
39
|
+
Zustand starter — a personalized "Welcome to Railcode, `<name>`" home wired to
|
|
40
|
+
every SDK capability: identity/team, a live to-dos list and file uploads (work
|
|
41
|
+
with zero setup), and SQL, saved queries, service connectors, and LLM cards that
|
|
42
|
+
call the real thing when configured and fall back to a labeled sample otherwise.
|
|
43
|
+
Hovering a name or card title reveals the exact SDK call behind it; every write
|
|
44
|
+
fires a toast with the call that just ran. Use `--template static` for a
|
|
32
45
|
no-build `index.html` (loads `/_api/sdk.js` and demos `await me()` +
|
|
33
|
-
`db.collection().put/get`) plus `railcode.json` with `"dist": "."`.
|
|
34
|
-
`--template react` for a React + Vite + Zustand starter that builds to `dist/`.
|
|
46
|
+
`db.collection().put/get`) plus `railcode.json` with `"dist": "."`.
|
|
35
47
|
- **`deploy`** reads `railcode.json` (`{ app, build?, dist? }`), runs the resolved
|
|
36
|
-
build command when needed, then uploads the output dir
|
|
37
|
-
|
|
48
|
+
build command when needed, then uploads the output dir by app slug. On the first
|
|
49
|
+
successful deploy for a slug, the server creates the app as part of that deploy;
|
|
50
|
+
a failed first deploy does not leave a visible not-deployed app behind. The live
|
|
51
|
+
URL is printed after success.
|
|
38
52
|
- **`db`** inspects the org's **data connectors** (per-org Postgres) and runs
|
|
39
53
|
ad-hoc read-only SQL. It works straight after `railcode login` — **no app and no
|
|
40
54
|
`railcode.json` required** — since connectors are org-scoped; it hits the app-less
|