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:
@@ -94,7 +94,7 @@ export async function startBastion(overrides: Partial<BastionConfig> = {}): Prom
|
||||
// PID file management: kill old instance if running
|
||||
// Bastion needs root for dnsmasq (DHCP port 67)
|
||||
if (!config.skipDnsmasq && process.getuid?.() !== 0) {
|
||||
logger.error("Must run as root (dnsmasq needs DHCP/TFTP ports). Use: sudo lab init bastion standalone start");
|
||||
logger.error("Must run as root (dnsmasq needs DHCP/TFTP ports). Use: sudo labctl init bastion standalone start");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@@ -262,8 +262,8 @@ function printBanner(config: BastionConfig): void {
|
||||
console.log(" \x1b[33mIt will be inventoried and rebooted automatically.\x1b[0m");
|
||||
console.log("");
|
||||
console.log(" Commands (from another terminal):");
|
||||
console.log(" \x1b[1mlab list\x1b[0m -- show machines");
|
||||
console.log(" \x1b[1mlab install <mac> <hostname>\x1b[0m -- queue install");
|
||||
console.log(" \x1b[1mlabctl provision list\x1b[0m -- show machines");
|
||||
console.log(" \x1b[1mlabctl provision install <mac> <hostname>\x1b[0m -- queue install");
|
||||
console.log("");
|
||||
console.log(" Press \x1b[1mCtrl-C\x1b[0m to stop.");
|
||||
console.log("");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"lab": "./dist/index.js"
|
||||
"labctl": "./dist/index.js"
|
||||
},
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
||||
@@ -57,7 +57,7 @@ export function registerStartCommand(parent: Command): void {
|
||||
// Add --foreground flag
|
||||
args.push("--foreground");
|
||||
|
||||
const child: ChildProcess = spawn(process.argv[0] ?? "lab", args, {
|
||||
const child: ChildProcess = spawn(process.argv[0] ?? "labctl", args, {
|
||||
detached: true,
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@ export function createProgram(): Command {
|
||||
const program = new Command();
|
||||
|
||||
program
|
||||
.name("lab")
|
||||
.name("labctl")
|
||||
.description("Lab PXE Bastion -- discover-first bare-metal provisioning")
|
||||
.version(APP_VERSION);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Application-wide constants.
|
||||
|
||||
export const APP_NAME = "lab";
|
||||
export const APP_NAME = "labctl";
|
||||
export const APP_VERSION = "0.1.0";
|
||||
|
||||
Reference in New Issue
Block a user