Files
mcp-code/commands/index.ts
pablof7z 10fbca0824 feat: Add zap command for sending Bitcoin Lightning tips
- Implemented the `zap` command in the CLI to allow users to send sats to a user, event, or snippet using a NIP-60 wallet.
- Created a new `zap.ts` file to handle the command logic and integrated it into the MCP server.
- Added wallet balance command to check the balance of a user's wallet.
- Enhanced the MCP server to register the new zap command and wallet balance command.
- Introduced caching for wallets to optimize performance and reduce redundant network requests.
- Updated database schema to include snippets table for storing code snippets.
- Improved logging functionality for better debugging and tracking of operations.
- Added functionality to save snippets to the database upon retrieval.
- Updated project overview documentation to reflect new features and structure.
- Refactored existing commands and logic for better modularity and maintainability.
2025-04-08 18:10:16 +01:00

34 lines
1002 B
TypeScript

import { Command } from 'commander';
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';
import { registerZapCommand } from './zap.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);
registerFindSnippetsCommand(program);
registerWotCommand(program);
registerListUsernamesCommand(program);
registerSetupCommand(program);
registerZapCommand(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();
}
}