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.
crewship workspace <subcommand> [flags]
crewship ws <subcommand> [flags]
The active workspace is stored in ~/.crewship/cli-config.yaml under workspace (slug or id). It is sent as workspace_id= on every API request by the CLI client, so switching workspaces is purely client-side — no server round-trip.
Auth: list, use, and get require crewship login; mutations additionally require an active workspace context. Role gates apply server-side — OWNER/ADMIN to update or invite, MEMBER+ to read.

Subcommands

CommandPurpose
workspace listList every workspace the caller can see; marks the active one with *.
workspace use <slug-or-id>Set the default workspace in the local config.
workspace get [slug-or-id]Show workspace details (defaults to the active one).
workspace createCreate a new workspace (you become its OWNER).
workspace updatePatch mutable fields on the current workspace.
workspace member listList members of the active workspace.
workspace member add <user-id>Add an existing user to the workspace.
workspace member remove <user-id>Remove a member (prompts unless -y).
workspace member capabilities ...Manage per-member capability grants (aliases: caps, capability). See below.
workspace invite [email]Invite by email (shortcut for invite create).
workspace invite create <email>Create an invitation.
workspace invite listList pending invitations.

Flags

workspace create

FlagDefaultEffect
--name <string>(required)Display name.
--slug <string>(auto)URL slug. Auto-generated from --name if omitted.
--language <code>(server default)Preferred reply language for agents (e.g. cs, en). Reinforced at the top and bottom of every agent prompt — including chat sessions, assignments, and pipelines — so the agent answers in this language.

workspace update

Only flags you actually set are sent — passing nothing returns no fields to update.
FlagEffect
--name <string>Rename the workspace.
--slug <string>Change the slug (URLs flip immediately).
--language <code>Preferred reply language for agents (e.g. cs, en). Reinforced at the top and bottom of every agent prompt — including chat sessions, assignments, and pipelines — so the agent answers in this language.

workspace member add

FlagDefaultEffect
--role <ROLE>MEMBEROne of MEMBER or ADMIN. Owners are seeded at workspace-create time.

workspace member remove

FlagDefaultEffect
-y, --yesfalseSkip the confirmation prompt.

workspace invite / workspace invite create

FlagDefaultEffect
--role <ROLE>MEMBERRole to grant on acceptance. MEMBER or ADMIN.
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.

Examples

List + switch

crewship workspace list
# SLUG                     NAME                ID        ROLE
# acme-engineering *       ACME Engineering    ws_…      OWNER
# acme-design              ACME Design         ws_…      MEMBER

crewship ws use acme-design
# ✓ Default workspace set to: acme-design
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

crewship workspace create \
  --name "ACME Platform" \
  --slug acme-platform \
  --language en

Update a workspace

crewship workspace update --name "ACME Platform Team" --language cs

Member management

crewship workspace member list
crewship workspace member add usr_abc123 --role ADMIN
crewship workspace member remove usr_abc123 --yes
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 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, skill.create, credential.create, credential.rotate, issue.create, memory.write.

Subcommands

CommandArgsPurpose
capabilities list <user-id>exactly 1Show capabilities granted to one member.
capabilities grant <user-id> <cap> [<cap>...]2+Grant one or more capabilities incrementally (existing grants preserved).
capabilities revoke <user-id> <cap> [<cap>...]2+Revoke one or more capabilities incrementally (other grants preserved).
capabilities preset <user-id> <chat|power|admin>exactly 2Replace the member’s capability set with a named bundle (overwrites existing grants).
Bundles map to common combinations:
BundleCapabilities
chatchat-only baseline (default for new MEMBERs).
powerchat + routine.create + issue.create + memory.write (trusted team members).
adminfull set, including credential.create + credential.rotate.
crewship workspace member capabilities list usr_abc123
crewship workspace member caps grant usr_abc123 routine.create issue.create memory.write
crewship workspace member caps revoke usr_abc123 memory.write
crewship workspace member caps preset usr_abc123 power
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

crewship workspace invite alice@acme.com --role ADMIN
# ✓ Invitation sent to alice@acme.com (ADMIN role).

crewship workspace invite list
# ID            EMAIL                ROLE     EXPIRES               CREATED
# inv_…         alice@acme.com       ADMIN    2026-05-26T…          2026-05-19T…
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 accessibleworkspace use validated against /api/v1/workspaces and your token has no membership.
  • --name is requiredcreate needs at least a name.
  • no fields to updateupdate was called without any of --name / --slug / --language.
  • no workspace selectedupdate ran without an active workspace. Run crewship workspace use first or pass --workspace.

See also

  • crewship logincrewship 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 APIGET /api/v1/workspaces.