Skip to main content

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.
This is the unauthenticated counterpart to crewship setup. Typical order on a new install:
  1. crewship init — creates the OWNER admin and prints a token.
  2. crewship login --token <printed-token> — saves the token to ~/.crewship/cli-config.yaml.
  3. 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)".

Example

Calls 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. init is a one-shot. Use crewship login and (if you’ve lost UI access) crewship admin reset-password instead.
  • bootstrap request failed (is the server running at http://localhost:8080?) — the server didn’t answer on --server. Check crewship start is 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, seed does its own bootstrap on an empty DB.
  • Admin CLIcrewship admin reset-password for the locked-out case.