@kya-os/cli
Version:
CLI for KYA-OS MCP-I setup and management
71 lines • 2.39 kB
JavaScript
import { Command } from "commander";
import chalk from "chalk";
import { init } from "./commands/init.js";
import { check } from "./commands/check.js";
import { env } from "./commands/env.js";
import { rotate } from "./commands/rotate.js";
import { claim } from "./commands/claim.js";
export const program = new Command();
// ASCII art logo
const logo = chalk.cyan(`
╦╔═╦ ╦╔═╗ ╔═╗╔═╗
╠╩╗╚╦╝╠═╣───║ ║╚═╗
╩ ╩ ╩ ╩ ╩ ╚═╝╚═╝
`);
program
.name("kya-os")
.description("CLI for KYA-OS MCP-I setup and management")
.version("1.1.0")
.addHelpText("before", logo);
// Init command
program
.command("init")
.description("Initialize MCP-I for your AI agent")
.option("-n, --name <name>", "Agent name")
.option("-d, --description <description>", "Agent description")
.option("-r, --repository <repository>", "Repository URL")
.option("--skip-registration", "Skip agent registration with knowthat.ai")
.option("--force", "Force overwrite existing configuration")
.action(init);
// Check command
program
.command("check")
.description("Check if MCP-I is configured for this project")
.option("-v, --verbose", "Show detailed information")
.action(check);
// Env command with subcommands
const envCommand = program
.command("env")
.description("Manage environment variables");
envCommand
.command("show")
.description("Show required environment variables")
.action(() => env("show"));
envCommand
.command("copy")
.description("Copy environment variables to clipboard")
.action(() => env("copy"));
envCommand
.command("verify")
.description("Verify environment variables are set correctly")
.action(() => env("verify"));
// Rotate command
program
.command("rotate")
.description("Rotate your agent's identity keys")
.option("-f, --force", "Force rotation without confirmation")
.option("-r, --reason <reason>", "Reason for rotation")
.action(rotate);
// Claim command
program
.command("claim")
.description("Get your agent's claim URL for the registry")
.action(claim);
// Parse command line arguments
program.parse();
// Show help if no command specified
if (!process.argv.slice(2).length) {
program.outputHelp();
}
//# sourceMappingURL=index.prod.js.map