Configure TKA Settings
About 692 wordsAbout 2 min
2025-01-27
Configure TKA CLI settings such as output themes, debug logging, and behavior preferences using the configuration system.
Overview
TKA provides a configuration system similar to git config that allows you to:
- Set persistent preferences for output formatting
- Control debug and logging behavior
- Customize API retry settings
- Configure default values for common flags
Configuration values are stored in YAML format and can be managed through the CLI.
Configuration File Location
TKA searches for configuration files in this order:
- Home config:
~/.config/tka/config.yaml - System config:
/etc/tka/config.yaml(Linux/macOS)
The first file found is used. If no configuration file exists, TKA uses built-in defaults.
Basic Usage
View Current Configuration
Display all current settings:
tka configExample output:
api: retryafterseconds: 1 debug: false output: long: true markdownlint-fix: false quiet: false theme: tokyo-nightGet a Specific Setting
Check the value of a specific configuration key:
# Check current theme tka config output.theme # Check debug setting tka config debugSet Configuration Values
Change configuration settings:
# Set output theme tka config output.theme dracula # Enable debug logging tka config debug true # Disable long output by default tka config output.long false
Common Configuration Tasks
Change Output Theme
TKA supports multiple color themes for different terminal environments:
# Dark themes (good for dark terminals)
tka config output.theme tokyo-night # Default, purple/blue accents
tka config output.theme dracula # Vibrant colors
tka config output.theme dark # Simple dark
tka config output.theme light # Light theme (good for light terminals)
tka config output.theme ascii # Plaintext theme (no colors, good for scripts/CI)
# Check current theme
tka config output.themeControl Output Verbosity
Adjust how much information TKA shows:
tka config output.long true # Show detailed output by default
tka config output.long false # Use concise output by default
tka config output.quiet true # Suppress non-essential messages
tka config output.quiet false # Re-enable all outputEnable Debug Logging
Useful for troubleshooting:
tka config debug true # Enable debug mode
# Test with debug output
tka login --no-eval --long # Shows detailed debug information
# Disable debug mode
tka config debug falseAdjust API Behavior
Configure retry behavior for slow networks:
tka config api.retryafterseconds 3 # Increase retry delay for slow networks
tka config api.retryafterseconds 1 # Reset to defaultView Cluster Information
You can view the cluster information that TKA exposes to understand the cluster you're connecting to:
$ tka get cluster-info
ℹ Cluster Information:
╭───────────────────────────────────────────╮
│ Server URL: https://clusterpi-leader:6443 │
│ │
│ Insecure: false │
│ CA Data: LS0tLS1CRUdJTiBDRVJU...tLS0K │
│ │
│ Labels: environment=development │
│ owner=specht-labs │
│ project=tka │
╰───────────────────────────────────────────╯This information is particularly useful for:
- Verifying the correct cluster endpoint
- Understanding cluster labels for automation
- Debugging connection issues
- Confirming TLS configuration
Configuration File Management
Create Configuration File
If no configuration file exists, use --force to create one:
# Create config file and set a value
tka config output.theme dracula --forceThis creates ~/.config/tka/config.yaml with your setting.
View Configuration File Location
See which configuration file is being used:
# Show config with filename
tka get config --filename
# Show only the config file path
tka get config --filename --quietTroubleshooting
Configuration Not Found
Problem: TKA doesn't seem to use your configuration
Solutions:
# Check which config file is being used
tka get config --filename
# Verify file exists
ls -la ~/.config/tka/config.yaml
# Check file permissions
cat ~/.config/tka/config.yamlSettings Not Persisting
Problem: Configuration changes don't persist
Solutions:
# Ensure you have write permissions
ls -la ~/.config/tka/
# Try creating config explicitly
tka config output.theme dracula --force
# Check if config file was created
tka get config --filenameMultiple Configuration Files
Problem: Unsure which configuration file is active
Solutions:
# Show active config file
tka get config --filename
# List all possible config locations
ls -la ./config.yaml ~/.config/tka/config.yaml /etc/tka/config.yaml 2>/dev/nullRelated Documentation
- Configuration Reference - Complete list of all available settings and defaults
tka config- View and set configuration command referencetka get config- View configuration with additional optionstka set config- Alternative syntax for setting values
Next Steps
- Configure ACLs for user access control
- Shell Integration Setup for seamless environment updates
- Troubleshooting Guide for common issues
