theclawbay 0.3.77 → 0.3.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # theclawbay
2
2
 
3
- CLI for connecting Codex, Hermes Agent, Continue, Cline, OpenClaw, OpenCode, Kilo, Roo Code, Aider, experimental Trae, and experimental Zo to The Claw Bay.
3
+ CLI for connecting Codex, Claude Code, Hermes Agent, Gemini-compatible apps, Continue, Cline, OpenClaw, OpenCode, Kilo, Roo Code, Aider, experimental Trae, and experimental Zo to The Claw Bay.
4
4
 
5
5
  ## Install
6
6
 
@@ -19,6 +19,7 @@ theclawbay setup --api-key <apiKey>
19
19
  In an interactive terminal, setup shows one picker for Codex, Hermes Agent, Continue, Cline, OpenClaw, OpenCode, Kilo, Roo Code, Aider, Windows Trae, and Zo.
20
20
  Each row includes a terminal-friendly icon plus the tool's official site, and you can toggle items with arrow keys plus `Enter` or by pressing `1-9` and `0`.
21
21
  Re-running setup also migrates legacy OpenCode and Kilo patches to the current reasoning-capable provider path and refreshes OpenClaw model metadata.
22
+ Setup also creates a local backup before changing config files, and you can choose the default model with `--model <id>` or print the live backend model list with `--list-models`.
22
23
 
23
24
  ## Optional
24
25
 
@@ -33,3 +34,15 @@ Removes The Claw Bay-managed local config from this machine.
33
34
  `theclawbay usage`
34
35
 
35
36
  Shows your current shared 5-hour and weekly usage windows.
37
+
38
+ `theclawbay backup`
39
+
40
+ Creates a timestamped local backup of the managed config and supported client config paths.
41
+
42
+ `theclawbay backup --list`
43
+
44
+ Shows the saved backups with their date/time and captured target counts.
45
+
46
+ `theclawbay backup --restore <backupId>`
47
+
48
+ Restores a saved backup snapshot.
@@ -0,0 +1,10 @@
1
+ import { BaseCommand } from "../lib/base-command";
2
+ export default class BackupCommand extends BaseCommand {
3
+ static description: string;
4
+ static flags: {
5
+ list: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
6
+ restore: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ reason: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ };
9
+ run(): Promise<void>;
10
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../lib/base-command");
5
+ const backups_1 = require("../lib/backups");
6
+ class BackupCommand extends base_command_1.BaseCommand {
7
+ async run() {
8
+ await this.runSafe(async () => {
9
+ const { flags } = await this.parse(BackupCommand);
10
+ if (flags.list && flags.restore) {
11
+ throw new Error("--list and --restore cannot be used together.");
12
+ }
13
+ if (flags.list) {
14
+ const backups = await (0, backups_1.listBackups)();
15
+ if (backups.length === 0) {
16
+ this.log("No backups found yet.");
17
+ return;
18
+ }
19
+ this.log("Available backups:");
20
+ for (const backup of backups) {
21
+ this.log(`- ${backup.id} ${(0, backups_1.formatBackupTimestamp)(backup.createdAt)} ${backup.capturedTargets}/${backup.totalTargets} targets ${backup.reason}`);
22
+ }
23
+ return;
24
+ }
25
+ if (flags.restore) {
26
+ const restored = await (0, backups_1.restoreBackup)(flags.restore);
27
+ this.log(`Restored backup ${restored.id} from ${(0, backups_1.formatBackupTimestamp)(restored.createdAt)} (${restored.capturedTargets}/${restored.totalTargets} targets).`);
28
+ return;
29
+ }
30
+ const backup = await (0, backups_1.createBackup)(flags.reason?.trim() || "manual backup");
31
+ this.log(`Created backup ${backup.id} at ${(0, backups_1.formatBackupTimestamp)(backup.createdAt)} (${backup.capturedTargets}/${backup.totalTargets} targets).`);
32
+ });
33
+ }
34
+ }
35
+ BackupCommand.description = "Create, list, and restore local The Claw Bay client configuration backups";
36
+ BackupCommand.flags = {
37
+ list: core_1.Flags.boolean({
38
+ required: false,
39
+ default: false,
40
+ description: "List available backups instead of creating a new one",
41
+ }),
42
+ restore: core_1.Flags.string({
43
+ required: false,
44
+ description: "Restore a backup by id",
45
+ }),
46
+ reason: core_1.Flags.string({
47
+ required: false,
48
+ description: "Optional note to record with a newly created backup",
49
+ }),
50
+ };
51
+ exports.default = BackupCommand;
@@ -6,6 +6,11 @@ export default class SetupCommand extends BaseCommand {
6
6
  "api-key": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
7
  "device-name": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
8
  clients: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ model: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ models: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ "claude-models": import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ "list-models": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
+ backup: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
14
  yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
15
  "migrate-conversations": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
16
  "debug-output": import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;