Skip to main content

crewship workspace

A workspace is the top-level tenant. Every other resource — crews, agents, credentials, projects, integrations — lives inside one. Aliases: ws. Defined in cmd/crewship/cmd_workspace.go.
The active workspace is stored in ~/.crewship/cli-config.yaml under workspace (slug or id). It is sent as workspace_id= on workspace-scoped API requests by the CLI client. Switching workspaces writes local config and, when authenticated, validates the slug or ID against the server.
Auth: list, get, and create require crewship login. update, all member operations, and invite additionally require an active workspace. use writes the local config and validates the slug or ID against the server when you’re already logged in. Role gates apply server-side — OWNER/ADMIN to update or invite, OWNER only to delete, MEMBER+ to read.
Workspace settings, member provisioning/removal and invitation changes require a durable audit before success. If audit storage or the final commit fails, the access change is rolled back. Provisioning audit records whether an account and setup link were created; it never includes the setup link itself.

Subcommands

crewship workspace get [slug-or-id]

Show details for the specified workspace, or for the active workspace when no argument is supplied.
The command takes no command-specific flags. It prints Name, Slug, Kind (team or personal — a personal workspace was made at sign-up for its owner), Personal owner (the owner’s user id, personal workspaces only), Language, Allow privileged credentials, Pages theme, Guest routine max run (the hard limit for one run of a Guest-published routine, set with workspace update --guest-routine-max-run-minutes), ID, and Created. Machine formats print the server’s workspace document as sent: kind, personal_owner_id, guest_routine_max_run_minutes, the retention settings, counts, pages_theme, appearance_default and every other field. Appearance default lists the default look as key=value pairs, or (none). Pages theme lists the shared Page colours as key=#RRGGBB pairs, or (SDK defaults) when none is set — see workspace update --pages-theme.

Flags

workspace create

workspace update

Only flags you actually set are sent — passing nothing returns no fields to update.
Only flags you actually pass are sent, and that matters here: 0 is a meaningful value on all three retention flags (an explicit “keep forever”), so an unset flag must not be transmitted as zero. crewship workspace update --name x never touches your retention windows.
Sets or removes the logo the current workspace is drawn with (the switcher, Admin lists, the Backups and Security scope). Same rules as auth avatar: PNG, JPEG or WebP, at most 2MB and 4096 px a side. Needs ADMIN or OWNER.
With --format json, both print the updated workspace document — after set its logo_url is the new logo, after remove it is null.

workspace logo get

Downloads the current workspace logo to --output. The file is replaced only after a complete download (at most 2 MiB); a refused request leaves it untouched.

workspace delete

Deletes a workspace and everything under it. Soft-delete with cascade over crews and agents; OWNER only, and refused if it is your only workspace.

workspace member add

Which id do the member commands take?

workspace member list prints two ids per row and they are not interchangeable at the API: So member add takes a user id while the endpoints behind member role and member remove match only a membership row. Passing the user id used to answer a bare Member not found — which reads as “that person is not in this workspace” rather than “wrong id”, and cost a test suite its most important assertion (#1829). Both commands now accept either column and resolve it for you. An argument that is in neither is refused by name before any request goes out:
Resolution is a convenience, not a new dependency: if the member roster cannot be read (permissions, an unreachable server), the argument is sent through untouched and the server answers as it always did. workspace member list --format json carries the address in a flat email field and in the nested user.email the server sends. The flat field used to be present and always empty — a shape that silently broke every jq 'select(.email == …)' written against it. The ACCESS column (access_mode in machine formats) is the member’s access mode, trusted or restricted, kept apart from ROLE: a restricted MEMBER and a trusted MEMBER share a role. The mode is part of the member access policy, so the server sends it only to a trusted OWNER/ADMIN whose token may administer the workspace; everyone else sees - and no access_mode field. Settings › Members marks the same members Restricted next to their role. Change the mode with workspace member access set.

workspace member role

<ROLE> is one of OWNER, ADMIN, MANAGER, MEMBER, VIEWER (case-insensitive). MANAGER+ only, and subject to the server ladder: you can only grant a role below your own, cannot modify a member ranked above you, and cannot demote the last OWNER.

workspace member remove

Removal also drops every crew membership the person holds in this workspace, and first transfers any page they own to a crew — a page that resolves to no crew refuses the whole removal. Adding them back later restores neither: crew membership and any per-crew role override have to be granted again. See Remove member.

workspace invite / workspace invite create

The role flag is mirrored on the parent invite command so the shortcut form (workspace invite alice@example.com --role ADMIN) works without an explicit create. No mailer is wired for this command.

crewship workspace invite create <email>

Record a workspace invitation for an email address. No email is sent; use workspace member invite when account provisioning and a setup link are needed.
On success the CLI prints Invitation recorded for <email> (<role> role). and the recipient’s invitation link. Save and share that creation response privately; invitation lists expose metadata without the redemption token. followed by a warning that no email was sent.

workspace member invite

This provisioning command is distinct from workspace invite: it creates the account when needed, adds the membership, and prints a one-time setup link. Use --create-only for isolated demo provisioning when an existing person must remain untouched. The default provisioning behavior is unchanged when omitted; the flag does not reset an existing account’s password.

Examples

List + switch

workspace use validates that the slug actually exists and is accessible before writing the config, so a typo doesn’t quietly orphan every future command.

Create a workspace

Update a workspace

Delete a workspace

Refused with 409 if it is your only workspace, and with 403 if you are not the OWNER.

Member management

User IDs come from crewship admin list-users or the web UI’s user table.

workspace member capabilities

Per-member capabilities grant individual high-value actions (create routines, skills, credentials, …) to one member without promoting them to a wider RBAC role. They layer on top of the member’s role — a MEMBER can be handed routine.create while everyone else in that role stays chat-only. Aliases: caps, capability. ADMIN+ required to mutate; the CLI exits non-zero on a 403 so a misconfigured CI pipeline fails loudly. Capabilities are workspace-scoped — a user in multiple workspaces is configured separately in each. The dashboard equivalent is Settings → Members (/settings/members). It keeps two questions apart: the role says what a person manages (people, crews, settings); what they may do is read as three areas — Routines, Content and Secrets — so a row shows chips like “Routines · Content 3/4”, a red “Secrets · reveal” for anyone who can read secrets in plaintext, and “Chat only” for someone with nothing beyond chat. The page starts with Needs attention: how many people can reveal secrets, Members or Viewers who hold skills or credentials (marked with a warning beside their role), and invitations that have expired or expire within two days, each with a button that lists or opens them. The side panel filters by role, by area (“Can do”), by “needs a look” and shows pending Invited people with when each invitation runs out. Clicking a row opens that person in a side panel (full screen on a phone): the role, a preset (Chat only, Power user, Builder = chat, power, admin) with what differs from it (“+Reveal −Run”), each ability as a switch grouped by area, crews and agents, and removal. When a Member or Viewer holds high-stakes access the panel says so first and offers to turn it off or make them a Manager. Tick rows to set a preset, grant or revoke for many people at once. Add member asks for the role and what the person may do — the role’s default, or one of the three presets, applied as a {"set"} PATCH right after the account is created (if that fails the person is still added, and the dialog says so). Capability changes are drafts: nothing reaches the server until Save in the page’s bar (Discard drops them, and leaving the page asks first); each changed person is then one PATCH …/capabilities with the full set. Putting a high-stakes grant into the draft asks first. A role change is separate and applies after its own confirmation. /settings/members?member=<user-id> opens one person directly; ?area=, ?flag= and ?status=invited keep a filter in the link. The chat capability is always implied and cannot be granted or revoked individually; removing chat means removing the member entirely (workspace member remove). The OWNER target is immutable, and you cannot mutate your own row (downgrade-then-restore defence). Valid capability strings: chat, routine.create, routine.run, skill.create, credential.create, credential.rotate, credentials:reveal, issue.create, page.create, memory.write. Note the colon in credentials:reveal — it is the one capability spelled the way the security document names it.

Subcommands

crewship workspace member capabilities list [user-id]

With a <user-id>, shows that member’s role and capabilities (GET /api/v1/workspaces/{id}/members/{user}/capabilities). Without one, lists every member of the active workspace in a single request (GET /api/v1/workspaces/{id}/members/capabilities). ADMIN+ required.
The command has no command-specific flags.

crewship workspace member capabilities grant <user-id> <capability> [<capability>...]

Grant one or more capabilities incrementally; existing grants are preserved.
The command requires at least one capability and has no command-specific flags. Valid values are chat, routine.create, skill.create, credential.create, credential.rotate, issue.create, and memory.write. On success it prints <user-id> (<role>): <capabilities>.

crewship workspace member capabilities revoke <user-id> <capability> [<capability>...]

Revoke one or more capabilities incrementally; other grants are preserved.
The command requires at least one capability and has no command-specific flags. Revoking chat is rejected because chat is always implied; remove the member instead. On success it prints <user-id> (<role>): <capabilities>.

crewship workspace member capabilities preset <user-id> <chat|power|admin>

Replace the member’s capability set with the named bundle, overwriting existing grants.
The command takes exactly the user ID and one of chat, power, or admin, with no command-specific flags. On success it prints <user-id> (<role>): <capabilities>. Bundles map to common combinations:
Unknown capability strings are rejected server-side (400, typo guard). Revoking chat is rejected by the server. The list command prints USER, ROLE, CAPABILITIES columns; mutations print the resulting capability set.

Invitations

The shortcut form (invite <email>) and the explicit form (invite create <email>) share one implementation, so role flags behave identically on both.

Common errors

  • workspace "X" not found or not accessible — workspace use validated against /api/v1/workspaces and your token has no membership.
  • --name is required — create needs at least a name.
  • no fields to update — update was called without any of --name / --slug / --language / --allow-privileged-credentials / --credential-audit-retention-days / --audit-log-retention-days / --approvals-retention-days / --guest-routine-max-run-minutes / --pages-theme / --appearance-default.
  • --pages-theme must be a JSON object … — the value (or the @file) did not parse as a JSON object of strings. The colour vocabulary itself is checked by the server: pages_theme supports accent, background, surface, text, muted and border as #RRGGBB colors is its answer to an unknown key or a named colour.
  • --appearance-default must be a JSON object … — the value (or the @file) did not parse as a JSON object. The server answers an unknown key, theme or id with appearance_default supports style, knobs, accent and theme and similar.
  • no workspace selected — update ran without an active workspace. Run crewship workspace use first or pass --workspace.

See also

  • crewship login — crewship login --workspace <slug> sets the workspace at login time.
  • crewship config — direct access to the workspace config key.
  • crewship admin — cross-workspace operations (only OWNER on the workspace itself, or instance admin).
  • Workspaces API — GET /api/v1/workspaces.

crewship workspace member access

Read or replace a member’s resource access policy. These grants limit specific agent/project operations in addition to roles and capabilities. Current trusted OWNER/ADMIN access is required; scoped tokens need workspace:admin. Restricted mode currently blocks unintegrated routes, including model execution. It also applies to sessions with mixed trusted/restricted memberships.

crewship workspace member access get <member-id-or-user-id>

Read the complete policy, including membership_id, mode, revision and rights. Accepts either a membership row ID or user ID. There are no command-specific flags. The default table shows MEMBER, MODE, REVISION and RIGHTS count; --format json returns the editable document.

crewship workspace member access set <member-id-or-user-id>

To deliberately take over a saved share, use workspace member access set MEMBER --file policy.json --reissue routine:ROUTINE_ID:run (repeatable). The right must be in the complete policy. The default policy table shows each issuer and whether a share is active or inactive. The API and CLI can explicitly reissue active shares too; Settings offers this action for inactive shares. Policy saves and reissues record old and new issuers and rights atomically in workspace activity. Replace the complete policy using its original membership ID and revision. Edit the mode and rights fields from access get; do not invent a revision. An explicit empty rights array in restricted mode denies all resource grants. Trusted mode restores ordinary workspace access and permits only explicit crew Manage shares for trusted MEMBER/MANAGER recipients. Revoke and save trusted-only shares before changing the account to Guest; otherwise the server returns422.
Success prints the resulting policy using the same output formats as get. A stale revision exits nonzero with HTTP 409; the command does not retry or silently refresh it. Revisions may advance by more than one. Missing/null rights, unknown fields and a document for a different membership are rejected. This command does not enable restricted model execution or stop an already running shared process. See the API contract.

crewship workspace invite accept --token-stdin

Accept the presented invitation with the signed-in account matching its email. Requires an unrestricted credential and no active workspace. Membership and invitation consumption commit together. An already accepted invitation can be retried by the same current member without restoring an old role or a removed membership.
Without confirmation a Guest invitation returns 400 guest_confirmation_required. Review the account-wide consequence, then retry with the flag. A stale invitation returns 409 invitation_changed; request a new link. Proof is read from standard input, never a positional argument or secret-valued flag. Use a private file or a secret manager pipe; do not paste a literal proof into shell command history. New recipient links use a fragment. The join page removes the proof from the current URL and retains it only in that tab during sign-in/signup.

crewship workspace invite reissue <invitation-id>

Rotate an unaccepted invitation and print a new recipient link. Requires a live trusted workspace OWNER/ADMIN; an ADMIN invitation requires OWNER. The previous link immediately stops working. No email is sent. Expired or lost links can be replaced; an existing membership is not changed.

crewship workspace invite revoke <invitation-id>

Revoke an unaccepted invitation without removing or changing an existing member. Uses the same issuer authority checks as reissue.

crewship workspace member access explain <member-id-or-user-id>

Read saved effective access and prerequisites as a trusted workspace OWNER/ADMIN. Calls GET /api/v1/workspaces/{workspaceId}/members/{memberId}/access/effective. The output includes membership revision, account restriction scope and each saved grant’s allowed/denied/conditional/unavailable state and reason. This does not expose private conversations or execution results. There are no command-specific flags.
grants.json is an array, for example [{"kind":"routine","id":"routine-id","operation":"run"},{"kind":"agent","id":"agent-id","operation":"run"}]. Grant every dependency’s agent run/delegate rights separately.

crewship workspace access

Inspect your own access in the selected workspace.

crewship workspace access me

Calls GET /api/v1/workspaces/{workspaceId}/access/me without looking up the workspace roster. Available to Guests and trusted members. The table explains saved resource grants and execution prerequisites; JSON/YAML includes membership revision and the account-wide restriction explanation.
Resource policy JSON includes read-only grant_details with each grant’s issuer_id, created_at and live status. Saving unchanged rights preserves their provenance. To deliberately reissue a share as the authenticated admin, include its exact {kind,id,operation} in both rights and optional reissue. Unrelated edits do not reactivate shares from an inactive issuer.

Object sharing

Use share and unshare to change an existing Guest’s individual routine or project operations without replacing unrelated rights. The versioned member-policy commands remain available for complete policies.

List resource access presets

Lists immutable definitions and hashes for the selected workspace using the administrative API catalog. JSON, YAML and NDJSON preserve the complete definitions and API field names; the table lists each explicit level. Listing changes no permissions; application uses preview and confirmation below. routine-levels v2 manages only Edit and Publish, with the levels none (removes both), edit (keeps Edit, revokes Publish) and edit_publish (Edit + Publish). It preserves existing View, Results and Run grants and their issuers and does not add them; publication still needs separate current View. The v1 definitions and hashes remain unchanged. Saved choices are kept per preset version, so access get can show a v1 and a v2 record for the same routine. A v1 level without Edit is refused with 422 while Publish is held. Administrative workspace member access get --format json (or YAML) preserves the server’s informational preset_selections, including API field names in this new metadata. Existing policy YAML keys remain unchanged. These saved labels are not effective permissions. Read-edit-set can round-trip the read-only metadata, but access set cannot create a selection through it; the server computes the returned choices from canonical state. The default table continues to show grant issuers and active/inactive rights. For a Guest crew bundle, use the existing preview/apply commands with resource: {kind: "crew", id: "CREW"}, preset_id: "crew-levels", preset_version: 1 and level none, view or use. None removes only the crew-root View/Use shares; View selects view, Use selects view,use. Review the current/future-agent audience warning and exact checksum before apply. Individual agent rights, original issuers and other resource shares are preserved; execution still needs per-agent preflight. The person Access editor provides the same explicit preset flow after selecting Crew.

crewship workspace member access preset preview MEMBER

Preview an explicit bundle for an existing restricted member without saving it. --file is required; provide a JSON file or --file - for stdin. Input contains current membership_id, revision, resource: {kind,id}, preset_id, preset_version, level and optional explicit reissue rights. Read the revision with access get; unknown/trailing/oversized input is rejected and conflicts are never silently refreshed or retried.
Table output shows the saved choice or Custom, managed changes, retained orthogonal rights and original issuers/timestamps. Review Results history, execution prerequisites, file-role floors and conditional delete_issues eligibility. JSON/YAML/NDJSON preserve the complete normalized selection, provenance, consequences and confirmation checksum, including exact int64 revisions. The checksum supplies no authority; this command never applies a preset. See the API contract.

crewship workspace member access preset apply MEMBER

Apply an explicitly reviewed preview using required --file confirmed.json or --file - for stdin. The JSON document contains only selection copied unchanged from preview and its exact confirmation_digest. Review preview warnings and provenance before creating this document. Requires current trusted OWNER/ADMIN authority and workspace:admin for scoped credentials.
The command resolves the member once, sends one write and returns canonical policy/provenance in table/JSON/YAML/NDJSON. Unknown/trailing/oversized or malformed consent is rejected before network access. Conflicts/denials exit nonzero without rereading, retrying or replacing consent. Recompute and review a new preview after409; inspect current policy first after an uncertain write outcome.

Review and transfer content ownership

Review content requiring a human successor before removing a workspace member:
Choose an eligible successor from the list. The transfer takes effect immediately and preserves content and grant records. A successor who has lost read access, or an owner changed since review, causes refusal instead of an automatic grant. Workspace administrator access is required. Instance administrator access alone does not grant access to private content metadata. Workbooks are listed and transferred only by a workspace OWNER, and only after their owner has left, is suspended, or a removal or erasure was refused because of the workbook; see When the owner leaves. Use --format json for machine-readable responses, including next_cursor when more results exist. Scoped CLI credentials need workspace:admin for both listing and transfer. workspace:* and unrestricted tokens also carry this authority. Session callers need a current trusted workspace OWNER or ADMIN session.

crewship workspace artifact-policy show

Read the selected workspace’s artifact creation switch, complete crew allowlist and current policy version. Requires a trusted workspace OWNER/ADMIN and workspace:admin for scoped CLI credentials.

crewship workspace artifact-policy set

Replace the entire administrative policy using the version just reviewed with show. This ceiling does not grant consent for individual agent runs. The three limits and the run token requirement apply only with the artifact_agent_access_modes flag on. A sidecar page save that carries the agent run token counts against its run’s --chat-run-create-limit; one without it (a sidecar older than this release) is accepted under the crew hourly limit only until --save-requires-run-token=true; so is a save from an agent that holds only a per-agent v1 token. The host’s own routine page.create is not affected. The token is accounting, not a boundary between agents of one crew. A stale version refuses the change. Read the policy again before deciding on a replacement. Use --format json for machine-readable responses.

Routine Publish dependency

Member access policies and invitation/provisioning rights require edit for any routine with publish; otherwise the server returns 422. Add view separately for effective publication access. Run remains separate. Preset preview/apply reject a policy that retains Publish after removing Edit.