The thothctl check space command provides comprehensive diagnostics for space configuration and setup. This command validates space configuration, VCS settings, credentials status, and project usage to help troubleshoot space-related issues.
Usage: thothctl check space [OPTIONS]
Check space configuration and diagnostics
Options:
-s, --space-name TEXT Name of the space to check [required]
--help Show this message and exit.
thothctl check space --space-name development
This validates the specified spaceโs configuration from the global ~/.thothcf/spaces.toml registry and provides comprehensive diagnostics.
The command provides professional Rich-formatted output with multiple diagnostic sections:
~/.thothcf/spaces.toml (the global registry)configs/scan_policy.toml existence check (space-level policy overrides)โน๏ธ ๐ Checking space configuration: labvel-devsecops
๐ Space Overview: labvel-devsecops
โโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Property โ Value โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Name โ labvel-devsecops โ
โ Version โ 1.0.0 โ
โ Path โ /home/labvel/.thothcf/spaces/labvel-devsecops โ
โ Config Path โ configs โ
โ Credentials Path โ credentials โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ VCS Configuration
โโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโ
โ Setting โ Value โ Status โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ Default Provider โ github โ โ
Configured โ
โ Available Providers โ azure_repos, github, gitlab โ โ
Set โ
โ VCS Path โ vcs โ โ
Set โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
๐ Credentials Status
โโโโโโโโโโโโโณโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโ
โ Type โ File โ Status โ Details โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ VCS โ vcs.enc โ โ
Available โ Size: 292 bytes โ
โ TERRAFORM โ terraform.enc โ โ Missing โ Not configured โ
โ CLOUD โ cloud.enc โ โ Missing โ Not configured โ
โโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ ๐ Projects โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ No projects are currently using space 'labvel-devsecops' โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
When experiencing issues with space configuration:
thothctl check space --space-name production
This helps identify:
Before deploying projects in a space:
thothctl check space --space-name staging
Ensures the space is properly configured and ready for project operations.
To verify credential setup and security:
thothctl check space --space-name development
Shows credential status and provides security recommendations.
The command reads space configuration from ~/.thothcf/spaces.toml โ the single source of truth for all space definitions. It validates the space entry and its associated directory structure.
~/.thothcf/spaces.toml)The check space command looks up the space in the global registry:
[spaces.development]
name = "development"
description = "Development environment space"
created_at = "2024-01-15T10:30:00Z"
[spaces.development.version_control]
provider = "github"
[spaces.development.terraform]
registry = "https://registry.terraform.io"
auth_method = "token"
[spaces.development.orchestration]
tool = "terragrunt"
[spaces.development.projects]
[spaces.development.projects.my-app]
registered_at = "2024-01-16T09:00:00Z"
[spaces.development.projects.vpc-network]
registered_at = "2024-01-17T14:00:00Z"
~/.thothcf/spaces/{space_name}/
โโโ metadata.toml # Directory identification (name, created_at, config_source)
โโโ configs/
โ โโโ scan_policy.toml # Space-level scan policy overrides (optional)
โโโ credentials/ # Encrypted VCS/TF/cloud credentials
โโโ vcs/ # VCS-specific settings
โโโ terraform/ # Terraform registry settings
โโโ orchestration/ # Orchestration tool settings
The command also checks for configs/scan_policy.toml, which provides space-level security policy overrides for scan operations.
Credentials are stored as encrypted .enc files in the credentials/ directory. The check space command validates their presence and file integrity without decrypting them.
โ Space 'nonexistent' does not exist
Solution: Verify space name or create the space using thothctl init space.
โ ๏ธ Configuration file missing: metadata.toml
Solution: Reinitialize the space or manually create the metadata file.
โ GitHub Token: Invalid or expired
Solution: Update credentials using space initialization or manual configuration.
โ VCS Configuration: Connection failed
Solution: Verify network connectivity and credential validity.
# Create a new space
thothctl init space --space-name development --vcs-provider github
# Check the newly created space
thothctl check space --space-name development
# Create project in space
thothctl init project --project-name my-app --space development
# Verify space configuration before project creation
thothctl check space --space-name development
# List all spaces
thothctl list spaces
# Check specific space
thothctl check space --space-name production
# Remove space (with validation)
thothctl remove space --space-name old-space
Error: [Errno 13] Permission denied: ~/.thothcf/spaces/development
Solution: Check file permissions and ensure proper access to the ThothCTL configuration directory.
โ VCS Connection: Timeout
Solution: Verify network connectivity and firewall settings for VCS provider access.
โ ๏ธ Configuration file corrupted
Solution: Backup and recreate the space configuration or restore from a known good state.
Enable debug mode for detailed diagnostic information:
thothctl --debug check space --space-name development
This provides: