UNPKG

@civic/nexus-bridge

Version:

Stdio <-> HTTP/SSE MCP bridge with Civic auth handling

30 lines 950 B
/** * util.ts * * Utility functions for the installer */ /** * Determines the best command to use for running the nexus bridge * * First checks if we're running as the binary (installed via Homebrew or otherwise) * by looking for the NEXUS_BRIDGE_BINARY environment variable set in compiled-cli.ts. * * @returns {Object} Object containing command and args for running the bridge */ export function extractCommandInfo() { // Check if we're running as a binary (environment variable set in compiled-cli.ts) const isCompiledBinary = process.env.NEXUS_BRIDGE_BINARY === 'true'; if (isCompiledBinary) { // We're running as a compiled binary, so use nexus-bridge directly return { command: "nexus-bridge", args: [] }; } // Default to using npx with the package return { command: "npx", args: ["@civic/nexus-bridge"] }; } //# sourceMappingURL=util.js.map