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 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 init <app> [--template static|react]
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
- - **`init <app>`** scaffolds a directory. The default `--template static` creates a
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": "."`. Use
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. The app is
37
- created-or-resolved by slug in your saved org, and the live URL is printed.
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