Initial Commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env node
|
||||
import { Command } from "commander";
|
||||
import { createRootKeysCommand } from "../commands/keys/keys.js";
|
||||
import { promptForNewPassword } from "../prompt/prompt.js";
|
||||
import { runFunction } from "../run-function/run-function.js";
|
||||
|
||||
const program = new Command()
|
||||
.name("create-root-keys")
|
||||
.description(
|
||||
"Create root keychain (encrypted vault + signed public-key file)"
|
||||
)
|
||||
.option("-o, --output <dir>", "Output directory", "./keys")
|
||||
.action((options: { output: string }) =>
|
||||
runFunction("create-root-keys", async (signal) => {
|
||||
const password = await promptForNewPassword(
|
||||
"Enter password for the root vault"
|
||||
);
|
||||
await createRootKeysCommand(password, {
|
||||
output: options.output,
|
||||
...(signal !== undefined ? { signal } : {}),
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
program.parse();
|
||||
Reference in New Issue
Block a user