#!/usr/bin/env node import { program } from 'commander'; import { authCommand } from '../src/commands/auth.js'; import { whoamiCommand } from '../src/commands/whoami.js'; import { sendCommand } from '../src/commands/send.js'; import { sendImageCommand } from '../src/commands/send-image.js'; import { messagesCommand } from '../src/commands/messages.js'; program .name('textnow') .description('CLI for TextNow SMS messaging') .version('1.0.0'); program .command('auth') .description('Authenticate with TextNow using browser cookies') .action(authCommand); program .command('whoami') .description('Show current user info (username and phone number)') .action(whoamiCommand); program .command('send ') .description('Send an SMS message') .action(sendCommand); program .command('send-image ') .description('Send an image message') .option('-c, --caption ', 'Optional caption for the image') .action(sendImageCommand); program .command('messages') .description('List recent messages') .option('-l, --limit ', 'Number of messages to retrieve', '20') .action(messagesCommand); program.parse();