Skip to main content
Glama
discover.ts2.33 kB
#!/usr/bin/env node /** * CLI tool for discovering Attio attributes and generating mapping files */ import yargs from 'yargs'; import { hideBin } from 'yargs/helpers'; import { discoverAttributes } from './commands/attributes.js'; import * as dotenv from 'dotenv'; // Load environment variables from .env file dotenv.config({ debug: false }); /** * Main CLI entrypoint */ yargs(hideBin(process.argv)) .scriptName('attio-discover') .usage('$0 <cmd> [args]') .command( 'attributes', 'Discover Attio attribute mappings', (yargs) => { return yargs .option('object', { alias: 'o', description: 'Object type to discover attributes for (e.g., companies, people)', type: 'string', }) .option('all', { alias: 'a', description: 'Discover attributes for all objects', type: 'boolean', default: false, }) .option('output', { alias: 'f', description: 'Output file path', default: 'config/mappings/user.json', type: 'string', }) .option('reset', { alias: 'r', description: 'Reset existing mappings instead of merging', type: 'boolean', default: false, }) .option('api-key', { alias: 'k', description: 'Attio API key (defaults to ATTIO_API_KEY env var)', type: 'string', }) .conflicts('object', 'all') .check((argv) => { if (!argv.object && !argv.all) { throw new Error('You must specify either --object or --all'); } return true; }); }, discoverAttributes ) /* // These commands will be implemented in future phases .command('objects', 'Discover object mappings', (yargs) => { // ... object discovery options }, discoverObjects) .command('lists', 'Discover list mappings', (yargs) => { // ... list discovery options }, discoverLists) .command('all', 'Discover all mappings', (yargs) => { // ... options for discovering everything }, discoverAll) */ .demandCommand(1, 'You must specify a discovery command') .help() .alias('help', 'h') .epilog('For more information, visit https://github.com/hmk/attio-mcp-server') .parse();

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/kesslerio/attio-mcp-server'

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