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.

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, Language, Allow privileged credentials, Pages theme, ID, and Created; machine formats use the corresponding API fields id, name, slug, created_at, preferred_language, allow_privileged_credentials and pages_theme. 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.

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). 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: one row per person, expanded to reveal that member’s role and their capability grants side by side. The collapsed row summarises the grants so a capability stays comparable across the roster without expanding every row. Presets apply to the whole workspace from the card header, with a before/after diff for every member they would change. 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 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 / --pages-theme.
  • --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.
  • 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>

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 requires empty rights and restores ordinary workspace access.
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.