ThothCTL fully supports Windows 10 and Windows 11 with native PowerShell integration.
# Check Python version
python --version
If Python is not installed, download from python.org or install via Chocolatey:
choco install python
choco install git
choco install graphviz
Install these tools based on your use case:
choco install terraform
# or
choco install opentofu
pip install checkov
choco install trivy
choco install terraform-docs
# Install ThothCTL
pip install thothctl
# Verify installation
thothctl --version
# Clone repository
git clone https://github.com/thothforge/thothctl.git
cd thothctl
# Install in development mode
pip install -e .
# Verify installation
thothctl --version
Enable command autocompletion in PowerShell:
# Run the autocomplete setup
thothctl-register-autocomplete
# Follow the prompts to add to your PowerShell profile
Alternatively, manually add to your PowerShell profile:
# Open PowerShell profile
notepad $PROFILE
# Add this line:
Register-ArgumentCompleter -Native -CommandName thothctl -ScriptBlock { param($wordToComplete, $commandAst, $cursorPosition); $env:_THOTHCTL_COMPLETE="powershell_complete"; $env:COMP_WORDS=$commandAst.ToString(); $env:COMP_CWORD=$cursorPosition; thothctl 2>$null }
# Reload profile
. $PROFILE
ThothCTL stores configuration in:
%LOCALAPPDATA%\thothctl
Typically: C:\Users\<YourUsername>\AppData\Local\thothctl
Run the Windows compatibility test:
# Download and run the test script
python test_windows_compatibility.py
Expected output:
πͺ ThothCTL Windows Compatibility Test
========================================
π Testing platform detection...
Platform: Windows
is_windows(): True
Config dir: C:\Users\...\AppData\Local\thothctl
Executable name (terraform): terraform.exe
β
Platform detection works
π¦ Testing imports...
β
CLI UI imports work
β
Common imports work
β
Scanner imports work
π Testing config directory...
Config directory: C:\Users\...\AppData\Local\thothctl
β
Config directory created successfully
π§ Testing autocomplete...
β
Autocomplete module imports successfully
π‘ Run 'thothctl-register-autocomplete' to set up PowerShell completion
========================================
π Results: 4/4 tests passed
π All tests passed! ThothCTL should work on Windows.
# Create a new space
thothctl init space -s my-space -ot terragrunt -vcs github
# Verify space creation
thothctl list spaces
# Create a new project
thothctl init project -p my-project -s my-space
# Navigate to project
cd my-project
# Scan Terraform code
thothctl scan iac --directory .\terraform
# Scan with specific tools
thothctl scan iac --directory .\terraform --tools checkov,trivy
# Generate inventory with version checking
thothctl inventory iac --check-versions
# Generate HTML report
thothctl inventory iac --check-versions --report-type html
Problem: thothctl command not recognized
Solution:
# Ensure Python Scripts directory is in PATH
$env:Path += ";$env:LOCALAPPDATA\Programs\Python\Python3XX\Scripts"
# Or reinstall with --user flag
pip install --user thothctl
Problem: βterraform.exe not found in PATHβ
Solution:
# Verify tool is installed
where.exe terraform
# If not found, install via Chocolatey
choco install terraform
# Refresh environment variables
refreshenv
Problem: Cannot create config directory
Solution:
# Run PowerShell as Administrator
# Or manually create directory
New-Item -ItemType Directory -Force -Path "$env:LOCALAPPDATA\thothctl"
Problem: Module import failures
Solution:
# Reinstall with all dependencies
pip uninstall thothctl
pip install thothctl
# Or install from source
pip install -e .
ThothCTL automatically handles Windows path formats:
# All these work correctly
thothctl scan iac --directory .\terraform
thothctl scan iac --directory C:\projects\terraform
thothctl scan iac --directory \\network\share\terraform
Set environment variables for ThothCTL:
# Enable debug mode
$env:THOTHCTL_DEBUG = "true"
# Set custom config directory
$env:THOTH_CONFIG_DIR = "C:\custom\path"
# Set log level
$env:THOTH_LOG_LEVEL = "DEBUG"
For Windows-specific issues: