prvng_core/nulib/commands-registry.ncl
Jesús Pérez 894046ef5a
feat(core): three-layer DAG, unified component arch, commands-registry cache, Nushell 0.112.2 migration
- DAG architecture: `dag show/validate/export` (nulib/main_provisioning/dag.nu),
    config loader (lib_provisioning/config/loader/dag.nu), taskserv dag-executor.
    Backed by schemas/lib/dag/*.ncl; orchestrator emits NATS events via
    WorkspaceComposition::into_workflow. See ADR-020, ADR-021.
  - Unified Component Architecture: components/mod.nu, main_provisioning/
    {components,workflow,extensions,ontoref-queries}.nu. Full workflow engine with
    topological sort and NATS subject emission. Blocks A-H complete (libre-daoshi).
  - Commands-registry: nulib/commands-registry.ncl (Nickel source, 314 lines) +
    JSON cache at ~/.cache/provisioning/commands-registry.json rebuilt on source
    change. cli/provisioning fast-path alias expansion avoids cold Nu startup.
    ADDING_COMMANDS.md documents new-command workflow.
  - Platform service manager: service-manager.nu (+573), startup.nu (+611),
    service-check.nu (+255); autostart/bootstrap/health/target refactored.
  - Nushell 0.112.2 migration: removed all try/catch and bash redirections;
    external commands prefixed with ^; type signatures enforced. Driven by
    scripts/refactor-try-catch{,-simplified}.nu.
  - TTY stack: removed shlib/*-tty.sh; replaced by cli/tty-dispatch.sh,
    tty-filter.sh, tty-commands.conf.
  - New domain modules: images/ (golden image lifecycle), workspace/{state,sync}.nu,
    main_provisioning/{bootstrap,cluster-deploy,fip,state}.nu, commands/{state,
    build,integrations/auth,utilities/alias}.nu, platform.nu expanded (+874).
  - Config loader overhaul: loader/core.nu slimmed (-759), cache/core.nu
    refactored (-454), removed legacy loaders/file_loader.nu (-330).
  - Thirteen new provisioning-<domain>.nu top-level modules for bash dispatcher.
  - Tests: test_workspace_state.nu (+351); updates to test_oci_registry,
    test_services.
  - README + CHANGELOG updated.
2026-04-17 04:27:33 +01:00

314 lines
8.7 KiB
Text

# Command Registry Default Values
let { make_command, .. } = import "schemas/commands_registry/defaults.ncl" in
let cmd_reg_schema = import "schemas/commands_registry/schema.ncl" in
{
commands = [
make_command {
command = "help",
aliases = ["h", "-h", "--help"],
uses_cache = true,
help_category = "infrastructure",
description = "Show help for commands",
},
make_command {
command = "platform",
aliases = ["plat", "p"],
uses_cache = true,
help_category = "platform",
description = "Manage platform services",
},
make_command {
command = "guide",
aliases = ["guides", "howto"],
uses_cache = true,
help_category = "guides",
description = "Show guides and tutorials",
},
make_command {
command = "shortcuts",
aliases = ["sc"],
uses_cache = true,
requires_args = true,
help_category = "guides",
description = "Show command shortcuts",
},
make_command {
command = "quickstart",
aliases = ["quick"],
uses_cache = true,
requires_args = true,
help_category = "guides",
description = "Quick start guide",
},
make_command {
command = "from-scratch",
aliases = ["scratch"],
uses_cache = true,
requires_args = true,
help_category = "guides",
description = "Start from scratch guide",
},
make_command {
command = "customize",
aliases = ["custom"],
uses_cache = true,
requires_args = true,
help_category = "guides",
description = "Customization guide",
},
make_command {
command = "bootstrap",
aliases = ["bstrap"],
help_category = "infrastructure",
description = "L1 Hetzner resource bootstrap (network, firewall, SSH key, Floating IPs)",
},
make_command {
command = "fip",
aliases = ["floating-ip"],
help_category = "infrastructure",
description = "Floating IP management (list, show, assign, unassign, protection)",
},
make_command {
command = "volume",
aliases = ["vol"],
help_category = "infrastructure",
description = "Volume management (list, create, attach, detach, delete)",
},
make_command {
command = "server",
aliases = ["s"],
requires_daemon = true,
requires_services = true,
requires_args = true,
help_category = "infrastructure",
description = "Server management",
},
make_command {
command = "ssh",
requires_args = true,
help_category = "infrastructure",
description = "SSH shortcut: connect to a server by hostname (e.g. prvng ssh sgoyol-1)",
},
make_command {
command = "taskserv",
aliases = ["task", "t"],
requires_args = true,
help_category = "infrastructure",
description = "Task server management",
},
make_command {
command = "component",
aliases = ["c", "comp", "cl"],
requires_args = true,
help_category = "infrastructure",
description = "Component management — list, show, and status for workspace component instances",
},
make_command {
command = "extension",
aliases = ["e", "ext"],
requires_args = true,
help_category = "infrastructure",
description = "Extension catalog — browse extensions/components/ definitions and metadata",
},
make_command {
command = "create",
aliases = ["new"],
requires_args = true,
requires_daemon = true,
requires_services = true,
help_category = "infrastructure",
description = "Create resources (server, taskserv, cluster)",
},
make_command {
command = "delete",
aliases = ["d"],
requires_args = true,
help_category = "infrastructure",
description = "Delete resources (server, taskserv, cluster)",
},
make_command {
command = "workspace",
aliases = ["ws"],
requires_daemon = true,
uses_cache = true,
requires_args = true,
help_category = "workspace",
description = "Workspace management",
},
make_command {
command = "validate",
aliases = ["val"],
uses_cache = true,
requires_args = true,
help_category = "config",
description = "Validate configuration",
},
make_command {
command = "config",
uses_cache = true,
requires_args = true,
help_category = "setup",
description = "Configuration management",
},
make_command {
command = "env",
uses_cache = true,
requires_args = true,
help_category = "config",
description = "Environment configuration",
},
make_command {
command = "alias",
aliases = ["a", "al"],
uses_cache = true,
help_category = "utils",
description = "Show command aliases — alias list (al) displays the full shortcut table",
},
make_command {
command = "show",
uses_cache = true,
requires_args = true,
help_category = "config",
description = "Show configuration",
},
make_command {
command = "setup",
aliases = ["st"],
uses_cache = true,
help_category = "setup",
description = "Initial setup",
},
make_command {
command = "state",
aliases = ["st"],
uses_cache = false,
requires_args = true,
help_category = "state",
description = "Workspace provisioning state management",
},
make_command {
command = "job",
aliases = ["j"],
requires_args = true,
uses_cache = false,
help_category = "orchestration",
description = "Orchestrator job management (list, status, monitor, submit)",
},
make_command {
command = "workflow",
aliases = ["w", "wflow"],
requires_args = true,
uses_cache = false,
help_category = "orchestration",
description = "Workspace workflow management — WorkflowDef lifecycle (list, show, run, validate, status)",
},
make_command {
command = "batch",
aliases = ["b", "bat"],
requires_daemon = true,
uses_cache = true,
requires_args = true,
help_category = "orchestration",
description = "Batch operations",
},
make_command {
command = "orchestrator",
aliases = ["o", "orch"],
requires_daemon = true,
uses_cache = true,
requires_args = true,
help_category = "orchestration",
description = "Orchestrator management",
},
make_command {
command = "module",
aliases = ["mod"],
uses_cache = true,
requires_args = true,
help_category = "development",
description = "Module management",
},
make_command {
command = "layer",
aliases = ["lyr"],
uses_cache = true,
requires_args = true,
help_category = "development",
description = "Layer management",
},
make_command {
command = "discover",
aliases = ["disc"],
uses_cache = true,
requires_args = true,
help_category = "development",
description = "Discover modules",
},
make_command {
command = "status",
uses_cache = true,
requires_args = true,
help_category = "diagnostics",
description = "Show status",
},
make_command {
command = "health",
uses_cache = true,
requires_args = true,
help_category = "diagnostics",
description = "Health check",
},
make_command {
command = "diagnostics",
aliases = ["diag"],
uses_cache = true,
requires_args = true,
help_category = "diagnostics",
description = "Run diagnostics",
},
make_command {
command = "build",
aliases = ["bd"],
requires_daemon = true,
uses_cache = true,
requires_args = true,
help_category = "build",
description = "Build operations",
},
make_command {
command = "auth",
requires_daemon = true,
uses_cache = true,
requires_args = true,
help_category = "authentication",
description = "Authentication management",
},
make_command {
command = "login",
requires_daemon = true,
uses_cache = true,
requires_args = true,
help_category = "authentication",
description = "Login",
},
make_command {
command = "integrations",
aliases = ["int"],
requires_daemon = true,
uses_cache = true,
requires_args = true,
help_category = "integrations",
description = "Integration management",
},
make_command {
command = "vm",
requires_daemon = true,
uses_cache = true,
requires_args = true,
help_category = "vm",
description = "VM management",
},
],
}