The thothctl list spaces command allows you to view all spaces that are managed by ThothCTL. This helps you understand how your projects are organized and which spaces are available for new projects.
thothctl list spaces [OPTIONS]
| Option | Description |
|---|---|
--help |
Show help message and exit |
To list all spaces managed by ThothCTL:
thothctl list spaces
Example output:
π Space List
ββββββββββββββββββββ³βββββββββββββ³βββββββββββββββββββββββββββββββ
β SpaceName β Projects β Description β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β π dev β 3 projects β Development environment β
ββββββββββββββββββββΌβββββββββββββΌβββββββββββββββββββββββββββββββ€
β π staging β 2 projects β Staging environment β
ββββββββββββββββββββΌβββββββββββββΌβββββββββββββββββββββββββββββββ€
β π production β 1 projects β Production environment β
ββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββββββββββββββββββββ
The space list output includes the following information:
Spaces are marked with a globe icon (π) to indicate they are spaces managed by ThothCTL.
Spaces and their associated projects are tracked in the global registry at ~/.thothcf/spaces.toml. Each space entry includes a projects list under spaces.<name>.projects:
[spaces.dev]
name = "dev"
description = "Development environment"
[spaces.dev.version_control]
provider = "github"
[spaces.dev.projects]
[spaces.dev.projects.ecs-service]
registered_at = "2024-01-16T09:00:00Z"
[spaces.dev.projects.vpc-network]
registered_at = "2024-01-17T14:00:00Z"
[spaces.dev.projects.api-gateway]
registered_at = "2024-01-18T11:00:00Z"
[spaces.production]
name = "production"
description = "Production environment"
[spaces.production.version_control]
provider = "github"
[spaces.production.projects]
[spaces.production.projects.vpc-network]
registered_at = "2024-02-02T10:00:00Z"
[spaces.production.projects.eks-cluster]
registered_at = "2024-02-03T15:00:00Z"
The project count displayed in the list output is derived from this registry. The same project name can appear in multiple spaces due to namespace scoping (e.g., vpc-network in both dev and production).
While ThothCTL doesnβt provide built-in filtering options for the list command, you can combine it with standard command-line tools to filter the output:
# List spaces and filter by name using grep
thothctl list spaces | grep "dev"
# List spaces with specific project counts
thothctl list spaces | grep "0 projects"
Use the list command to maintain an overview of all your spaces:
# Generate a list of all spaces
thothctl list spaces > spaces_inventory.txt
Identify which spaces have many or few projects:
# List all spaces to review organization
thothctl list spaces
Identify empty spaces that might need cleanup:
# List spaces with no projects
thothctl list spaces | grep "0 projects"
Share information about available spaces with team members:
# Generate a formatted list of spaces
thothctl list spaces
remove space commandthothctl init space - Create a new spacethothctl remove space - Remove an existing spacethothctl init project --space <space-name> - Create a project in a specific space