# Workspace CLI

Use `provon workspace` to manage organizations, projects, members, and invitations.

These commands operate on the Workspace API and require an authenticated credential.

## Organizations

List organizations available to the current credential:

```bash
provon workspace organizations list
provon workspace orgs list
```

Create an organization:

```bash
provon workspace organizations create "My Org" --region us-east-1
```

Inspect and update an organization:

```bash
provon workspace organizations get <organization-id>
provon workspace organizations update <organization-id> --name "New Name"
provon workspace organizations update <organization-id> --slug new-slug
```

## Organization Membership

Invite a user:

```bash
provon workspace organizations invite <organization-id> <email> --role MEMBER
```

Available roles are `OWNER`, `ADMIN`, `MEMBER`, and `BILLING`.

Revoke a pending invitation:

```bash
provon workspace organizations revoke-invitation <organization-id> <invitation-id>
```

Update or remove a member:

```bash
provon workspace organizations set-member-role <organization-id> <member-id> --role ADMIN
provon workspace organizations remove-member <organization-id> <member-id>
```

## Projects

List projects available to the current credential:

```bash
provon workspace projects list
```

Create a project in an organization:

```bash
provon workspace projects create "My Project" \
  --organization-id <organization-id> \
  --description "Project description"
```

Inspect and update a project:

```bash
provon workspace projects get <project-id>
provon workspace projects update <project-id> --name "New Name"
provon workspace projects update <project-id> --slug new-slug
provon workspace projects update <project-id> --description "Updated description"
```

Delete a project:

```bash
provon workspace projects delete <project-id>
```

## Project Membership

Set or remove a project member role override:

```bash
provon workspace projects set-member-role <project-id> <user-id> --role ADMIN
provon workspace projects remove-member-role <project-id> <user-id>
```

## Related Docs

- [CLI authentication](./authentication.md)
- [API authentication](../api/authentication.md)
