feat: add backup and restore with encrypted secrets
Some checks are pending
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / test (push) Waiting to run
CI / build (push) Blocked by required conditions

BackupService exports servers/profiles/projects to JSON bundle.
RestoreService imports with skip/overwrite/fail conflict strategies.
AES-256-GCM encryption for sensitive env vars via scrypt-derived keys.
REST endpoints and CLI commands for backup/restore operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michal
2026-02-21 05:40:46 +00:00
parent 9a67e51307
commit 6da4ae495c
11 changed files with 1054 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import { createApplyCommand } from './commands/apply.js';
import { createSetupCommand } from './commands/setup.js';
import { createClaudeCommand } from './commands/claude.js';
import { createProjectCommand } from './commands/project.js';
import { createBackupCommand, createRestoreCommand } from './commands/backup.js';
import { ApiClient } from './api-client.js';
import { loadConfig } from './config/index.js';
@@ -98,6 +99,16 @@ export function createProgram(): Command {
log: (...args) => console.log(...args),
}));
program.addCommand(createBackupCommand({
client,
log: (...args) => console.log(...args),
}));
program.addCommand(createRestoreCommand({
client,
log: (...args) => console.log(...args),
}));
return program;
}