UNPKG

snigop

Version:

Snigop - A sniffer gopher CLI tool

41 lines 1.27 kB
#!/usr/bin/env node "use strict"; const core_1 = require("@oclif/core"); const mcpServer_1 = require("./mcpServer"); class Snigop extends core_1.Command { constructor() { super(...arguments); this.run = async () => { const { args } = await this.parse(Snigop); const mcpServer = new mcpServer_1.MCPServer(); try { // Start Playwright MCP server await mcpServer.start(); // Connect to MCP server and list tools await mcpServer.connectAndListTools(); // Print the URL at the end console.log(`Testing URL: ${args.url}`); } catch (error) { this.error(`Error: ${error}`); } finally { // Shutdown MCP server mcpServer.shutdown(); } }; } } Snigop.description = 'Snigop - A sniffer gopher CLI tool'; Snigop.args = { url: core_1.Args.string({ description: 'URL of the website to test', required: true, }), }; // Run the command if this is the main module if (require.main === module) { Snigop.run().catch(console.error); } module.exports = Snigop; //# sourceMappingURL=index.js.map