sesterce-cli
Version:
A powerful command-line interface tool for managing Sesterce Cloud services. Sesterce CLI provides easy access to GPU cloud instances, AI inference services, container registries, and SSH key management directly from your terminal.
30 lines • 1.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSSHKeyCreateCommand = createSSHKeyCreateCommand;
const create_ssh_key_1 = require("@/modules/ssh-keys/use-cases/create-ssh-key");
const prompts_1 = require("@inquirer/prompts");
function createSSHKeyCreateCommand(sshKeyCommand) {
sshKeyCommand
.command("create")
.description("Create a new SSH key")
.action(async () => {
const name = await (0, prompts_1.input)({
message: "Name of the SSH key",
default: "my-ssh-key",
});
const publicKey = await (0, prompts_1.input)({
message: "Public key (paste it here)",
});
console.log("Creating SSH key...");
const result = await create_ssh_key_1.createSSHKey.execute({
name,
publicKey,
});
if (result.isLeft()) {
console.error(result.value.message);
return;
}
console.log("SSH key created successfully! SSH key ID: ", result.value._id);
});
}
//# sourceMappingURL=create.js.map