> ## Documentation Index
> Fetch the complete documentation index at: https://traceroot.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To set up traceroot in a repository, follow the setup prompt in https://traceroot.ai/docs/getting-started/coding-agents.md.

# Workspaces and Projects from the Terminal

> List, create, change, and delete workspaces and projects with the traceroot CLI

These commands act on your account, so they need a browser login or `TRACEROOT_TOKEN`, not a project API key, and your [role](https://traceroot.ai/docs/getting-started/concepts.md#roles) decides what you can change.

## List workspaces and projects

```bash theme={null}
traceroot workspaces list
traceroot projects list --workspace-id <workspace-id>
```

`--workspace-id` is optional. Without it, `projects list` shows every project you can access.

## Create a workspace or project

```bash theme={null}
traceroot workspaces create --name "Research"
traceroot projects create --workspace-id <workspace-id> --name "Support agent" --trace-ttl-days 30
```

You administer a workspace you create. Creating a project takes MEMBER or higher. Either command returns the existing one if the name is already yours: a workspace you administer, or a project in that workspace. `--trace-ttl-days` is optional, from 1 to 365.

## Change a workspace or project

```bash theme={null}
traceroot workspaces update <workspace-id> --name "Research team"
traceroot projects update <project-id> --name "Support bot" --trace-ttl-days 90
```

Both take ADMIN. To return a project's retention to the plan default, send `{ "trace_ttl_days": null }` with `--from-file`. A name already in use exits 1.

## Delete a workspace or project

```bash theme={null}
traceroot projects delete <project-id> --reason "Service retired"
traceroot workspaces delete <workspace-id> --name "Research team" --reason "Team merged"
```

Both take ADMIN and a [`--reason`](https://traceroot.ai/docs/cli/scripting#shared-flags).

Deleting a project removes it from every list and read, and its API keys stop working. Its data stays for the retention window.

`workspaces delete` also needs `--name`, set to the workspace's current name as confirmation. It permanently deletes the workspace with its projects, their API keys, its memberships, and its invites. Your only workspace can't be deleted. A wrong name or your only workspace exits 1.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.