pbc pocketbase create gives you a running PocketBase instance with nothing
deployed to it:
$ pbc pocketbase create my-app-db
✓ Creating my-app-db — my-app-db is running
https://my-app-db.pocketbasecloud.com
https://my-app-db.pocketbasecloud.com/_/ (admin)
Admin login: [email protected] / xxxxxxxxxxxxxxxxxxxx
Recorded in pbc.json as environment "production" — `pbc pocketbase deploy` here needs no --name.
Until now the only way to create one from the CLI was pbc pocketbase deploy,
which is a directory command — it infers a build config, packages
pb_public / pb_hooks / pb_migrations, and asks which dotenv file the
environment uses, all before it creates anything. That is right for “ship this
directory” and beside the point for “give me a database”, which is what a
script, a CI step, or a first day on a project actually wants.
create skips all of it: nothing is built, packaged, or uploaded. What it does
keep is the binding — the instance is recorded in the directory’s pbc.json
under its environment, exactly as a deploy would record it, so shipping files
to it later takes no flags:
pbc pocketbase create my-app-db # in the directory the project will live in
# …add pb_hooks/, pb_migrations/, pb_public/
pbc pocketbase deploy # no --name: the binding is already there
--env <name> records it under another environment (default: production, or
the file’s own default). A directory bound to frontends or backends is refused,
and so is an environment that already names an instance — repointing it would
leave the old one with nothing pointing at it.
It takes the same --location, --compute, --admin-email,
--admin-password and --pb-version flags as a deploy, picks the compute the
same way, and prints the same JSON under --json. A name already used by an
instance in the project is refused rather than duplicated, and the refusal
names pbc pocketbase deploy --name <name> as the way to redeploy that one.
pbc pocketbase deploy is unchanged, including its own way of creating an empty
instance: a directory holding none of the three PocketBase directories still
deploys, sends no archive at all, and says so rather than reporting a silent
success.