417 lines
28 KiB
Plaintext
417 lines
28 KiB
Plaintext
# Hierarchical Help System with Categories
|
||
# Provides organized, drill-down help for provisioning commands
|
||
|
||
use ../lib_provisioning/config/accessor.nu *
|
||
|
||
# Main help dispatcher
|
||
export def provisioning-help [
|
||
category?: string # Optional category: infrastructure, orchestration, development, workspace, platform, concepts, guides
|
||
]: nothing -> string {
|
||
match $category {
|
||
"infrastructure" | "infra" => (help-infrastructure)
|
||
"orchestration" | "orch" => (help-orchestration)
|
||
"development" | "dev" => (help-development)
|
||
"workspace" | "ws" => (help-workspace)
|
||
"platform" | "plat" => (help-platform)
|
||
"concepts" | "concept" => (help-concepts)
|
||
"guides" | "guide" | "howto" => (help-guides)
|
||
_ => (help-main)
|
||
}
|
||
}
|
||
|
||
# Main help overview with categories
|
||
def help-main []: nothing -> string {
|
||
(
|
||
$"(_ansi yellow_bold)╔════════════════════════════════════════════════════════════════╗(_ansi reset)\n" +
|
||
$"(_ansi yellow_bold)║ (_ansi reset) (_ansi cyan_bold)PROVISIONING SYSTEM(_ansi reset) - Layered Infrastructure Automation (_ansi yellow_bold) ║(_ansi reset)\n" +
|
||
$"(_ansi yellow_bold)╚════════════════════════════════════════════════════════════════╝(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)📚 COMMAND CATEGORIES(_ansi reset) (_ansi default_dimmed)- Use 'provisioning help <category>' for details(_ansi reset)\n\n" +
|
||
|
||
$" (_ansi cyan)🏗️ infrastructure(_ansi reset) (_ansi default_dimmed)[infra](_ansi reset)\t Server, taskserv, cluster, and infra management\n" +
|
||
$" (_ansi purple)⚡ orchestration(_ansi reset) (_ansi default_dimmed)[orch](_ansi reset)\t Workflow, batch operations, and orchestrator control\n" +
|
||
$" (_ansi blue)🧩 development(_ansi reset) (_ansi default_dimmed)[dev](_ansi reset)\t\t Module discovery, layers, versions, and packaging\n" +
|
||
$" (_ansi green)📁 workspace(_ansi reset) (_ansi default_dimmed)[ws](_ansi reset)\t\t Workspace and template management\n" +
|
||
$" (_ansi red)🖥️ platform(_ansi reset) (_ansi default_dimmed)[plat](_ansi reset)\t\t Orchestrator, Control Center UI, MCP Server\n" +
|
||
$" (_ansi magenta)📚 guides(_ansi reset) (_ansi default_dimmed)[guide](_ansi reset)\t\t Quick guides and cheatsheets\n" +
|
||
$" (_ansi yellow)💡 concepts(_ansi reset) (_ansi default_dimmed)[concept](_ansi reset)\t\t Understanding layers, modules, and architecture\n\n" +
|
||
|
||
$"(_ansi green_bold)🚀 QUICK START(_ansi reset)\n\n" +
|
||
$" 1. (_ansi cyan)Understand the system(_ansi reset): provisioning help concepts\n" +
|
||
$" 2. (_ansi cyan)Create workspace(_ansi reset): provisioning workspace init my-infra --activate\n" +
|
||
$" (_ansi default_dimmed)Or use interactive:(_ansi reset) provisioning workspace init --interactive\n" +
|
||
$" 3. (_ansi cyan)Discover modules(_ansi reset): provisioning module discover taskservs\n" +
|
||
$" 4. (_ansi cyan)Create servers(_ansi reset): provisioning server create --infra my-infra\n" +
|
||
$" 5. (_ansi cyan)Deploy services(_ansi reset): provisioning taskserv create kubernetes\n\n" +
|
||
|
||
$"(_ansi green_bold)🔧 COMMON COMMANDS(_ansi reset)\n\n" +
|
||
$" provisioning server list - List all servers\n" +
|
||
$" provisioning workflow list - List workflows\n" +
|
||
$" provisioning module discover taskservs - Discover available taskservs\n" +
|
||
$" provisioning layer show <workspace> - Show layer resolution\n" +
|
||
$" provisioning version check - Check component versions\n\n" +
|
||
|
||
$"(_ansi green_bold)ℹ️ HELP TOPICS(_ansi reset)\n\n" +
|
||
$" provisioning help infrastructure (_ansi default_dimmed)[or: infra](_ansi reset) - Server/cluster lifecycle\n" +
|
||
$" provisioning help orchestration (_ansi default_dimmed)[or: orch](_ansi reset) - Workflows and batch operations\n" +
|
||
$" provisioning help development (_ansi default_dimmed)[or: dev](_ansi reset) - Module system and tools\n" +
|
||
$" provisioning help workspace (_ansi default_dimmed)[or: ws](_ansi reset) - Workspace and templates\n" +
|
||
$" provisioning help platform (_ansi default_dimmed)[or: plat](_ansi reset) - Platform services with web UI\n" +
|
||
$" provisioning help guides (_ansi default_dimmed)[or: guide](_ansi reset) - Quick guides and cheatsheets\n" +
|
||
$" provisioning help concepts (_ansi default_dimmed)[or: concept](_ansi reset) - Architecture and key concepts\n\n" +
|
||
|
||
$"(_ansi default_dimmed)💡 Tip: Most commands support --help for detailed options\n" +
|
||
$" Example: provisioning server --help(_ansi reset)\n"
|
||
)
|
||
}
|
||
|
||
# Infrastructure category help
|
||
def help-infrastructure []: nothing -> string {
|
||
(
|
||
$"(_ansi cyan_bold)╔══════════════════════════════════════════════════╗(_ansi reset)\n" +
|
||
$"(_ansi cyan_bold)║(_ansi reset) 🏗️ INFRASTRUCTURE MANAGEMENT (_ansi cyan_bold)║(_ansi reset)\n" +
|
||
$"(_ansi cyan_bold)╚══════════════════════════════════════════════════╝(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)[Lifecycle](_ansi reset) Server Management\n" +
|
||
$" (_ansi blue)server create(_ansi reset) - Create new servers [--infra <name>] [--check]\n" +
|
||
$" (_ansi blue)server delete(_ansi reset) - Delete servers [--yes] [--keepstorage]\n" +
|
||
$" (_ansi blue)server list(_ansi reset) - List all servers [--out json|yaml]\n" +
|
||
$" (_ansi blue)server ssh <host>(_ansi reset) - SSH into server\n" +
|
||
$" (_ansi blue)server price(_ansi reset) - Show server pricing\n\n" +
|
||
|
||
$"(_ansi green_bold)[Services](_ansi reset) Task Service Management\n" +
|
||
$" (_ansi blue)taskserv create <svc>(_ansi reset) - Install service [kubernetes, redis, postgres]\n" +
|
||
$" (_ansi blue)taskserv delete <svc>(_ansi reset) - Remove service\n" +
|
||
$" (_ansi blue)taskserv list(_ansi reset) - List available services\n" +
|
||
$" (_ansi blue)taskserv generate <svc>(_ansi reset) - Generate service configuration\n" +
|
||
$" (_ansi blue)taskserv validate <svc>(_ansi reset) - Validate service before deployment\n" +
|
||
$" (_ansi blue)taskserv test <svc>(_ansi reset) - Test service in sandbox\n" +
|
||
$" (_ansi blue)taskserv check-deps <svc>(_ansi reset) - Check service dependencies\n" +
|
||
$" (_ansi blue)taskserv check-updates(_ansi reset) - Check for service updates\n\n" +
|
||
|
||
$"(_ansi green_bold)[Complete](_ansi reset) Cluster Operations\n" +
|
||
$" (_ansi blue)cluster create(_ansi reset) - Create complete cluster\n" +
|
||
$" (_ansi blue)cluster delete(_ansi reset) - Delete cluster\n" +
|
||
$" (_ansi blue)cluster list(_ansi reset) - List cluster components\n\n" +
|
||
|
||
$"(_ansi green_bold)[Management](_ansi reset) Infrastructure\n" +
|
||
$" (_ansi blue)infra list(_ansi reset) - List infrastructures\n" +
|
||
$" (_ansi blue)infra validate(_ansi reset) - Validate infrastructure config\n" +
|
||
$" (_ansi blue)generate infra --new <name>(_ansi reset) - Create new infrastructure\n\n" +
|
||
|
||
$"(_ansi default_dimmed)💡 Tip: Use --check flag for dry-run mode\n" +
|
||
$" Example: provisioning server create --check(_ansi reset)\n"
|
||
)
|
||
}
|
||
|
||
# Orchestration category help
|
||
def help-orchestration []: nothing -> string {
|
||
(
|
||
$"(_ansi purple_bold)╔══════════════════════════════════════════════════╗(_ansi reset)\n" +
|
||
$"(_ansi purple_bold)║(_ansi reset) ⚡ ORCHESTRATION & WORKFLOWS (_ansi purple_bold)║(_ansi reset)\n" +
|
||
$"(_ansi purple_bold)╚══════════════════════════════════════════════════╝(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)[Control](_ansi reset) Orchestrator Management\n" +
|
||
$" (_ansi blue)orchestrator start(_ansi reset) - Start orchestrator [--background]\n" +
|
||
$" (_ansi blue)orchestrator stop(_ansi reset) - Stop orchestrator\n" +
|
||
$" (_ansi blue)orchestrator status(_ansi reset) - Check if running\n" +
|
||
$" (_ansi blue)orchestrator health(_ansi reset) - Health check\n" +
|
||
$" (_ansi blue)orchestrator logs(_ansi reset) - View logs [--follow]\n\n" +
|
||
|
||
$"(_ansi green_bold)[Workflows](_ansi reset) Single Task Workflows\n" +
|
||
$" (_ansi blue)workflow list(_ansi reset) - List all workflows\n" +
|
||
$" (_ansi blue)workflow status <id>(_ansi reset) - Get workflow status\n" +
|
||
$" (_ansi blue)workflow monitor <id>(_ansi reset) - Monitor in real-time\n" +
|
||
$" (_ansi blue)workflow stats(_ansi reset) - Show statistics\n" +
|
||
$" (_ansi blue)workflow cleanup(_ansi reset) - Clean old workflows\n\n" +
|
||
|
||
$"(_ansi green_bold)[Batch](_ansi reset) Multi-Provider Batch Operations\n" +
|
||
$" (_ansi blue)batch submit <file>(_ansi reset) - Submit KCL workflow [--wait]\n" +
|
||
$" (_ansi blue)batch list(_ansi reset) - List batches [--status Running]\n" +
|
||
$" (_ansi blue)batch status <id>(_ansi reset) - Get batch status\n" +
|
||
$" (_ansi blue)batch monitor <id>(_ansi reset) - Real-time monitoring\n" +
|
||
$" (_ansi blue)batch rollback <id>(_ansi reset) - Rollback failed batch\n" +
|
||
$" (_ansi blue)batch cancel <id>(_ansi reset) - Cancel running batch\n" +
|
||
$" (_ansi blue)batch stats(_ansi reset) - Show statistics\n\n" +
|
||
|
||
$"(_ansi default_dimmed)💡 Batch workflows support mixed providers: UpCloud, AWS, and local\n" +
|
||
$" Example: provisioning batch submit deployment.k --wait(_ansi reset)\n"
|
||
)
|
||
}
|
||
|
||
# Development tools category help
|
||
def help-development []: nothing -> string {
|
||
(
|
||
$"(_ansi blue_bold)╔══════════════════════════════════════════════════╗(_ansi reset)\n" +
|
||
$"(_ansi blue_bold)║(_ansi reset) 🧩 DEVELOPMENT TOOLS (_ansi blue_bold)║(_ansi reset)\n" +
|
||
$"(_ansi blue_bold)╚══════════════════════════════════════════════════╝(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)[Discovery](_ansi reset) Module System\n" +
|
||
$" (_ansi blue)module discover <type>(_ansi reset) - Find taskservs/providers/clusters\n" +
|
||
$" (_ansi blue)module load <type> <ws> <mods>(_ansi reset) - Load modules into workspace\n" +
|
||
$" (_ansi blue)module list <type> <ws>(_ansi reset) - List loaded modules\n" +
|
||
$" (_ansi blue)module unload <type> <ws> <mod>(_ansi reset) - Unload module\n" +
|
||
$" (_ansi blue)module sync-kcl <infra>(_ansi reset) - Sync KCL dependencies\n\n" +
|
||
|
||
$"(_ansi green_bold)[Architecture](_ansi reset) Layer System (_ansi cyan)STRATEGIC(_ansi reset)\n" +
|
||
$" (_ansi blue)layer explain(_ansi reset) - Explain layer concept\n" +
|
||
$" (_ansi blue)layer show <ws>(_ansi reset) - Show layer resolution\n" +
|
||
$" (_ansi blue)layer test <mod> <ws>(_ansi reset) - Test layer resolution\n" +
|
||
$" (_ansi blue)layer stats(_ansi reset) - Show statistics\n\n" +
|
||
|
||
$"(_ansi green_bold)[Maintenance](_ansi reset) Version Management\n" +
|
||
$" (_ansi blue)version check(_ansi reset) - Check all versions\n" +
|
||
$" (_ansi blue)version show(_ansi reset) - Display status [--format table|json]\n" +
|
||
$" (_ansi blue)version updates(_ansi reset) - Check available updates\n" +
|
||
$" (_ansi blue)version apply(_ansi reset) - Apply config updates\n" +
|
||
$" (_ansi blue)version taskserv <name>(_ansi reset) - Show taskserv version\n\n" +
|
||
|
||
$"(_ansi green_bold)[Distribution](_ansi reset) Packaging (_ansi yellow)Advanced(_ansi reset)\n" +
|
||
$" (_ansi blue)pack core(_ansi reset) - Package core schemas\n" +
|
||
$" (_ansi blue)pack provider <name>(_ansi reset) - Package provider\n" +
|
||
$" (_ansi blue)pack list(_ansi reset) - List packages\n" +
|
||
$" (_ansi blue)pack clean(_ansi reset) - Clean old packages\n\n" +
|
||
|
||
$"(_ansi default_dimmed)💡 The layer system is key to configuration inheritance\n" +
|
||
$" Use 'provisioning layer explain' to understand it(_ansi reset)\n"
|
||
)
|
||
}
|
||
|
||
# Workspace category help
|
||
def help-workspace []: nothing -> string {
|
||
(
|
||
$"(_ansi green_bold)╔══════════════════════════════════════════════════╗(_ansi reset)\n" +
|
||
$"(_ansi green_bold)║(_ansi reset) 📁 WORKSPACE & TEMPLATES (_ansi green_bold)║(_ansi reset)\n" +
|
||
$"(_ansi green_bold)╚══════════════════════════════════════════════════╝(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)[Management](_ansi reset) Workspace Operations\n" +
|
||
$" (_ansi blue)workspace init <path>(_ansi reset) - Initialize workspace [--activate] [--interactive]\n" +
|
||
$" (_ansi blue)workspace create <path>(_ansi reset) - Create workspace structure [--activate]\n" +
|
||
$" (_ansi blue)workspace activate <name>(_ansi reset) - Activate existing workspace as default\n" +
|
||
$" (_ansi blue)workspace validate <path>(_ansi reset) - Validate structure\n" +
|
||
$" (_ansi blue)workspace info <path>(_ansi reset) - Show information\n" +
|
||
$" (_ansi blue)workspace list(_ansi reset) - List workspaces\n" +
|
||
$" (_ansi blue)workspace migrate <path>(_ansi reset) - Migrate workspace\n\n" +
|
||
|
||
$"(_ansi green_bold)[Creation Modes](_ansi reset)\n" +
|
||
$" (_ansi blue)--activate(-a)(_ansi reset) - Activate workspace as default after creation\n" +
|
||
$" (_ansi blue)--interactive(-I)(_ansi reset) - Interactive workspace creation wizard\n\n" +
|
||
|
||
$"(_ansi green_bold)[Configuration](_ansi reset) Workspace Config Management\n" +
|
||
$" (_ansi blue)workspace config show [name](_ansi reset) - Show workspace config [--format yaml|json|toml]\n" +
|
||
$" (_ansi blue)workspace config validate [name](_ansi reset) - Validate all configs\n" +
|
||
$" (_ansi blue)workspace config generate provider <name>(_ansi reset) - Generate provider config\n" +
|
||
$" (_ansi blue)workspace config edit <type> [name](_ansi reset) - Edit config (main|provider|platform|kms)\n" +
|
||
$" (_ansi blue)workspace config hierarchy [name](_ansi reset) - Show config loading order\n" +
|
||
$" (_ansi blue)workspace config list [name](_ansi reset) - List config files [--type all|provider|platform|kms]\n\n" +
|
||
|
||
$"(_ansi green_bold)[Patterns](_ansi reset) Infrastructure Templates\n" +
|
||
$" (_ansi blue)template list(_ansi reset) - List templates [--type taskservs|providers]\n" +
|
||
$" (_ansi blue)template types(_ansi reset) - Show template categories\n" +
|
||
$" (_ansi blue)template show <name>(_ansi reset) - Show template details\n" +
|
||
$" (_ansi blue)template apply <name> <infra>(_ansi reset) - Apply to infrastructure\n" +
|
||
$" (_ansi blue)template validate <infra>(_ansi reset) - Validate template usage\n\n" +
|
||
|
||
$"(_ansi default_dimmed)💡 Config commands use active workspace if name not provided\n" +
|
||
$" Example: provisioning workspace config show --format json(_ansi reset)\n"
|
||
)
|
||
}
|
||
|
||
# Platform services category help
|
||
def help-platform []: nothing -> string {
|
||
(
|
||
$"(_ansi red_bold)╔══════════════════════════════════════════════════╗(_ansi reset)\n" +
|
||
$"(_ansi red_bold)║(_ansi reset) 🖥️ PLATFORM SERVICES (_ansi red_bold)║(_ansi reset)\n" +
|
||
$"(_ansi red_bold)╚══════════════════════════════════════════════════╝(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)[Control Center](_ansi reset) (_ansi cyan_bold)🌐 Web UI + Policy Engine(_ansi reset)\n" +
|
||
$" (_ansi blue)control-center server(_ansi reset) - Start Cedar policy engine (_ansi cyan)--port 8080(_ansi reset)\n" +
|
||
$" (_ansi blue)control-center policy validate(_ansi reset) - Validate Cedar policies\n" +
|
||
$" (_ansi blue)control-center policy test(_ansi reset) - Test policies with data\n" +
|
||
$" (_ansi blue)control-center compliance soc2(_ansi reset) - SOC2 compliance check\n" +
|
||
$" (_ansi blue)control-center compliance hipaa(_ansi reset) - HIPAA compliance check\n\n" +
|
||
|
||
$"(_ansi cyan_bold) 🎨 Features:(_ansi reset)\n" +
|
||
$" • (_ansi green)Web-based UI(_ansi reset) - WASM-powered control center interface\n" +
|
||
$" • (_ansi green)Policy Engine(_ansi reset) - Cedar policy evaluation and versioning\n" +
|
||
$" • (_ansi green)Compliance(_ansi reset) - SOC2 Type II and HIPAA validation\n" +
|
||
$" • (_ansi green)Security(_ansi reset) - JWT auth, MFA, RBAC, anomaly detection\n" +
|
||
$" • (_ansi green)Audit Trail(_ansi reset) - Complete compliance audit logging\n\n" +
|
||
|
||
$"(_ansi green_bold)[Orchestrator](_ansi reset) Hybrid Rust/Nushell Coordination\n" +
|
||
$" (_ansi blue)orchestrator start(_ansi reset) - Start orchestrator [--background]\n" +
|
||
$" (_ansi blue)orchestrator stop(_ansi reset) - Stop orchestrator\n" +
|
||
$" (_ansi blue)orchestrator status(_ansi reset) - Check if running\n" +
|
||
$" (_ansi blue)orchestrator health(_ansi reset) - Health check with diagnostics\n" +
|
||
$" (_ansi blue)orchestrator logs(_ansi reset) - View logs [--follow]\n\n" +
|
||
|
||
$"(_ansi green_bold)[MCP Server](_ansi reset) AI-Assisted DevOps Integration\n" +
|
||
$" (_ansi blue)mcp-server start(_ansi reset) - Start MCP server [--debug]\n" +
|
||
$" (_ansi blue)mcp-server status(_ansi reset) - Check server status\n\n" +
|
||
|
||
$"(_ansi cyan_bold) 🤖 Features:(_ansi reset)\n" +
|
||
$" • (_ansi green)AI-Powered Parsing(_ansi reset) - Natural language to infrastructure\n" +
|
||
$" • (_ansi green)Multi-Provider(_ansi reset) - AWS, UpCloud, Local support\n" +
|
||
$" • (_ansi green)Ultra-Fast(_ansi reset) - Microsecond latency, 1000x faster than Python\n" +
|
||
$" • (_ansi green)Type Safe(_ansi reset) - Compile-time guarantees with zero runtime errors\n\n" +
|
||
|
||
$"(_ansi green_bold)🌐 REST API ENDPOINTS(_ansi reset)\n\n" +
|
||
$"(_ansi yellow)Control Center(_ansi reset) - (_ansi default_dimmed)http://localhost:8080(_ansi reset)\n" +
|
||
$" • POST /policies/evaluate - Evaluate policy decisions\n" +
|
||
$" • GET /policies - List all policies\n" +
|
||
$" • GET /compliance/soc2 - SOC2 compliance check\n" +
|
||
$" • GET /anomalies - List detected anomalies\n\n" +
|
||
|
||
$"(_ansi yellow)Orchestrator(_ansi reset) - (_ansi default_dimmed)http://localhost:8080(_ansi reset)\n" +
|
||
$" • GET /health - Health check\n" +
|
||
$" • GET /tasks - List all tasks\n" +
|
||
$" • POST /workflows/servers/create - Server workflow\n" +
|
||
$" • POST /workflows/batch/submit - Batch workflow\n\n" +
|
||
|
||
$"(_ansi default_dimmed)💡 Control Center provides a (_ansi cyan_bold)web-based UI(_ansi reset)(_ansi default_dimmed) for managing policies!\n" +
|
||
$" Access at: (_ansi cyan)http://localhost:8080(_ansi reset) (_ansi default_dimmed)after starting the server\n" +
|
||
$" Example: provisioning control-center server --port 8080(_ansi reset)\n"
|
||
)
|
||
}
|
||
|
||
# Concepts help - Understanding the system
|
||
def help-concepts []: nothing -> string {
|
||
(
|
||
$"(_ansi yellow_bold)╔══════════════════════════════════════════════════╗(_ansi reset)\n" +
|
||
$"(_ansi yellow_bold)║(_ansi reset) 💡 ARCHITECTURE & KEY CONCEPTS (_ansi yellow_bold)║(_ansi reset)\n" +
|
||
$"(_ansi yellow_bold)╚══════════════════════════════════════════════════╝(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)1. LAYER SYSTEM(_ansi reset) (_ansi cyan)Configuration Inheritance(_ansi reset)\n\n" +
|
||
$" The system uses a (_ansi cyan)3-layer architecture(_ansi reset) for configuration:\n\n" +
|
||
$" (_ansi blue)Core Layer (100)(_ansi reset)\n" +
|
||
$" └─ Base system extensions (_ansi default_dimmed)provisioning/extensions/(_ansi reset)\n" +
|
||
$" • Standard provider implementations\n" +
|
||
$" • Default taskserv configurations\n" +
|
||
$" • Built-in cluster templates\n\n" +
|
||
|
||
$" (_ansi blue)Workspace Layer (200)(_ansi reset)\n" +
|
||
$" └─ Shared templates (_ansi default_dimmed)provisioning/workspace/templates/(_ansi reset)\n" +
|
||
$" • Reusable infrastructure patterns\n" +
|
||
$" • Organization-wide standards\n" +
|
||
$" • Team conventions\n\n" +
|
||
|
||
$" (_ansi blue)Infrastructure Layer (300)(_ansi reset)\n" +
|
||
$" └─ Specific overrides (_ansi default_dimmed)workspace/infra/\{name\}/(_ansi reset)\n" +
|
||
$" • Project-specific configurations\n" +
|
||
$" • Environment customizations\n" +
|
||
$" • Local overrides\n\n" +
|
||
|
||
$" (_ansi green)Resolution Order:(_ansi reset) Infrastructure (300) → Workspace (200) → Core (100)\n" +
|
||
$" (_ansi default_dimmed)Higher numbers override lower numbers(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)2. MODULE SYSTEM(_ansi reset) (_ansi cyan)Reusable Components(_ansi reset)\n\n" +
|
||
$" (_ansi blue)Taskservs(_ansi reset) - Infrastructure services\n" +
|
||
$" • kubernetes, containerd, cilium, redis, postgres\n" +
|
||
$" • Installed on servers, configured per environment\n\n" +
|
||
|
||
$" (_ansi blue)Providers(_ansi reset) - Cloud platforms\n" +
|
||
$" • upcloud, aws, local with docker or podman\n" +
|
||
$" • Provider-agnostic middleware supports multi-cloud\n\n" +
|
||
|
||
$" (_ansi blue)Clusters(_ansi reset) - Complete configurations\n" +
|
||
$" • buildkit, ci-cd, monitoring\n" +
|
||
$" • Orchestrated deployments with dependencies\n\n" +
|
||
|
||
$"(_ansi green_bold)3. WORKFLOW TYPES(_ansi reset)\n\n" +
|
||
$" (_ansi blue)Single Workflows(_ansi reset)\n" +
|
||
$" • Individual server/taskserv/cluster operations\n" +
|
||
$" • Real-time monitoring, state management\n\n" +
|
||
|
||
$" (_ansi blue)Batch Workflows(_ansi reset)\n" +
|
||
$" • Multi-provider operations: UpCloud, AWS, and local\n" +
|
||
$" • Dependency resolution, rollback support\n" +
|
||
$" • Defined in KCL workflow files\n\n" +
|
||
|
||
$"(_ansi green_bold)4. TYPICAL WORKFLOW(_ansi reset)\n\n" +
|
||
$" 1. (_ansi cyan)Create workspace(_ansi reset): workspace init my-project\n" +
|
||
$" 2. (_ansi cyan)Discover modules(_ansi reset): module discover taskservs\n" +
|
||
$" 3. (_ansi cyan)Load modules(_ansi reset): module load taskservs my-project kubernetes\n" +
|
||
$" 4. (_ansi cyan)Create servers(_ansi reset): server create --infra my-project\n" +
|
||
$" 5. (_ansi cyan)Deploy taskservs(_ansi reset): taskserv create kubernetes\n" +
|
||
$" 6. (_ansi cyan)Check layers(_ansi reset): layer show my-project\n\n" +
|
||
|
||
$"(_ansi default_dimmed)💡 For more details:\n" +
|
||
$" • provisioning layer explain - Layer system deep dive\n" +
|
||
$" • provisioning help development - Module system commands(_ansi reset)\n"
|
||
)
|
||
}
|
||
|
||
# Guides category help
|
||
def help-guides []: nothing -> string {
|
||
(
|
||
$"(_ansi magenta_bold)╔══════════════════════════════════════════════════╗(_ansi reset)\n" +
|
||
$"(_ansi magenta_bold)║(_ansi reset) 📚 GUIDES & CHEATSHEETS (_ansi magenta_bold)║(_ansi reset)\n" +
|
||
$"(_ansi magenta_bold)╚══════════════════════════════════════════════════╝(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)[Quick Reference](_ansi reset) Copy-Paste Ready Commands\n" +
|
||
$" (_ansi blue)sc(_ansi reset) - Quick command reference (_ansi yellow)fastest(_ansi reset)\n" +
|
||
$" (_ansi blue)guide quickstart(_ansi reset) - Full command cheatsheet with examples\n\n" +
|
||
|
||
$"(_ansi green_bold)[Step-by-Step Guides](_ansi reset) Complete Walkthroughs\n" +
|
||
$" (_ansi blue)guide from-scratch(_ansi reset) - Complete deployment from zero to production\n" +
|
||
$" (_ansi blue)guide update(_ansi reset) - Update existing infrastructure safely\n" +
|
||
$" (_ansi blue)guide customize(_ansi reset) - Customize with layers and templates\n\n" +
|
||
|
||
$"(_ansi green_bold)[Guide Topics](_ansi reset)\n" +
|
||
$" (_ansi cyan)Quickstart Cheatsheet:(_ansi reset)\n" +
|
||
$" • All command shortcuts reference\n" +
|
||
$" • Copy-paste ready commands\n" +
|
||
$" • Common workflow examples\n\n" +
|
||
|
||
$" (_ansi cyan)From Scratch Guide:(_ansi reset)\n" +
|
||
$" • Prerequisites and setup\n" +
|
||
$" • Initialize workspace\n" +
|
||
$" • Deploy complete infrastructure\n" +
|
||
$" • Verify deployment\n\n" +
|
||
|
||
$" (_ansi cyan)Update Guide:(_ansi reset)\n" +
|
||
$" • Check for updates\n" +
|
||
$" • Update strategies\n" +
|
||
$" • Rolling updates\n" +
|
||
$" • Rollback procedures\n\n" +
|
||
|
||
$" (_ansi cyan)Customize Guide:(_ansi reset)\n" +
|
||
$" • Layer system explained\n" +
|
||
$" • Using templates\n" +
|
||
$" • Creating custom modules\n" +
|
||
$" • Advanced customization patterns\n\n" +
|
||
|
||
$"(_ansi green_bold)📖 USAGE EXAMPLES(_ansi reset)\n\n" +
|
||
$" # Show quick reference\n" +
|
||
$" provisioning sc (_ansi default_dimmed)# fastest(_ansi reset)\n\n" +
|
||
|
||
$" # Show full cheatsheet\n" +
|
||
$" provisioning guide quickstart\n\n" +
|
||
|
||
$" # Complete deployment guide\n" +
|
||
$" provisioning guide from-scratch\n\n" +
|
||
|
||
$" # Update infrastructure guide\n" +
|
||
$" provisioning guide update\n\n" +
|
||
|
||
$" # Customization guide\n" +
|
||
$" provisioning guide customize\n\n" +
|
||
|
||
$" # List all guides\n" +
|
||
$" provisioning guide list\n" +
|
||
$" provisioning howto (_ansi default_dimmed)# shortcut(_ansi reset)\n\n" +
|
||
|
||
$"(_ansi green_bold)🎯 QUICK ACCESS(_ansi reset)\n\n" +
|
||
$" (_ansi cyan)Shortcuts:(_ansi reset)\n" +
|
||
$" • (_ansi blue_bold)sc(_ansi reset) → Quick reference (_ansi default_dimmed)fastest, no pager(_ansi reset)\n" +
|
||
$" • (_ansi blue)quickstart(_ansi reset) → shortcuts, quick\n" +
|
||
$" • (_ansi blue)from-scratch(_ansi reset) → scratch, start, deploy\n" +
|
||
$" • (_ansi blue)update(_ansi reset) → upgrade\n" +
|
||
$" • (_ansi blue)customize(_ansi reset) → custom, layers, templates\n\n" +
|
||
|
||
$"(_ansi default_dimmed)💡 All guides provide (_ansi cyan_bold)copy-paste ready commands(_ansi reset)(_ansi default_dimmed) that you can\n" +
|
||
$" adjust and use immediately. Perfect for quick start!\n" +
|
||
$" Example: provisioning guide quickstart | less(_ansi reset)\n"
|
||
)
|
||
}
|