refactor: rename CLI binary from lab to labctl
Updated everywhere: constants, package.json bin, completions, nfpm packaging, build scripts, CI, banner text. Binary is now /usr/bin/labctl. Internal package names (@lab/*) unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,91 +0,0 @@
|
||||
# lab fish completions -- auto-generated by scripts/generate-completions.ts
|
||||
# DO NOT EDIT MANUALLY -- run: pnpm completions:generate
|
||||
|
||||
complete -c lab -e
|
||||
complete -c lab -f
|
||||
|
||||
# Global options
|
||||
complete -c lab -s v -l version -d 'Show version'
|
||||
complete -c lab -s h -l help -d 'Show help'
|
||||
|
||||
# Helper: test if a subcommand chain is active
|
||||
function __lab_using_cmd
|
||||
set -l tokens (commandline -opc)
|
||||
set -l expected $argv
|
||||
set -l depth (count $expected)
|
||||
set -l found 0
|
||||
set -l i 1
|
||||
for tok in $tokens[2..]
|
||||
if string match -q -- "-*" $tok
|
||||
continue
|
||||
end
|
||||
set i (math $i + 1)
|
||||
set -l idx (math $i - 1)
|
||||
if test $idx -le $depth
|
||||
if test "$tok" != "$expected[$idx]"
|
||||
return 1
|
||||
end
|
||||
set found (math $found + 1)
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end
|
||||
test $found -eq $depth
|
||||
end
|
||||
|
||||
# Top-level commands
|
||||
complete -c lab -n "not __fish_seen_subcommand_from init provision" -a init -d 'Initialise infrastructure components'
|
||||
complete -c lab -n "not __fish_seen_subcommand_from init provision" -a provision -d 'Machine provisioning operations'
|
||||
|
||||
# init subcommands
|
||||
complete -c lab -n "__lab_using_cmd init" -a bastion -d 'Bastion PXE server management'
|
||||
|
||||
# init bastion subcommands
|
||||
complete -c lab -n "__lab_using_cmd init bastion" -a standalone -d 'Standalone bastion server lifecycle'
|
||||
|
||||
# init bastion standalone subcommands
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone" -a start -d 'Start the bastion server (HTTP + dnsmasq PXE)'
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone" -a stop -d 'Stop a running bastion server'
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone" -a status -d 'Show bastion server status'
|
||||
|
||||
# init bastion standalone start options
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l port -d 'HTTP port' -x
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l dir -d 'Bastion data directory' -x
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l domain -d 'Internal domain for hostnames' -x
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l dhcp-mode -d 'DHCP mode: proxy or full' -x
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l fedora -d 'Fedora version' -x
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l arch -d 'Architecture' -x
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l timezone -d 'Timezone' -x
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l locale -d 'Locale' -x
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l skip-dnsmasq -d 'Skip starting dnsmasq (for testing)'
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone start" -l skip-artifacts -d 'Skip downloading boot artifacts (for testing)'
|
||||
|
||||
# init bastion standalone stop options
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone stop" -l dir -d 'Bastion data directory' -x
|
||||
|
||||
# init bastion standalone status options
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone status" -l dir -d 'Bastion data directory' -x
|
||||
complete -c lab -n "__lab_using_cmd init bastion standalone status" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
# provision subcommands
|
||||
complete -c lab -n "__lab_using_cmd provision" -a list -d 'List all known machines'
|
||||
complete -c lab -n "__lab_using_cmd provision" -a install -d 'Queue a discovered machine for Fedora installation'
|
||||
complete -c lab -n "__lab_using_cmd provision" -a reprovision -d 'Queue install + SSH reboot into PXE for reprovision'
|
||||
complete -c lab -n "__lab_using_cmd provision" -a forget -d 'Remove a machine from bastion state'
|
||||
|
||||
# provision list options
|
||||
complete -c lab -n "__lab_using_cmd provision list" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
# provision install options
|
||||
complete -c lab -n "__lab_using_cmd provision install" -l role -d 'Machine role: worker or infra' -x
|
||||
complete -c lab -n "__lab_using_cmd provision install" -l disk -d 'Target disk device (auto-detect if omitted)' -x
|
||||
complete -c lab -n "__lab_using_cmd provision install" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
# provision reprovision options
|
||||
complete -c lab -n "__lab_using_cmd provision reprovision" -l role -d 'Machine role: worker or infra' -x
|
||||
complete -c lab -n "__lab_using_cmd provision reprovision" -l disk -d 'Target disk device (auto-detect if omitted)' -x
|
||||
complete -c lab -n "__lab_using_cmd provision reprovision" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
# provision forget options
|
||||
complete -c lab -n "__lab_using_cmd provision forget" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# lab bash completions -- auto-generated by scripts/generate-completions.ts
|
||||
# labctl bash completions -- auto-generated by scripts/generate-completions.ts
|
||||
# DO NOT EDIT MANUALLY -- run: pnpm completions:generate
|
||||
|
||||
_lab() {
|
||||
_labctl() {
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
@@ -64,4 +64,4 @@ _lab() {
|
||||
esac
|
||||
}
|
||||
|
||||
complete -F _lab lab
|
||||
complete -F _labctl labctl
|
||||
91
bastion/completions/labctl.fish
Normal file
91
bastion/completions/labctl.fish
Normal file
@@ -0,0 +1,91 @@
|
||||
# labctl fish completions -- auto-generated by scripts/generate-completions.ts
|
||||
# DO NOT EDIT MANUALLY -- run: pnpm completions:generate
|
||||
|
||||
complete -c labctl -e
|
||||
complete -c labctl -f
|
||||
|
||||
# Global options
|
||||
complete -c labctl -s v -l version -d 'Show version'
|
||||
complete -c labctl -s h -l help -d 'Show help'
|
||||
|
||||
# Helper: test if a subcommand chain is active
|
||||
function __labctl_using_cmd
|
||||
set -l tokens (commandline -opc)
|
||||
set -l expected $argv
|
||||
set -l depth (count $expected)
|
||||
set -l found 0
|
||||
set -l i 1
|
||||
for tok in $tokens[2..]
|
||||
if string match -q -- "-*" $tok
|
||||
continue
|
||||
end
|
||||
set i (math $i + 1)
|
||||
set -l idx (math $i - 1)
|
||||
if test $idx -le $depth
|
||||
if test "$tok" != "$expected[$idx]"
|
||||
return 1
|
||||
end
|
||||
set found (math $found + 1)
|
||||
else
|
||||
return 1
|
||||
end
|
||||
end
|
||||
test $found -eq $depth
|
||||
end
|
||||
|
||||
# Top-level commands
|
||||
complete -c labctl -n "not __fish_seen_subcommand_from init provision" -a init -d 'Initialise infrastructure components'
|
||||
complete -c labctl -n "not __fish_seen_subcommand_from init provision" -a provision -d 'Machine provisioning operations'
|
||||
|
||||
# init subcommands
|
||||
complete -c labctl -n "__labctl_using_cmd init" -a bastion -d 'Bastion PXE server management'
|
||||
|
||||
# init bastion subcommands
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion" -a standalone -d 'Standalone bastion server lifecycle'
|
||||
|
||||
# init bastion standalone subcommands
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone" -a start -d 'Start the bastion server (HTTP + dnsmasq PXE)'
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone" -a stop -d 'Stop a running bastion server'
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone" -a status -d 'Show bastion server status'
|
||||
|
||||
# init bastion standalone start options
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l port -d 'HTTP port' -x
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l dir -d 'Bastion data directory' -x
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l domain -d 'Internal domain for hostnames' -x
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l dhcp-mode -d 'DHCP mode: proxy or full' -x
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l fedora -d 'Fedora version' -x
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l arch -d 'Architecture' -x
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l timezone -d 'Timezone' -x
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l locale -d 'Locale' -x
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l skip-dnsmasq -d 'Skip starting dnsmasq (for testing)'
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone start" -l skip-artifacts -d 'Skip downloading boot artifacts (for testing)'
|
||||
|
||||
# init bastion standalone stop options
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone stop" -l dir -d 'Bastion data directory' -x
|
||||
|
||||
# init bastion standalone status options
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone status" -l dir -d 'Bastion data directory' -x
|
||||
complete -c labctl -n "__labctl_using_cmd init bastion standalone status" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
# provision subcommands
|
||||
complete -c labctl -n "__labctl_using_cmd provision" -a list -d 'List all known machines'
|
||||
complete -c labctl -n "__labctl_using_cmd provision" -a install -d 'Queue a discovered machine for Fedora installation'
|
||||
complete -c labctl -n "__labctl_using_cmd provision" -a reprovision -d 'Queue install + SSH reboot into PXE for reprovision'
|
||||
complete -c labctl -n "__labctl_using_cmd provision" -a forget -d 'Remove a machine from bastion state'
|
||||
|
||||
# provision list options
|
||||
complete -c labctl -n "__labctl_using_cmd provision list" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
# provision install options
|
||||
complete -c labctl -n "__labctl_using_cmd provision install" -l role -d 'Machine role: worker or infra' -x
|
||||
complete -c labctl -n "__labctl_using_cmd provision install" -l disk -d 'Target disk device (auto-detect if omitted)' -x
|
||||
complete -c labctl -n "__labctl_using_cmd provision install" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
# provision reprovision options
|
||||
complete -c labctl -n "__labctl_using_cmd provision reprovision" -l role -d 'Machine role: worker or infra' -x
|
||||
complete -c labctl -n "__labctl_using_cmd provision reprovision" -l disk -d 'Target disk device (auto-detect if omitted)' -x
|
||||
complete -c labctl -n "__labctl_using_cmd provision reprovision" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
# provision forget options
|
||||
complete -c labctl -n "__labctl_using_cmd provision forget" -l port -d 'Bastion HTTP port' -x
|
||||
|
||||
Reference in New Issue
Block a user