crewship auth
Self-service account commands. Login, logout, and whoami stay top-level (crewship login / logout / whoami); auth hosts the newer account
mutations.
crewship login.
Subcommands
|
auth pair | Issue a device-code so another CLI can log in without a browser. |
auth passwd
Change your password. Interactively it prompts (no echo) for the current
password, then the new password twice. The new password must be at least
8 characters.
Passwords are never passed as flags — that would leak them into shell
history and process listings. For scripting, pipe two lines on stdin: the
current password first, the new password second.
Changing your password signs out your other active browser sessions —
the session you run this from stays logged in. CLI tokens keep working
unless you pass --revoke-cli-tokens, which revokes every CLI token on your
account, including the one the command runs with (sign in again with
crewship login afterwards). The web dialog offers the same choice as
“Also revoke all CLI tokens”. It calls
POST /api/v1/users/me/password.
Wrong current-password guesses count against the same account lockout as
sign-in, and the route sits on the strict per-IP auth bucket (a CLI token
does not exempt it). Enough consecutive misses and the command fails with
API error (423): too many failed attempts… until the lockout window
expires — an admin can clear it with crewship admin reset-password.
auth avatar
Upload a new profile picture, or clear it back to initials. The image must
be a PNG, JPEG, or WebP no larger than 2 MB; it’s served from an
authenticated endpoint so other members see it on the roster and in chat.
Backed by POST/DELETE /api/v1/users/me/avatar.
auth profile
Update your display name. --full-name is the only editable field — the
API accepts nothing else on this endpoint, so there is no --email flag
here to promise something the server would silently ignore. Backed by
PATCH /api/v1/users/me.
Prints the updated profile and honors the global --format flag (table
by default, or json/yaml/ndjson for scripts).
Editing your display name is available in the web UI (Settings → Profile),
backed by
PATCH /api/v1/users/me.
A CLI verb for it may follow.auth pair
Issue a device-code pairing code, and by default wait for it to be
redeemed. This is the ISSUING side of the pairing flow — the counterpart
to crewship login --pair --code=… (crewship login),
which REDEEMS a code. Backed by
POST /api/v1/auth/pair/start
and
GET /api/v1/auth/pair/poll.
Guest accounts start pairing from user menu → Connect CLI… in their
verified browser session, then redeem with crewship login --pair --code=….
A Guest CLI bearer cannot issue another pairing code or widen its grants.
Run it on a trusted CLI that is already logged in, then paste the printed snippet
on the second machine — no browser required on either side:
Without
--no-wait, the command polls until the code is redeemed
(status: consumed, exit 0), expires before anyone redeemed it (status: expired, non-zero exit), or the --timeout budget runs out while it is
still pending (also non-zero exit — a timeout is never reported as
success). --format json reports code, expires_at, status, paired,
and waited, so a script can branch on status without parsing prose.