mirror of
https://github.com/aljazceru/mcp-code.git
synced 2025-12-17 12:45:28 +01:00
initial commit
This commit is contained in:
34
commands/index.ts
Normal file
34
commands/index.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { Command } from 'commander';
|
||||
import { registerFindUserCommand } from './find-user.js';
|
||||
import { registerFindSnippetsCommand } from './find-snippets.js';
|
||||
import { registerWotCommand } from './wot.js';
|
||||
import { registerListUsernamesCommand } from './list-usernames.js';
|
||||
import { registerMcpCommand } from './mcp.js';
|
||||
import { registerSetupCommand } from './setup.js';
|
||||
|
||||
// Create a new Commander program
|
||||
const program = new Command();
|
||||
|
||||
// Setup program metadata
|
||||
program
|
||||
.name('mcp-nostr')
|
||||
.description('Model Context Protocol for Nostr')
|
||||
.version('1.0.0');
|
||||
|
||||
// Register all commands
|
||||
registerMcpCommand(program);
|
||||
registerFindUserCommand(program);
|
||||
registerFindSnippetsCommand(program);
|
||||
registerWotCommand(program);
|
||||
registerListUsernamesCommand(program);
|
||||
registerSetupCommand(program);
|
||||
|
||||
// Function to run the CLI
|
||||
export async function runCli(args: string[]) {
|
||||
program.parse(args);
|
||||
|
||||
// If no command was specified, show help by default
|
||||
if (args.length <= 2) {
|
||||
program.help();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user