Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions src/lib/credentials-cli-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ export class CredentialsCommand extends Command {
static description =
"List or reset provider credentials registered with the OpenShell gateway.";
static usage = ["credentials <list|reset>"];
static examples = [
"<%= config.bin %> credentials list",
"<%= config.bin %> credentials reset nvidia-prod --yes",
];
static flags = {
help: Flags.help({ char: "h" }),
};
Expand All @@ -72,6 +76,7 @@ export class CredentialsListCommand extends Command {
static summary = "List stored credential providers";
static description = "List provider credentials registered with the OpenShell gateway.";
static usage = ["credentials list"];
static examples = ["<%= config.bin %> credentials list"];
static flags = {
help: Flags.help({ char: "h" }),
};
Expand Down Expand Up @@ -120,6 +125,10 @@ export class CredentialsResetCommand extends Command {
static summary = "Remove a provider credential";
static description = "Remove a provider credential so onboard re-prompts for it.";
static usage = ["credentials reset <PROVIDER> [--yes]"];
static examples = [
"<%= config.bin %> credentials reset nvidia-prod",
"<%= config.bin %> credentials reset nvidia-prod --yes",
];
static args = {
provider: Args.string({
name: "PROVIDER",
Expand Down
4 changes: 4 additions & 0 deletions src/lib/gateway-token-cli-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export default class GatewayTokenCliCommand extends Command {
static summary = "Print the OpenClaw gateway auth token to stdout";
static description = "Print the OpenClaw gateway auth token for a running sandbox to stdout.";
static usage = ["<name> gateway-token [--quiet|-q]"];
static examples = [
"<%= config.bin %> alpha gateway-token",
"<%= config.bin %> alpha gateway-token --quiet",
];
static args = {
sandboxName: Args.string({
name: "sandbox",
Expand Down
1 change: 1 addition & 0 deletions src/lib/list-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default class ListCommand extends Command {
static description =
"List all registered sandboxes with their model, provider, and policy presets.";
static usage = ["list [--json]"];
static examples = ["<%= config.bin %> list", "<%= config.bin %> list --json"];
static flags = {
help: Flags.help({ char: "h" }),
};
Expand Down
6 changes: 6 additions & 0 deletions src/lib/maintenance-cli-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class BackupAllCommand extends Command {
static summary = "Back up all sandbox state before upgrade";
static description = "Back up registered, running sandbox state before upgrading.";
static usage = ["backup-all"];
static examples = ["<%= config.bin %> backup-all"];
static flags = {
help: Flags.help({ char: "h" }),
};
Expand All @@ -33,6 +34,10 @@ export class UpgradeSandboxesCommand extends Command {
static summary = "Detect and rebuild stale sandboxes";
static description = "Detect stale sandboxes and optionally rebuild them.";
static usage = ["upgrade-sandboxes [--check] [--auto] [--yes]"];
static examples = [
"<%= config.bin %> upgrade-sandboxes --check",
"<%= config.bin %> upgrade-sandboxes --auto --yes",
];
static flags = {
help: Flags.help({ char: "h" }),
check: Flags.boolean({ description: "Only check whether sandboxes need upgrading" }),
Expand All @@ -56,6 +61,7 @@ export class GarbageCollectImagesCommand extends Command {
static summary = "Remove orphaned sandbox Docker images";
static description = "Remove sandbox Docker images that are not referenced by registered sandboxes.";
static usage = ["gc [--dry-run] [--yes|--force]"];
static examples = ["<%= config.bin %> gc --dry-run", "<%= config.bin %> gc --yes"];
static flags = {
help: Flags.help({ char: "h" }),
"dry-run": Flags.boolean({ description: "Show images that would be removed without deleting" }),
Expand Down
1 change: 1 addition & 0 deletions src/lib/status-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default class StatusCommand extends Command {
static summary = "Show sandbox list and service status";
static description = "Show registered sandboxes, live inference, services, and messaging health.";
static usage = ["status [--json]"];
static examples = ["<%= config.bin %> status", "<%= config.bin %> status --json"];
static flags = {
help: Flags.help({ char: "h" }),
};
Expand Down
4 changes: 4 additions & 0 deletions src/lib/tunnel-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class TunnelStartCommand extends Command {
static summary = "Start the cloudflared public-URL tunnel";
static description = "Start the cloudflared public-URL tunnel for the default sandbox dashboard.";
static usage = ["tunnel start"];
static examples = ["<%= config.bin %> tunnel start"];
static flags = {
help: Flags.help({ char: "h" }),
};
Expand All @@ -38,6 +39,7 @@ export class TunnelStopCommand extends Command {
static summary = "Stop the cloudflared public-URL tunnel";
static description = "Stop the cloudflared public-URL tunnel for the default sandbox dashboard.";
static usage = ["tunnel stop"];
static examples = ["<%= config.bin %> tunnel stop"];
static flags = {
help: Flags.help({ char: "h" }),
};
Expand All @@ -54,6 +56,7 @@ export class DeprecatedStartCommand extends Command {
static summary = "Deprecated alias for 'tunnel start'";
static description = "Deprecated alias for tunnel start.";
static usage = ["start"];
static examples = ["<%= config.bin %> start"];
static flags = {
help: Flags.help({ char: "h" }),
};
Expand All @@ -73,6 +76,7 @@ export class DeprecatedStopCommand extends Command {
static summary = "Deprecated alias for 'tunnel stop'";
static description = "Deprecated alias for tunnel stop.";
static usage = ["stop"];
static examples = ["<%= config.bin %> stop"];
static flags = {
help: Flags.help({ char: "h" }),
};
Expand Down
6 changes: 5 additions & 1 deletion src/lib/uninstall-cli-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { spawnSync } from "node:child_process";

import { Command } from "@oclif/core";
import { Command, Flags } from "@oclif/core";

import { getVersion } from "./version";
import { buildVersionedUninstallUrl, runUninstallCommand } from "./uninstall-command";
Expand All @@ -16,6 +16,10 @@ export default class UninstallCliCommand extends Command {
static summary = "Run uninstall.sh";
static description = "Run the local uninstall.sh script; remote fallback is disabled.";
static usage = ["uninstall [flags]"];
static examples = ["<%= config.bin %> uninstall --yes"];
static flags = {
help: Flags.help({ char: "h" }),
};

public async run(): Promise<void> {
this.parsed = true;
Expand Down
Loading