scribase-cli/CHANGELOG.md
caelum0x a079b89d2d feat(SCR-ACT): init makes the first request itself and returns the rows (0.3.10)
scribase init / init --temp now reads the sample todos table through the
project's REST API with the public key as soon as the backend is ready,
prints the rows and returns them as first_request in --json. Agent-created
projects count as activated without a human click. A failed read never
fails init; the curl stays as the first next step in that case.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-30 21:02:39 +03:00

143 lines
7.7 KiB
Markdown

# Changelog
## 0.3.10 (2026-11-30)
- `npx scribase init` (and `init --temp`) now makes the project's first
request itself instead of printing a curl to paste. As soon as the backend
is ready it reads the sample `todos` table through the project's REST API
with the public key (`GET /rest/v1/todos?select=*`), prints the rows, and
returns them in the `--json` output as `first_request` (`ok`, `method`,
`url`, `status`, `row_count`, `rows`, and `error` when it did not work).
An agent that runs one command now ends with real rows from its own
backend, with no browser and no second step. A failed read never fails
init: the project is live, `first_request.ok` is `false`, and the first
next step is the curl that repeats it.
## 0.3.9 (2026-11-30)
- Package description leads with zero-human signup for coding agents.
## 0.3.8 (2026-11-30)
- `npx scribase migrate rollback [n]` (default 1): reverts the `n` most
recently applied migrations by running their stored `-- down` SQL. There is
no server route that deletes a ledger row over the network, so it writes
the down SQL to disk as a brand new migration file
(`<new version>_rollback_<name>.sql`) and sends it through the exact same
`POST .../migrations` route — and the exact same destructive-push
production-approval gate — any other migration already goes through, so
every other environment that later runs `migrate` replays the same
rollback. Refused with a clear error when the target migration has no down
SQL, or when asked to roll back more than are applied. `--dry-run` previews
without writing or applying anything. `--json` for scripts and agents.
## 0.3.7 (2026-11-27)
- Security: commands that use a stored `scribase login` token or a shell
`SCRIBASE_ACCESS_TOKEN` (`sql`, `migrate`, `env`, `branch`, `add`, `ota`,
railyard capabilities) took the server address from the folder's
`.scribase/project.json` and sent the token there without checking that the
token was issued for that server. A shared template, zip or tarball with a
crafted `api_url` could receive the token. They now send it only to the
server saved with the token at `scribase login` (default
`https://api.scribase.com`) or to an explicit `SCRIBASE_API_URL`, and refuse
any other address before making a request (`api_url_mismatch`). Tokens kept
in the folder's own `.env.local`/`.env` still go to that folder's project.
Affected: 0.3.2 to 0.3.6. Reported by kta1kri (https://github.com/kta1kri),
thank you.
## 0.3.5 (2026-11-27)
- Docs fix: README and `AGENTS.md` said `add email --to <address>` works on an
unclaimed temporary project. It does not, on purpose: an unclaimed project
only mails its owner, so the control plane answers `email_recipient_refused`
(HTTP 403). Both files now say what needs an account (email) and what does
not (database, auth, storage, REST).
- `add email` on an unclaimed project: the `next` hint now points at the claim
link instead of `scribase login`.
## 0.3.4 (2026-11-27)
- `npx scribase init`: the next steps now include one copy-paste `curl` that
reads the first table back through the project's REST API with the public
(anon) key, right after the step that creates the table. A person or a
coding agent can prove the backend answers from any terminal before writing
app code. Also present in `next_steps` with `--json`.
- `package.json`: description and keywords now say what the package does
(database, auth, storage, realtime, transactional email, MCP, coding agents)
so npm search finds it for those. No API change.
## 0.3.3 (2026-11-27)
- README/`package.json` homepage: added `?ref=npm` to the scribase.com link so
npm-page and README clicks are attributable in analytics. No functional change.
## 0.3.2 (2026-11-26)
- `npx scribase add email --to <address>`: a project made with `init --temp`
has no account yet, so there was no address for the proof email to go to
and `add email` always refused with `no_caller_email`. `--to` gives it one
explicitly (a disposable inbox, e.g. mail.tm, is fine) — this is the
missing step in the fully agent-driven, no-human path: `init --temp` for
the database, `add email --to <inbox>` for transactional email, both
without a signup page, a CAPTCHA, or a browser. Ignored once the project
is claimed or signed in; a real account's proof still only goes to its own
address. (Needs the matching control-plane fix; see `plans/scribase.md`.)
- New `AGENTS.md`, shipped in the package, and a README section pointing a
coding agent straight at the two commands above.
## 0.3.0 (2026-11-16, not yet published)
- The claim line `init` prints, `init --help`, `doctor` and the README now
match the live sign-up: free for 14 days, no card, and one project stays
free after that. The old "sign up + card check" wording is gone.
- `init` prints the UTC time a temporary project is deleted next to its claim
link (`deleted_at_utc` and `keep` in `--json`).
- Fixed: an exported `SCRIBASE_ACCESS_TOKEN` no longer overrides the token in
this folder's env file. `sql`, `migrate`, `add`, `ota`, `env` and `branch`
act on this folder's project, so the token `init` wrote here wins, then the
exported one, then `scribase login`. Before, a token exported for another
project made `npx scribase sql` answer `403 access is denied`. When the two
differ, one line on stderr says which was used;
`SCRIBASE_TOKEN_SOURCE=shell|file|login` forces one; `--verbose` (any
command) always prints the source, never the token. A `401`/`403` now names
the source of the refused token.
- New in the npm package: `npx scribase env [list|get]` lists this project's
environments, and `npx scribase branch [list|create|url|reset|delete]`
manages database branches (they were only in the full CLI before). Both
read the project from `.scribase/project.json`, so no ids are typed.
`branch create|url` write the branch's public URL and publishable key to
`.scribase/branches/<branch>.env`. `branch reset|delete` ask first (or take
`--yes`) and refuse `production`.
- Fixed: `init --temp` no longer fails with `401` when the saved login has
expired; it creates the temporary project without it.
- `npx scribase connect [tool...]` writes the Scribase MCP server into every
AI coding tool this machine has (Claude Code via `claude mcp add`, Cursor,
VS Code, Codex, Windsurf, Zed) in one idempotent command. `--dry-run` shows
what would change; `--tool <id>` (repeatable) configures exactly those
tools regardless of detection. Never writes a token or secret — every
client's own MCP OAuth flow runs on first use instead.
## 0.2.0 (2026-11-11)
- `npx scribase init` is temporary-first: with no sign-in it creates a 72-hour
temporary project and prints a claim link; `--account`, `--watch` and
`scribase doctor` are new.
- `npx scribase init` prints the project URL and, for a temporary project, the
claim link as soon as the backend is live, before the Vercel push and the
client-library install.
- `scribase add <capability>` (analytics, deploy, flags, uptime, ai, billing,
consent, …) wires one capability into the project and prints proof JSON of
the first real event.
- `scribase ota deploy|rollback|status` for over-the-air updates, and
`scribase migrate` runs the real plan/lint/apply route.
- `init` detects SvelteKit and scaffolds its `$env/static/public` client; the
generated plain-Node client auto-loads `.env`.
- The default region id is `eu-frankfurt` (it names the city, not a hosting
provider). Projects created with the earlier `oci-eu-frankfurt-1` label keep
working unchanged.
- `prepublishOnly` runs `scripts/check-npm-tarball.mjs --gitleaks`: the publish
stops if the tarball holds an env file, a key file, a file outside the allow
list, or a secret-looking string.