Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions src/lib/deploy-cli-command.ts
Original file line number Diff line number Diff line change
@@ -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<void>;
};

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<void> {
const { args } = await this.parse(DeployCliCommand);
await getRuntimeBridge().deploy(args.instanceName);
}
}
2 changes: 2 additions & 0 deletions src/lib/oclif-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/nemoclaw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading