29 lines
2 KiB
Text
29 lines
2 KiB
Text
|
|
#!/usr/bin/env bash
|
||
|
|
# Minimalist TTY Command Registry (Nu-based)
|
||
|
|
# Format: "COMMAND_PATTERN" "DISPATCHER_CALL" "FLOW_TYPE"
|
||
|
|
# All commands routed through tty-dispatch.sh → Nu functions
|
||
|
|
# Flow types: "exit" (standalone), "pipe" (inter-command), "continue" (to Nushell)
|
||
|
|
|
||
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||
|
|
# Authentication & Setup Commands
|
||
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||
|
|
|
||
|
|
# Standalone wizards (flow=exit)
|
||
|
|
"setup wizard" "core/cli/tty-dispatch.sh setup-wizard exit" "exit"
|
||
|
|
"auth login" "core/cli/tty-dispatch.sh login exit" "exit"
|
||
|
|
"auth mfa enroll" "core/cli/tty-dispatch.sh mfa-enroll exit" "exit"
|
||
|
|
|
||
|
|
# Pipeline commands (flow=pipe) - output to stdout
|
||
|
|
"auth get-key" "core/cli/tty-dispatch.sh get-key pipe" "pipe"
|
||
|
|
|
||
|
|
# Continue to Nushell (flow=continue) - output captured in $TTY_OUTPUT
|
||
|
|
"auth integrate" "core/cli/tty-dispatch.sh credential-input continue" "continue"
|
||
|
|
"secret configure" "core/cli/tty-dispatch.sh secret-configure continue" "continue"
|
||
|
|
|
||
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|
||
|
|
# Future-proofing: Add new commands without modifying tty-filter.sh
|
||
|
|
# Example:
|
||
|
|
# "wizard something" "core/cli/tty-dispatch.sh something exit" "exit"
|
||
|
|
# "get something" "core/cli/tty-dispatch.sh something pipe" "pipe"
|
||
|
|
# ═══════════════════════════════════════════════════════════════════════════════
|