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
| Flag | Default | Purpose |
|---|---|---|
--server <url> | http://localhost:8080 | URL of the Crewship server to initialise. |
--email <email> | (required) | Admin email address. Becomes the OWNER user. |
--name "<full name>" | (required) | Admin full name (display name in the UI). |
--password <pw> | (prompted, hidden input) | Admin password. Minimum 8 characters. When omitted, the command reads it from the terminal without echo. |
--password-stdin | false | Read admin password from stdin (preferred for CI / scripts — avoids argv leak). |
--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)".
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 403: 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.