diff --git a/src/lib/deploy-cli-command.ts b/src/lib/deploy-cli-command.ts new file mode 100644 index 00000000000..0763fa8ee7e --- /dev/null +++ b/src/lib/deploy-cli-command.ts @@ -0,0 +1,37 @@ +// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-License-Identifier: Apache-2.0 + +/* v8 ignore start -- thin oclif adapter covered through CLI integration tests. */ + +import { Args, Command, Flags } from "@oclif/core"; + +type RuntimeBridge = { + deploy: (instanceName?: string) => Promise; +}; + +function getRuntimeBridge(): RuntimeBridge { + return require("../nemoclaw") as RuntimeBridge; +} + +export default class DeployCliCommand extends Command { + static id = "deploy"; + static strict = true; + static summary = "Deprecated Brev-specific bootstrap path"; + static description = "Deprecated compatibility command for Brev-specific deployment."; + static usage = ["deploy [instance-name]"]; + static args = { + instanceName: Args.string({ + name: "instance-name", + description: "Brev instance name", + required: false, + }), + }; + static flags = { + help: Flags.help({ char: "h" }), + }; + + public async run(): Promise { + const { args } = await this.parse(DeployCliCommand); + await getRuntimeBridge().deploy(args.instanceName); + } +} diff --git a/src/lib/oclif-commands.ts b/src/lib/oclif-commands.ts index fb08cc9eb6a..8f41e580370 100644 --- a/src/lib/oclif-commands.ts +++ b/src/lib/oclif-commands.ts @@ -14,6 +14,7 @@ import { } from "./credentials-cli-command"; import ConnectCliCommand from "./connect-cli-command"; import DebugCliCommand from "./debug-cli-command"; +import DeployCliCommand from "./deploy-cli-command"; import DestroyCliCommand from "./destroy-cli-command"; import GatewayTokenCliCommand from "./gateway-token-cli-command"; import ListCommand from "./list-command"; @@ -58,6 +59,7 @@ export default { "credentials:list": CredentialsListCommand, "credentials:reset": CredentialsResetCommand, debug: DebugCliCommand, + deploy: DeployCliCommand, list: ListCommand, "sandbox:channels:add": ChannelsAddCommand, "sandbox:channels:list": SandboxChannelsListCommand, diff --git a/src/nemoclaw.ts b/src/nemoclaw.ts index 4d4a3fa2955..fc699b8ac51 100644 --- a/src/nemoclaw.ts +++ b/src/nemoclaw.ts @@ -646,6 +646,7 @@ async function recoverRegistryEntries({ exports.captureOpenshell = captureOpenshell; exports.backupAll = backupAll; +exports.deploy = deploy; exports.garbageCollectImages = garbageCollectImages; exports.recoverNamedGatewayRuntime = recoverNamedGatewayRuntime; exports.recoverRegistryEntries = recoverRegistryEntries; @@ -4786,7 +4787,7 @@ const mainPromise = (async () => { await setupSpark(args); break; case "deploy": - await deploy(args[0]); + await runOclif("deploy", args); break; case "start": await start(args); diff --git a/test/cli.test.ts b/test/cli.test.ts index c8fb6458ce4..0d5a2f90cd3 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -851,6 +851,13 @@ describe("CLI dispatch", () => { expect(r.out.includes("No resumable onboarding session was found")).toBeTruthy(); }); + it("deploy --help exits 0 and shows deprecated usage", () => { + const r = run("deploy --help"); + expect(r.code).toBe(0); + expect(r.out).toContain("deploy [instance-name]"); + expect(r.out).toContain("Deprecated Brev-specific bootstrap path"); + }); + it("debug --help exits 0 and shows usage", () => { const r = run("debug --help"); expect(r.code).toBe(0);