Skip to main content
Glama
add-shebang.js741 B
#!/usr/bin/env node /** * Add shebang to built file */ import { readFileSync, writeFileSync, chmodSync } from 'fs'; import { resolve, dirname } from 'path'; import { fileURLToPath } from 'url'; const __dirname = dirname(fileURLToPath(import.meta.url)); const distFile = resolve(__dirname, '../dist/index.js'); try { const content = readFileSync(distFile, 'utf8'); const shebang = '#!/usr/bin/env node\n'; if (!content.startsWith(shebang)) { writeFileSync(distFile, shebang + content); chmodSync(distFile, 0o755); console.log('✓ Shebang added to dist/index.js'); } else { console.log('✓ Shebang already present'); } } catch (error) { console.error('Error adding shebang:', error); process.exit(1); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jasonsmithj/redash-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server