Skip to content
Open
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
512 changes: 512 additions & 0 deletions ARCHITECTURE_AUDIT.md

Large diffs are not rendered by default.

1,126 changes: 1,126 additions & 0 deletions IMPLEMENTATION_SPEC.md

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
import { program } from 'commander';
import {
checkAction,
configBackupAction,
configGetAction,
configListAction,
configMigrateAction,
configRestoreAction,
configSetAction,
configValidateAction,
copyAction,
delAction,
editAction,
Expand Down Expand Up @@ -242,6 +249,69 @@ program
}
);

// Config command with subcommands
const configCommand = program
.command('config')
.description('Manage EnvGuard configuration');

configCommand
.command('get <key>')
.description('Get a config value (supports dot notation)')
.option('-v, --verbose', 'Enable verbose logging', false)
.action(async (key: string, options) => {
await configGetAction(key, options);
});

configCommand
.command('set <key> <value>')
.description('Set a config value (supports dot notation)')
.option('-v, --verbose', 'Enable verbose logging', false)
.action(async (key: string, value: string, options) => {
await configSetAction(key, value, options);
});

configCommand
.command('list')
.description('List all config values')
.option('-v, --verbose', 'Enable verbose logging', false)
.action(async (options) => {
await configListAction(options);
});

configCommand
.command('validate')
.description('Validate current config')
.option('-v, --verbose', 'Enable verbose logging', false)
.action(async (options) => {
await configValidateAction(options);
});

configCommand
.command('backup')
.description('Backup current config')
.option('-o, --output <path>', 'Output path for backup file')
.option('-v, --verbose', 'Enable verbose logging', false)
.action(async (options) => {
await configBackupAction(options);
});

configCommand
.command('restore <file>')
.description('Restore config from backup')
.option('-v, --verbose', 'Enable verbose logging', false)
.action(async (file: string, options) => {
await configRestoreAction(file, options);
});

configCommand
.command('migrate')
.description('Migrate config from v1 to v2')
.option('--no-backup', 'Skip creating backup before migration')
.option('-v, --verbose', 'Enable verbose logging', false)
.action(async (options) => {
await configMigrateAction(options);
});

program
.command('status')
.description('Show current EnvGuard status and configuration')
Expand Down
Loading
Loading