crewship init
Create the very first admin user on a fresh Crewship instance. Only works against an empty database — once a user exists, the bootstrap endpoint refuses to run again. The command returns a CLI token so you can authenticate immediately without going through the web UI.crewship setup. Typical order on a new install:
crewship init— creates the OWNER admin and prints a token.crewship login --token <printed-token>— saves the token to~/.crewship/cli-config.yaml.crewship setup— deploys a crew template and your first adapter.
Flags
--email and --name are hard-required. --password is prompted when missing; passing it on the command line is convenient for scripted installs but leaks into shell history — prefer the prompt or pipe via --password "$(cat secret.txt)".
The server uses the same selection order as other CLI commands: explicit
--server → active profile (--profile / CREWSHIP_PROFILE, directory binding,
or persisted current) → CREWSHIP_SERVER → server: in CLI config →
http://localhost:8080. An active profile takes precedence over a stale
CREWSHIP_SERVER. A selected profile without a server URL fails before sending
a bootstrap request; configure that profile or pass an explicit --server.
Example
POST /api/v1/bootstrap and prints the returned user_id, workspace_id, and cli_token. The printed crewship login --token … line is ready to copy-paste.
Common errors
--email is required/--name is required— both are mandatory.password must be at least 8 characters— server-side rule, enforced client-side first so you don’t waste a round-trip.bootstrap request failed: HTTP 410: Already initialized — …— the database already has a user.initis a one-shot. Usecrewship loginand (if you’ve lost UI access)crewship admin reset-passwordinstead.bootstrap request failed (is the server running at http://localhost:8080?)— the server didn’t answer on--server. Checkcrewship startis running or pass the right URL.
See also
crewship login— log the saved token in for subsequent commands.crewship setup— deploy the first crew template after init.crewship seed— for dev/demo data,seeddoes its own bootstrap on an empty DB.- Admin CLI —
crewship admin reset-passwordfor the locked-out case.