prvng_core/nulib/main_provisioning/commands/configuration.nu

38 lines
902 B
Text
Raw Normal View History

# Configuration Command Handler
# Provides configuration management commands
2025-10-07 10:32:04 +01:00
use ../../lib_provisioning/config/accessor/core.nu *
2025-10-07 10:32:04 +01:00
export def handle_configuration_command [command: string, ops: string, flags: record] {
let subcmd = if ($ops | is-empty) { "" } else { $ops | split row " " | first }
2025-10-07 10:32:04 +01:00
match $subcmd {
"config" => {
# Initialize user configuration
2025-10-07 10:32:04 +01:00
print "🚀 Initializing user configuration"
print "=================================="
print ""
print "Config initialization available"
2025-10-07 10:32:04 +01:00
}
"show" => {
print "📋 Current Configuration"
print "======================="
let cfg = (get-config)
print ($cfg | to json)
}
2025-10-07 10:32:04 +01:00
"validate" => {
print "✓ Configuration is valid"
2025-10-07 10:32:04 +01:00
}
"reset" => {
print "🔄 Configuration reset"
2025-10-07 10:32:04 +01:00
}
2025-10-07 10:32:04 +01:00
_ => {
print "Unknown configuration command"
2025-10-07 10:32:04 +01:00
}
}
}