cloakx
Version:
Cloakx is a secure, lightweight CLI tool to manage your development secrets locally — no cloud, no hassle. Store, retrieve, and manage secrets across projects with encryption and ease. 🔐 Perfect for solo devs, indie hackers, and teams who value speed, si
21 lines (20 loc) • 832 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = signupCommand;
// commands/signup.ts
const auth_1 = require("../utils/auth");
const readline_sync_1 = __importDefault(require("readline-sync"));
async function signupCommand() {
const username = readline_sync_1.default.question('Choose a username: ');
const password = readline_sync_1.default.question('Choose a password: ', { hideEchoBack: true });
const success = (0, auth_1.signup)(username, password);
if (success) {
console.log(`✅ User '${username}' created successfully.`);
}
else {
console.log(`❌ Username '${username}' already exists.`);
}
}