@nuntly/cli 1.0.0-alpha.1 → 1.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -223,7 +223,7 @@ The CLI version tracks the underlying Nuntly SDK version closely.
223
223
 
224
224
  ## Contributing
225
225
 
226
- Issues, bug reports, and feature requests are welcome at [github.com/nuntly/nuntly-cli/issues](https://github.com/nuntly/nuntly-cli/issues). Command surfaces are generated from the Nuntly OpenAPI spec, so direct PRs that modify them will likely be redirected to upstream feedback. Documentation, examples, and developer-experience improvements are the highest-impact contribution areas.
226
+ Issues, bug reports, and feature requests are welcome at [github.com/nuntly/nuntly-cli/issues](https://github.com/nuntly/nuntly-cli/issues).
227
227
 
228
228
  ## License
229
229
 
package/dist/index.js CHANGED
@@ -4,6 +4,9 @@
4
4
  import { Command as Command11 } from "@commander-js/extra-typings";
5
5
  import pc4 from "picocolors";
6
6
 
7
+ // src/version.ts
8
+ var CLI_VERSION = "1.0.0-alpha.3";
9
+
7
10
  // src/commands/emails.ts
8
11
  import { Command } from "@commander-js/extra-typings";
9
12
  import { Nuntly } from "@nuntly/sdk";
@@ -146,9 +149,6 @@ async function confirmDelete(resource, id) {
146
149
  return result;
147
150
  }
148
151
 
149
- // src/version.ts
150
- var CLI_VERSION = "0.0.1";
151
-
152
152
  // src/output.ts
153
153
  import pc2 from "picocolors";
154
154
  function extractItems(data) {
@@ -1212,7 +1212,7 @@ ${subBlocks}
1212
1212
  }
1213
1213
 
1214
1214
  // src/index.ts
1215
- var program = new Command11().name("nuntly").description(pc4.bold("Nuntly CLI") + " - Developer-first email platform").version("0.0.1").option("--profile <name>", "Use a specific profile from ~/.nuntly/config.json");
1215
+ var program = new Command11().name("nuntly").description(pc4.bold("Nuntly CLI") + " - Developer-first email platform").version(CLI_VERSION).option("--profile <name>", "Use a specific profile from ~/.nuntly/config.json");
1216
1216
  program.command("login").description("Save your API key to ~/.nuntly/config.json").argument("[profile]", 'Profile name (default: "default")').action(async (profile) => {
1217
1217
  await login(profile);
1218
1218
  });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/commands/emails.ts","../src/auth.ts","../src/version.ts","../src/output.ts","../src/spinner.ts","../src/files.ts","../src/commands/domains.ts","../src/commands/webhooks.ts","../src/commands/organizations.ts","../src/commands/inboxes.ts","../src/commands/agents.ts","../src/commands/threads.ts","../src/commands/messages.ts","../src/commands/namespaces.ts","../src/commands/api-keys.ts","../src/completion.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from '@commander-js/extra-typings';\nimport pc from 'picocolors';\nimport { CLI_VERSION } from './version.js';\n\nimport { emailsCommand } from './commands/emails.js';\nimport { domainsCommand } from './commands/domains.js';\nimport { webhooksCommand } from './commands/webhooks.js';\nimport { organizationsCommand } from './commands/organizations.js';\nimport { inboxesCommand } from './commands/inboxes.js';\nimport { agentsCommand } from './commands/agents.js';\nimport { threadsCommand } from './commands/threads.js';\nimport { messagesCommand } from './commands/messages.js';\nimport { namespacesCommand } from './commands/namespaces.js';\nimport { apiKeysCommand } from './commands/api-keys.js';\n\nconst program = new Command()\n .name('nuntly')\n .description(pc.bold('Nuntly CLI') + ' - Developer-first email platform')\n .version('0.0.1')\n .option('--profile <name>', 'Use a specific profile from ~/.nuntly/config.json');\n\nimport { login, listProfiles } from './auth.js';\nimport { bashCompletion, zshCompletion, fishCompletion, powershellCompletion } from './completion.js';\n\nprogram\n .command('login')\n .description('Save your API key to ~/.nuntly/config.json')\n .argument('[profile]', 'Profile name (default: \"default\")')\n .action(async (profile) => { await login(profile); });\n\nprogram\n .command('profiles')\n .description('List configured profiles')\n .action(() => {\n const profiles = listProfiles();\n if (profiles.length === 0) console.log(pc.dim('No profiles configured. Run: nuntly login'));\n else profiles.forEach(n => console.log(n));\n });\n\nprogram\n .command('completion')\n .description('Output shell completion script')\n .argument('<shell>', 'Shell type: bash, zsh, fish, or powershell')\n .action((shell) => {\n switch (shell) {\n case 'bash': console.log(bashCompletion()); break;\n case 'zsh': console.log(zshCompletion()); break;\n case 'fish': console.log(fishCompletion()); break;\n case 'powershell': console.log(powershellCompletion()); break;\n default: console.error(pc.red('Unknown shell: ' + shell)); process.exit(1);\n }\n });\n\nprogram.addCommand(emailsCommand);\nprogram.addCommand(domainsCommand);\nprogram.addCommand(webhooksCommand);\nprogram.addCommand(organizationsCommand);\nprogram.addCommand(inboxesCommand);\nprogram.addCommand(agentsCommand);\nprogram.addCommand(threadsCommand);\nprogram.addCommand(messagesCommand);\nprogram.addCommand(namespacesCommand);\nprogram.addCommand(apiKeysCommand);\n\nprogram.parse();\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type CreateEmailRequest, type CreateBulkEmailsRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const emailsCommand = new Command('emails')\n .description('Emails resource.');\n\nconst statsSub = new Command('stats');\nemailsCommand.addCommand(statsSub);\n\nstatsSub\n .command('retrieve')\n .description('Returns aggregated daily sending statistics for the current period.')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails stats retrieve')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.stats.retrieve());\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst eventsSub = new Command('events');\nemailsCommand.addCommand(eventsSub);\n\neventsSub\n .command('list')\n .description('Returns the full delivery event history for an email (sent, delivered, opened, bounced, etc.).')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails events list em_1234abcd')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.events.list(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst contentSub = new Command('content');\nemailsCommand.addCommand(contentSub);\n\ncontentSub\n .command('retrieve')\n .description('Returns presigned URLs to download the HTML, plain-text, and raw MIME source of a sent email.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails content retrieve em_1234abcd')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.content.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst bulkSub = new Command('bulk');\nemailsCommand.addCommand(bulkSub);\n\nbulkSub\n .command('send')\n .description('Send up to 20 emails in a single request. Use `fallback` to set default values shared across all messages.')\n .option('--fallback <value>', 'Used as a fallback field email value if no value is present in emails')\n .option('--emails <value>', 'The bulk emails to send (required)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails bulk send --emails \"value\"\\n $ cat payload.json | nuntly emails bulk send\\n $ nuntly emails bulk send --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n fallback: opts.fallback != null ? JSON.parse(opts.fallback as string) : undefined,\n emails: JSON.parse(opts.emails as string)\n };\n const result = await withSpinner('Creating...', () => nuntly.emails.bulk.send(body as CreateBulkEmailsRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nbulkSub\n .command('list')\n .description('Returns the delivery status of all emails submitted in a bulk request.')\n .argument('<bulk-id>', 'The bulkId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails bulk list em_1234abcd')\n .action(async (bulkId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.bulk.list(bulkId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nemailsCommand\n .command('retrieve')\n .description('Returns an email with its current delivery status and metadata.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails retrieve em_1234abcd')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nemailsCommand\n .command('list')\n .description('Returns sent emails ordered by submission date, newest first.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails list\\n $ nuntly emails list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.emails.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nemailsCommand\n .command('send')\n .description('Send transactional emails through Nuntly platform. It supports HTML and plain-text emails, attachments, labels, custom headers and scheduling.')\n .option('--from <value>', 'The e-mail address of the sender (required)')\n .option('--to <value>', 'The primary recipient(s) of the email (required)')\n .option('--cc <value>', 'The carbon copy recipient(s) of the email')\n .option('--bcc <value>', 'The blind carbon copy recipient(s) of the email')\n .option('--reply-to <value>', 'The email address where replies should be sent. If a recipient replies, the response will go to this address instead of the sender\\'s email address')\n .option('--subject <value>', 'The subject of the e-mail (required)')\n .option('--text <value>', 'The plaintext version of the email')\n .option('--html <value>', 'The HTML version of the email')\n .option('--headers <value>', 'The headers to add to the email')\n .option('--tags <value>', 'The tags to add to the email')\n .option('--attachments <value>', 'The attachements to add to the email')\n .option('--variables <value>', 'The variables for the template')\n .option('--scheduled-at <value>', 'The date at which the email is scheduled to be sent')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails send --from hello@acme.com --to user@example.com --subject \"Welcome aboard\"\\n $ cat payload.json | nuntly emails send\\n $ nuntly emails send --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n from: opts.from,\n to: (opts.to as string).split(','),\n cc: opts.cc != null ? (opts.cc as string).split(',') : undefined,\n bcc: opts.bcc != null ? (opts.bcc as string).split(',') : undefined,\n replyTo: opts.replyTo != null ? (opts.replyTo as string).split(',') : undefined,\n subject: opts.subject,\n text: opts.text,\n html: opts.html,\n headers: opts.headers != null ? JSON.parse(opts.headers as string) : undefined,\n tags: opts.tags != null ? JSON.parse(opts.tags as string) : undefined,\n attachments: opts.attachments != null ? JSON.parse(opts.attachments as string) : undefined,\n variables: opts.variables != null ? JSON.parse(opts.variables as string) : undefined,\n scheduledAt: opts.scheduledAt\n };\n const result = await withSpinner('Creating...', () => nuntly.emails.send(body as CreateEmailRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nemailsCommand\n .command('cancel')\n .description('Cancel a scheduled email before delivery. Only emails with `scheduled` status can be cancelled.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails cancel em_1234abcd')\n .action(async (id, opts) => {\n try {\n if (!await confirmDelete('emails', id)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.emails.cancel(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { execSync } from \"node:child_process\";\nimport {\n\tchmodSync,\n\texistsSync,\n\tmkdirSync,\n\treadFileSync,\n\twriteFileSync,\n} from \"node:fs\";\nimport { homedir, platform } from \"node:os\";\nimport { resolve } from \"node:path\";\nimport * as p from \"@clack/prompts\";\nimport pc from \"picocolors\";\n\nexport type OutputFormat = \"json\" | \"table\" | \"yaml\" | \"markdown\" | \"quiet\";\n\nexport interface ProfileConfig {\n\tapiKey?: string;\n\tbaseUrl?: string;\n\toutputFormat?: OutputFormat;\n}\n\nexport interface NuntlyConfig {\n\tdefaultProfile?: string;\n\tprofiles?: Record<string, ProfileConfig>;\n\t// Legacy flat fields (migrated to profiles.default on read)\n\tapiKey?: string;\n\tbaseUrl?: string;\n\toutputFormat?: OutputFormat;\n}\n\nexport const CONFIG_DIR = resolve(homedir(), \".nuntly\");\nexport const CONFIG_PATH = resolve(CONFIG_DIR, \"config.json\");\n\nfunction loadRawConfig(): NuntlyConfig {\n\tif (!existsSync(CONFIG_PATH)) return {};\n\ttry {\n\t\treturn JSON.parse(readFileSync(CONFIG_PATH, \"utf-8\"));\n\t} catch {\n\t\treturn {};\n\t}\n}\n\nfunction resolveProfile(\n\tconfig: NuntlyConfig,\n\tprofileName?: string,\n): ProfileConfig {\n\t// Legacy flat config: treat as default profile\n\tif (!config.profiles && config.apiKey) {\n\t\treturn {\n\t\t\tapiKey: config.apiKey,\n\t\t\tbaseUrl: config.baseUrl,\n\t\t\toutputFormat: config.outputFormat,\n\t\t};\n\t}\n\tconst name = profileName ?? config.defaultProfile ?? \"default\";\n\treturn config.profiles?.[name] ?? {};\n}\n\nfunction restrictFilePermissions(filePath: string): void {\n\tif (platform() === \"win32\") {\n\t\ttry {\n\t\t\texecSync(\n\t\t\t\t`icacls \"${filePath}\" /inheritance:r /grant:r \"%USERNAME%:(R,W)\" /q`,\n\t\t\t\t{ stdio: \"ignore\" },\n\t\t\t);\n\t\t} catch {\n\t\t\t// icacls may not be available in all Windows environments\n\t\t}\n\t} else {\n\t\tchmodSync(filePath, 0o600);\n\t}\n}\n\nexport function saveProfile(profileName: string, profile: ProfileConfig): void {\n\tmkdirSync(CONFIG_DIR, { recursive: true });\n\tconst config = loadRawConfig();\n\tif (!config.profiles) config.profiles = {};\n\tconfig.profiles[profileName] = {\n\t\t...config.profiles[profileName],\n\t\t...profile,\n\t};\n\tif (!config.defaultProfile) config.defaultProfile = profileName;\n\t// Remove legacy flat fields\n\tdelete config.apiKey;\n\tdelete config.baseUrl;\n\tdelete config.outputFormat;\n\twriteFileSync(CONFIG_PATH, JSON.stringify(config, null, 2) + \"\\n\", {\n\t\tmode: 0o600,\n\t});\n\trestrictFilePermissions(CONFIG_PATH);\n}\n\nexport function listProfiles(): string[] {\n\tconst config = loadRawConfig();\n\treturn Object.keys(config.profiles ?? {});\n}\n\nfunction getGlobalProfile(): string | undefined {\n\tconst idx = process.argv.indexOf(\"--profile\");\n\tif (idx >= 0 && idx + 1 < process.argv.length) return process.argv[idx + 1];\n\treturn process.env[\"NUNTLY_PROFILE\"] ?? undefined;\n}\n\nexport function resolveApiKey(flagKey?: string, profileName?: string): string {\n\tconst config = loadRawConfig();\n\tconst profile = resolveProfile(config, profileName ?? getGlobalProfile());\n\tconst key = flagKey ?? process.env[\"NUNTLY_API_KEY\"] ?? profile.apiKey;\n\tif (!key) {\n\t\tconsole.error(pc.red(\"Error: API key not found.\"));\n\t\tconsole.error(\n\t\t\t`Run ${pc.bold(\"nuntly login\")}, set ${pc.bold(\"NUNTLY_API_KEY\")} env var, or use ${pc.bold(\"--api-key\")}`,\n\t\t);\n\t\tif (profileName) console.error(pc.dim(`Profile: ${profileName}`));\n\t\tprocess.exit(1);\n\t}\n\tif (flagKey) {\n\t\tconsole.error(\n\t\t\tpc.yellow(\n\t\t\t\t\"Warning: passing API key via flag is less secure than env var.\",\n\t\t\t),\n\t\t);\n\t}\n\treturn key;\n}\n\nexport function resolveBaseUrl(\n\tflagUrl?: string,\n\tprofileName?: string,\n): string | undefined {\n\tconst config = loadRawConfig();\n\tconst profile = resolveProfile(config, profileName ?? getGlobalProfile());\n\treturn flagUrl ?? process.env[\"NUNTLY_BASE_URL\"] ?? profile.baseUrl;\n}\n\nexport function resolveOutputFormat(\n\tprofileName?: string,\n): OutputFormat | undefined {\n\tconst config = loadRawConfig();\n\tconst profile = resolveProfile(config, profileName);\n\treturn profile.outputFormat;\n}\n\nexport async function login(profileName?: string): Promise<void> {\n\tconst name = profileName ?? \"default\";\n\tp.intro(\n\t\tpc.bold(`Nuntly Login${name !== \"default\" ? ` (profile: ${name})` : \"\"}`),\n\t);\n\n\tconst apiKey = await p.text({\n\t\tmessage: \"Enter your API key\",\n\t\tplaceholder: \"nuntly_sk_...\",\n\t\tvalidate: (value) => {\n\t\t\tif (!value || value.trim().length === 0) return \"API key is required\";\n\t\t\treturn undefined;\n\t\t},\n\t});\n\n\tif (p.isCancel(apiKey)) {\n\t\tp.cancel(\"Login cancelled.\");\n\t\tprocess.exit(0);\n\t}\n\n\tconst baseUrl = await p.text({\n\t\tmessage: \"API base URL (leave empty for default)\",\n\t\tplaceholder: \"https://api.nuntly.com\",\n\t});\n\n\tif (p.isCancel(baseUrl)) {\n\t\tp.cancel(\"Login cancelled.\");\n\t\tprocess.exit(0);\n\t}\n\n\tconst profile: ProfileConfig = { apiKey: apiKey.trim() };\n\tif (baseUrl && baseUrl.trim()) profile.baseUrl = baseUrl.trim();\n\n\tsaveProfile(name, profile);\n\n\tp.note(`Profile \"${name}\" saved to ${pc.dim(CONFIG_PATH)}`, \"Saved\");\n\tp.outro(pc.green(\"Logged in successfully.\"));\n}\n\nexport async function confirmDelete(\n\tresource: string,\n\tid: string,\n): Promise<boolean> {\n\tconst result = await p.confirm({\n\t\tmessage: `Delete ${resource} ${pc.bold(id)}?`,\n\t});\n\tif (p.isCancel(result)) return false;\n\treturn result;\n}\n","// Auto-generated. Do not edit manually.\n// Source of truth: package.json (version field).\n\nexport const CLI_VERSION = '0.0.1';\n","import pc from \"picocolors\";\n\nexport type OutputFormat =\n\t| \"json\"\n\t| \"raw\"\n\t| \"table\"\n\t| \"yaml\"\n\t| \"csv\"\n\t| \"markdown\"\n\t| \"quiet\";\n\nexport interface OutputOpts {\n\tformat?: string;\n\tquiet?: boolean;\n\traw?: boolean;\n\tfields?: string;\n\theader?: boolean;\n}\n\nfunction extractItems(data: unknown): Record<string, unknown>[] | null {\n\tif (\n\t\tdata &&\n\t\ttypeof data === \"object\" &&\n\t\t\"data\" in data &&\n\t\tArray.isArray((data as any).data)\n\t)\n\t\treturn (data as any).data;\n\tif (Array.isArray(data)) return data;\n\treturn null;\n}\n\nfunction resolveKeys(\n\titems: Record<string, unknown>[],\n\tfields?: string[],\n): string[] {\n\tconst allKeys = Object.keys(items[0]);\n\tif (!fields) return allKeys;\n\treturn fields.filter((f) => allKeys.includes(f));\n}\n\nexport function formatOutput(\n\tdata: unknown,\n\tformat: OutputFormat,\n\topts?: { fields?: string[]; noHeader?: boolean },\n): string {\n\tconst fields = opts?.fields;\n\tconst noHeader = opts?.noHeader ?? false;\n\n\tif (format === \"quiet\") {\n\t\tif (data && typeof data === \"object\" && \"id\" in data) {\n\t\t\treturn String((data as Record<string, unknown>).id);\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tif (format === \"table\") {\n\t\tconst items = extractItems(data);\n\n\t\tif (items) {\n\t\t\tif (items.length === 0) return pc.dim(\"No results.\");\n\t\t\tconst keys = resolveKeys(items, fields);\n\t\t\tconst widths = keys.map((k) =>\n\t\t\t\tMath.max(\n\t\t\t\t\tk.length,\n\t\t\t\t\t...items.map((r: any) => String(r[k] ?? \"\").slice(0, 40).length),\n\t\t\t\t),\n\t\t\t);\n\t\t\tconst rows = items.map((r: any) =>\n\t\t\t\tkeys\n\t\t\t\t\t.map((k, i) =>\n\t\t\t\t\t\tString(r[k] ?? \"\")\n\t\t\t\t\t\t\t.slice(0, 40)\n\t\t\t\t\t\t\t.padEnd(widths[i]),\n\t\t\t\t\t)\n\t\t\t\t\t.join(\" \"),\n\t\t\t);\n\n\t\t\tconst parts: string[] = [];\n\t\t\tif (!noHeader) {\n\t\t\t\tconst header = keys\n\t\t\t\t\t.map((k, i) => pc.bold(k.padEnd(widths[i])))\n\t\t\t\t\t.join(\" \");\n\t\t\t\tparts.push(header, pc.dim(\"-\".repeat(header.length)));\n\t\t\t}\n\t\t\tparts.push(...rows);\n\t\t\tconst result = parts.join(\"\\n\");\n\n\t\t\tconst nextCursor = (data as any)?.nextCursor;\n\t\t\tif (nextCursor)\n\t\t\t\treturn result + \"\\n\" + pc.dim(`next: --cursor ${nextCursor}`);\n\t\t\treturn result;\n\t\t}\n\n\t\treturn JSON.stringify(data, null, 2);\n\t}\n\n\tif (format === \"raw\") {\n\t\treturn JSON.stringify(data);\n\t}\n\n\tif (format === \"yaml\") {\n\t\treturn toYaml(data);\n\t}\n\n\tif (format === \"csv\") {\n\t\tconst items = extractItems(data);\n\n\t\tconst escapeCsv = (v: unknown): string => {\n\t\t\tconst s =\n\t\t\t\ttypeof v === \"object\" && v !== null\n\t\t\t\t\t? JSON.stringify(v)\n\t\t\t\t\t: String(v ?? \"\");\n\t\t\treturn s.includes(\",\") || s.includes('\"') || s.includes(\"\\n\")\n\t\t\t\t? `\"${s.replace(/\"/g, '\"\"')}\"`\n\t\t\t\t: s;\n\t\t};\n\n\t\tif (items && items.length > 0) {\n\t\t\tconst keys = resolveKeys(items, fields);\n\t\t\tconst rows = items.map((r: any) =>\n\t\t\t\tkeys.map((k) => escapeCsv(r[k])).join(\",\"),\n\t\t\t);\n\t\t\tif (noHeader) return rows.join(\"\\r\\n\");\n\t\t\treturn [keys.join(\",\"), ...rows].join(\"\\r\\n\");\n\t\t}\n\n\t\tif (data && typeof data === \"object\") {\n\t\t\tconst entries = Object.entries(data as Record<string, unknown>);\n\t\t\tif (noHeader)\n\t\t\t\treturn entries.map(([k, v]) => `${k},${escapeCsv(v)}`).join(\"\\r\\n\");\n\t\t\treturn [\n\t\t\t\t\"field,value\",\n\t\t\t\t...entries.map(([k, v]) => `${k},${escapeCsv(v)}`),\n\t\t\t].join(\"\\r\\n\");\n\t\t}\n\n\t\treturn String(data);\n\t}\n\n\tif (format === \"markdown\") {\n\t\tconst items = extractItems(data);\n\n\t\tif (items && items.length > 0) {\n\t\t\tconst keys = resolveKeys(items, fields);\n\t\t\tconst header = \"| \" + keys.join(\" | \") + \" |\";\n\t\t\tconst sep = \"| \" + keys.map(() => \"---\").join(\" | \") + \" |\";\n\t\t\tconst rows = items.map(\n\t\t\t\t(r: any) =>\n\t\t\t\t\t\"| \" +\n\t\t\t\t\tkeys.map((k) => String(r[k] ?? \"\").slice(0, 60)).join(\" | \") +\n\t\t\t\t\t\" |\",\n\t\t\t);\n\t\t\tif (noHeader) return rows.join(\"\\n\");\n\t\t\treturn [header, sep, ...rows].join(\"\\n\");\n\t\t}\n\n\t\tif (data && typeof data === \"object\") {\n\t\t\tconst entries = Object.entries(data as Record<string, unknown>);\n\t\t\tconst header = \"| Field | Value |\";\n\t\t\tconst sep = \"| --- | --- |\";\n\t\t\tconst rows = entries.map(\n\t\t\t\t([k, v]) =>\n\t\t\t\t\t`| ${k} | ${typeof v === \"object\" ? JSON.stringify(v) : String(v)} |`,\n\t\t\t);\n\t\t\tif (noHeader) return rows.join(\"\\n\");\n\t\t\treturn [header, sep, ...rows].join(\"\\n\");\n\t\t}\n\n\t\treturn String(data);\n\t}\n\n\treturn JSON.stringify(data, null, 2);\n}\n\nfunction toYaml(data: unknown, indent = 0): string {\n\tconst prefix = \" \".repeat(indent);\n\tif (data === null || data === undefined) return `${prefix}null`;\n\tif (typeof data === \"string\")\n\t\treturn data.includes(\"\\n\") ? `${prefix}|\\\\n${data}` : `${prefix}${data}`;\n\tif (typeof data === \"number\" || typeof data === \"boolean\")\n\t\treturn `${prefix}${data}`;\n\tif (Array.isArray(data)) {\n\t\tif (data.length === 0) return `${prefix}[]`;\n\t\treturn data\n\t\t\t.map((item) => {\n\t\t\t\tif (typeof item === \"object\" && item !== null) {\n\t\t\t\t\tconst inner = toYaml(item, indent + 1).trim();\n\t\t\t\t\treturn `${prefix}- ${inner.replace(/\\n/g, \"\\n\" + prefix + \" \")}`;\n\t\t\t\t}\n\t\t\t\treturn `${prefix}- ${item}`;\n\t\t\t})\n\t\t\t.join(\"\\n\");\n\t}\n\tif (typeof data === \"object\") {\n\t\treturn Object.entries(data as Record<string, unknown>)\n\t\t\t.map(([key, value]) => {\n\t\t\t\tif (value === null || value === undefined)\n\t\t\t\t\treturn `${prefix}${key}: null`;\n\t\t\t\tif (typeof value === \"object\")\n\t\t\t\t\treturn `${prefix}${key}:\\n${toYaml(value, indent + 1)}`;\n\t\t\t\treturn `${prefix}${key}: ${value}`;\n\t\t\t})\n\t\t\t.join(\"\\n\");\n\t}\n\treturn `${prefix}${String(data)}`;\n}\n\nexport function printResult(data: unknown, opts: OutputOpts) {\n\tlet format: OutputFormat;\n\tif (opts.quiet) format = \"quiet\";\n\telse if (opts.raw) format = \"raw\";\n\telse if (opts.format) format = opts.format as OutputFormat;\n\telse if (!process.stdout.isTTY) format = \"json\";\n\telse {\n\t\tconst isArray =\n\t\t\tArray.isArray(data) ||\n\t\t\t(data &&\n\t\t\t\ttypeof data === \"object\" &&\n\t\t\t\t\"data\" in data &&\n\t\t\t\tArray.isArray((data as any).data));\n\t\tformat = isArray ? \"table\" : \"json\";\n\t}\n\n\tconst fields = opts.fields?.split(\",\").map((f) => f.trim());\n\tconst noHeader = opts.header === false;\n\tconst output = formatOutput(data, format, { fields, noHeader });\n\tif (output) console.log(output);\n}\n\nfunction isJsonMode(opts?: OutputOpts): boolean {\n\tif (opts?.format === \"json\" || opts?.raw) return true;\n\tif (!opts?.format && !opts?.quiet && !process.stdout.isTTY) return true;\n\treturn false;\n}\n\nexport function printError(error: unknown, opts?: OutputOpts) {\n\tconst e = error as any;\n\tconst isApi = !!e?.status;\n\n\tif (isJsonMode(opts)) {\n\t\tconst envelope = {\n\t\t\terror: {\n\t\t\t\tcode: isApi ? `HTTP_${e.status}` : \"CLIENT_ERROR\",\n\t\t\t\tmessage: e?.body?.message ?? e?.message ?? String(error),\n\t\t\t\t...(e?.requestId && { requestId: e.requestId }),\n\t\t\t\t...(e?.body?.errors && { fields: e.body.errors }),\n\t\t\t},\n\t\t};\n\t\tconsole.error(JSON.stringify(envelope));\n\t} else {\n\t\tif (isApi) {\n\t\t\tconsole.error(\n\t\t\t\tpc.red(`HTTP ${e.status}: ${e.body?.message ?? e.message}`),\n\t\t\t);\n\t\t\tif (e.requestId) console.error(pc.dim(`request: ${e.requestId}`));\n\t\t\tif (e.body?.errors) {\n\t\t\t\tfor (const err of e.body.errors) {\n\t\t\t\t\tconsole.error(pc.yellow(` ${err.field}: ${err.message}`));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(pc.red(e?.message ?? String(error)));\n\t\t}\n\t}\n\n\tprocess.exit(isApi ? 1 : 2);\n}\n","import pc from \"picocolors\";\n\nconst isLegacyWindows =\n\tprocess.platform === \"win32\" &&\n\t!process.env[\"WT_SESSION\"] &&\n\t!process.env[\"TERM_PROGRAM\"];\n\nconst FRAMES = isLegacyWindows\n\t? [\"|\", \"/\", \"-\", \"\\\\\"]\n\t: [\n\t\t\t\"\\u280B\",\n\t\t\t\"\\u2819\",\n\t\t\t\"\\u2839\",\n\t\t\t\"\\u2838\",\n\t\t\t\"\\u283C\",\n\t\t\t\"\\u2834\",\n\t\t\t\"\\u2826\",\n\t\t\t\"\\u2827\",\n\t\t\t\"\\u2807\",\n\t\t\t\"\\u280F\",\n\t\t];\n\nconst INTERVAL = 80;\n\nexport async function withSpinner<T>(\n\tmessage: string,\n\tfn: () => Promise<T>,\n): Promise<T> {\n\tif (!process.stderr.isTTY) return fn();\n\n\tlet i = 0;\n\tconst timer = setInterval(() => {\n\t\tconst frame = FRAMES[i++ % FRAMES.length];\n\t\tprocess.stderr.write(`\\r${pc.cyan(frame)} ${pc.dim(message)}`);\n\t}, INTERVAL);\n\n\ttry {\n\t\treturn await fn();\n\t} finally {\n\t\tclearInterval(timer);\n\t\tprocess.stderr.write(`\\r${\" \".repeat(message.length + 4)}\\r`);\n\t}\n}\n","import { readFileSync, readSync } from \"node:fs\";\n\nfunction readStdin(): string {\n\tconst chunks: Buffer[] = [];\n\tconst buf = Buffer.alloc(4096);\n\ttry {\n\t\tlet bytesRead: number;\n\t\twhile ((bytesRead = readSync(0, buf, 0, buf.length, null)) > 0) {\n\t\t\tchunks.push(buf.subarray(0, bytesRead));\n\t\t}\n\t} catch (e: any) {\n\t\tif (e.code !== \"EOF\" && e.code !== \"EAGAIN\") throw e;\n\t}\n\treturn Buffer.concat(chunks).toString(\"utf-8\");\n}\n\nexport function readInput(filePath: string): unknown {\n\tconst raw = filePath === \"-\" ? readStdin() : readFileSync(filePath, \"utf-8\");\n\treturn JSON.parse(raw);\n}\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type CreateDomainRequest, type UpdateDomainRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const domainsCommand = new Command('domains')\n .description('Domains resource.');\n\ndomainsCommand\n .command('list')\n .description('Returns all domains with their verification and capability status.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains list\\n $ nuntly domains list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.domains.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ndomainsCommand\n .command('retrieve')\n .description('Returns a domain with its DNS record configuration and current verification status for each record.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains retrieve dm_5678efgh')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.domains.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ndomainsCommand\n .command('delete')\n .description('Permanently deletes a domain along with its inboxes, received messages, attachments, and sending configuration. This action is irreversible.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains delete dm_5678efgh')\n .action(async (id, opts) => {\n try {\n if (!await confirmDelete('domains', id)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.domains.delete(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ndomainsCommand\n .command('create')\n .description('Add a domain to start configuring DNS records for sending or receiving emails.')\n .option('--name <value>', 'The name of the domain to send e-mails\\' (required)')\n .option('--sending', 'Enable sending')\n .option('--receiving', 'Enable receiving')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains create --name my-resource\\n $ cat payload.json | nuntly domains create\\n $ nuntly domains create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n sending: opts.sending,\n receiving: opts.receiving\n };\n const result = await withSpinner('Creating...', () => nuntly.domains.create(body as CreateDomainRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ndomainsCommand\n .command('update')\n .description('Toggle sending, receiving, open tracking, or click tracking capabilities for a domain.')\n .argument('<id>', 'The id')\n .option('--open-tracking', 'Emit an event for each recipient opens an email their email client')\n .option('--click-tracking', 'Emit an event for each time the recipient clicks a link in the email')\n .option('--sending', 'Enable or disable sending')\n .option('--receiving', 'Enable or disable receiving')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains update dm_5678efgh\\n $ cat payload.json | nuntly domains update dm_5678efgh\\n $ nuntly domains update dm_5678efgh --file payload.json')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n openTracking: opts.openTracking,\n clickTracking: opts.clickTracking,\n sending: opts.sending,\n receiving: opts.receiving\n };\n const result = await withSpinner('Updating...', () => nuntly.domains.update(id, body as UpdateDomainRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type UpdateWebhookRequest, type CreateWebhookRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const webhooksCommand = new Command('webhooks')\n .description('Webhooks resource.');\n\nconst eventsSub = new Command('events');\nwebhooksCommand.addCommand(eventsSub);\n\neventsSub\n .command('list')\n .description('Returns recent webhook events across all registered endpoints.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks events list\\n $ nuntly webhooks events list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.webhooks.events.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\neventsSub\n .command('replay')\n .description('Re-deliver a webhook event to its endpoint. Useful for retrying failed deliveries.')\n .argument('<id>', 'The id')\n .argument('<event-id>', 'The eventId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks events replay wh_9012ijkl wh_9012ijkl')\n .action(async (id, eventId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Creating...', () => nuntly.webhooks.events.replay(id, eventId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\neventsSub\n .command('deliveries')\n .description('Returns all delivery attempts for a webhook event, including HTTP status codes and response times.')\n .argument('<id>', 'The id')\n .argument('<event-id>', 'The eventId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks events deliveries wh_9012ijkl wh_9012ijkl')\n .action(async (id, eventId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.webhooks.events.deliveries(id, eventId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('retrieve')\n .description('Returns a webhook endpoint with its URL, subscribed events, and configuration.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks retrieve wh_9012ijkl')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.webhooks.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('update')\n .description('Update the endpoint URL, subscribed event types, or rotate the signing secret.')\n .argument('<id>', 'The id')\n .option('--name <value>', 'The name of the webhook')\n .option('--endpoint-url <value>', 'The endpoint URL of the webhook')\n .option('--events <value>', 'The event types to subscribe to')\n .option('--status <value>', 'The status of the webhook.')\n .option('--rotate-secret', 'If true, a new signing secret will be generated')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks update wh_9012ijkl\\n $ cat payload.json | nuntly webhooks update wh_9012ijkl\\n $ nuntly webhooks update wh_9012ijkl --file payload.json')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n endpointUrl: opts.endpointUrl,\n events: opts.events != null ? (opts.events as string).split(',') : undefined,\n status: opts.status,\n rotateSecret: opts.rotateSecret\n };\n const result = await withSpinner('Updating...', () => nuntly.webhooks.update(id, body as UpdateWebhookRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('delete')\n .description('Remove a webhook endpoint. No further events will be delivered to this URL.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks delete wh_9012ijkl')\n .action(async (id, opts) => {\n try {\n if (!await confirmDelete('webhooks', id)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.webhooks.delete(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('create')\n .description('Register an endpoint to start receiving webhook events for your organization.')\n .option('--name <value>', 'The name of the webhook')\n .option('--endpoint-url <value>', 'The endpoint URL of the webhook (required)')\n .option('--status <value>', 'The status of the webhook.')\n .option('--events <value>', 'The event types to subscribe to (required)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks create --endpoint-url https://acme.com/webhooks --events email.sent,email.delivered\\n $ cat payload.json | nuntly webhooks create\\n $ nuntly webhooks create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n endpointUrl: opts.endpointUrl,\n status: opts.status,\n events: (opts.events as string).split(',')\n };\n const result = await withSpinner('Creating...', () => nuntly.webhooks.create(body as CreateWebhookRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('list')\n .description('Returns all registered webhook endpoints for the organization.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks list\\n $ nuntly webhooks list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.webhooks.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\n\nexport const organizationsCommand = new Command('organizations')\n .description('Organizations resource.');\n\nconst usageSub = new Command('usage');\norganizationsCommand.addCommand(usageSub);\n\nusageSub\n .command('retrieve')\n .description('Returns current period usage metrics (daily and monthly) for sending and receiving, against your plan limits.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly organizations usage retrieve org_8901klmn')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.organizations.usage.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\norganizationsCommand\n .command('list')\n .description('Returns all organizations the authenticated user belongs to.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly organizations list\\n $ nuntly organizations list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.organizations.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\norganizationsCommand\n .command('retrieve')\n .description('Returns the organization\\'s profile, plan, region, and account status.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly organizations retrieve org_8901klmn')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.organizations.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type CreateInboxRequest, type UpdateInboxRequest, type SendMessageRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const inboxesCommand = new Command('inboxes')\n .description('Inboxes resource.');\n\nconst threadsSub = new Command('threads');\ninboxesCommand.addCommand(threadsSub);\n\nthreadsSub\n .command('list')\n .description('List threads in an inbox.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes threads list ib_7890qrst\\n $ nuntly inboxes threads list ib_7890qrst --format json | jq \\'.data[].id\\'')\n .action(async (inboxId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.inboxes.threads.list(inboxId, { cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst messagesSub = new Command('messages');\ninboxesCommand.addCommand(messagesSub);\n\nmessagesSub\n .command('send')\n .description('Send a new message from an inbox.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--to <value>', 'The recipient addresses. (required)')\n .option('--cc <value>', 'The CC addresses.')\n .option('--bcc <value>', 'The BCC addresses.')\n .option('--subject <value>', 'The message subject. (required)')\n .option('--text <value>', 'The plain text body.')\n .option('--html <value>', 'The HTML body.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes messages send ib_7890qrst --to user@example.com --subject \"Welcome aboard\"\\n $ cat payload.json | nuntly inboxes messages send ib_7890qrst\\n $ nuntly inboxes messages send ib_7890qrst --file payload.json')\n .action(async (inboxId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n to: (opts.to as string).split(','),\n cc: opts.cc != null ? (opts.cc as string).split(',') : undefined,\n bcc: opts.bcc != null ? (opts.bcc as string).split(',') : undefined,\n subject: opts.subject,\n text: opts.text,\n html: opts.html\n };\n const result = await withSpinner('Creating...', () => nuntly.inboxes.messages.send(inboxId, body as SendMessageRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('create')\n .description('Create a new inbox on a verified domain.')\n .option('--domain-id <value>', 'The id of the domain for this inbox. Defaults to your provided domain when omitted.')\n .option('--address <value>', 'The local-part of the email address (before the @). (required)')\n .option('--name <value>', 'The display name of the inbox.')\n .option('--namespace-id <value>', 'The id of the namespace to assign the inbox to.')\n .option('--agent-id <value>', 'The external AI agent identifier.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes create --address support\\n $ cat payload.json | nuntly inboxes create\\n $ nuntly inboxes create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n domainId: opts.domainId,\n address: opts.address,\n name: opts.name,\n namespaceId: opts.namespaceId,\n agentId: opts.agentId\n };\n const result = await withSpinner('Creating...', () => nuntly.inboxes.create(body as CreateInboxRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('list')\n .description('List all inboxes.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes list\\n $ nuntly inboxes list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.inboxes.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('retrieve')\n .description('Retrieve an inbox with thread stats.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes retrieve ib_7890qrst')\n .action(async (inboxId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.inboxes.retrieve(inboxId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('update')\n .description('Update an inbox.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--name <value>', 'The display name of the inbox.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes update ib_7890qrst\\n $ cat payload.json | nuntly inboxes update ib_7890qrst\\n $ nuntly inboxes update ib_7890qrst --file payload.json')\n .action(async (inboxId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name\n };\n const result = await withSpinner('Updating...', () => nuntly.inboxes.update(inboxId, body as UpdateInboxRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('delete')\n .description('Soft-delete an inbox.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes delete ib_7890qrst')\n .action(async (inboxId, opts) => {\n try {\n if (!await confirmDelete('inboxes', inboxId)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.inboxes.delete(inboxId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type AgentMemoryRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const agentsCommand = new Command('agents')\n .description('Agents resource.');\n\nconst memorySub = new Command('memory');\nagentsCommand.addCommand(memorySub);\n\nmemorySub\n .command('retrieve')\n .description('Retrieve the memory for an AI agent.')\n .argument('<agent-id>', 'The agentId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly agents memory retrieve ag_6789yzab')\n .action(async (agentId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.agents.memory.retrieve(agentId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmemorySub\n .command('upsert')\n .description('Create or update the memory for an AI agent.')\n .argument('<agent-id>', 'The agentId')\n .option('--inbox-id <value>', 'The inbox id to scope the memory to.')\n .option('--thread-id <value>', 'The thread id to scope the memory to.')\n .option('--memory <value>', 'The agent memory key-value data. (required)')\n .option('--summary <value>', 'A human-readable conversation summary.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly agents memory upsert ag_6789yzab --memory \"value\"\\n $ cat payload.json | nuntly agents memory upsert ag_6789yzab\\n $ nuntly agents memory upsert ag_6789yzab --file payload.json')\n .action(async (agentId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n inboxId: opts.inboxId,\n threadId: opts.threadId,\n memory: JSON.parse(opts.memory as string),\n summary: opts.summary\n };\n const result = await withSpinner('Updating...', () => nuntly.agents.memory.upsert(agentId, body as AgentMemoryRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type UpdateThreadRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const threadsCommand = new Command('threads')\n .description('Threads resource.');\n\nconst messagesSub = new Command('messages');\nthreadsCommand.addCommand(messagesSub);\n\nmessagesSub\n .command('list')\n .description('List messages in a thread (chronological order).')\n .argument('<thread-id>', 'The threadId')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly threads messages list th_0123cdef\\n $ nuntly threads messages list th_0123cdef --format json | jq \\'.data[].id\\'')\n .action(async (threadId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.threads.messages.list(threadId, { cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nthreadsCommand\n .command('retrieve')\n .description('Retrieve a thread. Pass ?markRead=true to automatically remove the unread label from all messages.')\n .argument('<thread-id>', 'The threadId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly threads retrieve th_0123cdef')\n .action(async (threadId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.threads.retrieve(threadId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nthreadsCommand\n .command('update')\n .description('Update thread labels and agent assignment. Label operations apply to all messages in the thread.')\n .argument('<thread-id>', 'The threadId')\n .option('--add-labels <value>', 'Labels to add to all messages in the thread.')\n .option('--remove-labels <value>', 'Labels to remove from all messages in the thread.')\n .option('--agent-id <value>', 'The AI agent identifier.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly threads update th_0123cdef\\n $ cat payload.json | nuntly threads update th_0123cdef\\n $ nuntly threads update th_0123cdef --file payload.json')\n .action(async (threadId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n addLabels: opts.addLabels != null ? (opts.addLabels as string).split(',') : undefined,\n removeLabels: opts.removeLabels != null ? (opts.removeLabels as string).split(',') : undefined,\n agentId: opts.agentId\n };\n const result = await withSpinner('Updating...', () => nuntly.threads.update(threadId, body as UpdateThreadRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type UpdateMessageRequest, type ReplyMessageRequest, type ForwardMessageRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const messagesCommand = new Command('messages')\n .description('Messages resource.');\n\nconst contentSub = new Command('content');\nmessagesCommand.addCommand(contentSub);\n\ncontentSub\n .command('retrieve')\n .description('Returns presigned URLs to download the HTML, plain-text, and raw MIME source of a received message.')\n .argument('<message-id>', 'The messageId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages content retrieve mg_4567ghij')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.messages.content.retrieve(messageId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst attachmentsSub = new Command('attachments');\nmessagesCommand.addCommand(attachmentsSub);\n\nattachmentsSub\n .command('list')\n .description('List all attachments for a message.')\n .argument('<message-id>', 'The messageId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages attachments list mg_4567ghij')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.messages.attachments.list(messageId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nattachmentsSub\n .command('retrieve')\n .description('Retrieve an attachment with a presigned download URL.')\n .argument('<message-id>', 'The messageId')\n .argument('<attachment-id>', 'The attachmentId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages attachments retrieve mg_4567ghij mg_4567ghij')\n .action(async (messageId, attachmentId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.messages.attachments.retrieve(messageId, attachmentId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('list')\n .description('List all received messages across inboxes.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages list\\n $ nuntly messages list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.messages.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('retrieve')\n .description('Retrieve a single message with inbox enrichment.')\n .argument('<message-id>', 'The messageId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages retrieve mg_4567ghij')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.messages.retrieve(messageId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('update')\n .description('Update message labels. Only available for messages in user-created inboxes.')\n .argument('<message-id>', 'The messageId')\n .option('--add-labels <value>', 'Labels to add to the message.')\n .option('--remove-labels <value>', 'Labels to remove from the message.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages update mg_4567ghij\\n $ cat payload.json | nuntly messages update mg_4567ghij\\n $ nuntly messages update mg_4567ghij --file payload.json')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n addLabels: opts.addLabels != null ? (opts.addLabels as string).split(',') : undefined,\n removeLabels: opts.removeLabels != null ? (opts.removeLabels as string).split(',') : undefined\n };\n const result = await withSpinner('Updating...', () => nuntly.messages.update(messageId, body as UpdateMessageRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('reply')\n .description('Reply to a message. Set replyAll to true to reply to all recipients.')\n .argument('<message-id>', 'The messageId')\n .option('--text <value>', 'The plain text body.')\n .option('--html <value>', 'The HTML body.')\n .option('--reply-all', 'Whether to reply to all recipients. (required)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages reply mg_4567ghij --reply-all\\n $ cat payload.json | nuntly messages reply mg_4567ghij\\n $ nuntly messages reply mg_4567ghij --file payload.json')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n text: opts.text,\n html: opts.html,\n replyAll: opts.replyAll\n };\n const result = await withSpinner('Creating...', () => nuntly.messages.reply(messageId, body as ReplyMessageRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('forward')\n .description('Forward a message to new recipients.')\n .argument('<message-id>', 'The messageId')\n .option('--to <value>', 'The recipient addresses to forward to. (required)')\n .option('--text <value>', 'An optional comment to prepend.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages forward mg_4567ghij --to user@example.com\\n $ cat payload.json | nuntly messages forward mg_4567ghij\\n $ nuntly messages forward mg_4567ghij --file payload.json')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n to: (opts.to as string).split(','),\n text: opts.text\n };\n const result = await withSpinner('Creating...', () => nuntly.messages.forward(messageId, body as ForwardMessageRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type CreateNamespaceRequest, type UpdateNamespaceRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const namespacesCommand = new Command('namespaces')\n .description('Namespaces resource.');\n\nconst inboxesSub = new Command('inboxes');\nnamespacesCommand.addCommand(inboxesSub);\n\ninboxesSub\n .command('list')\n .description('List inboxes in a namespace.')\n .argument('<namespace-id>', 'The namespaceId')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces inboxes list ib_7890qrst\\n $ nuntly namespaces inboxes list ib_7890qrst --format json | jq \\'.data[].id\\'')\n .action(async (namespaceId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.namespaces.inboxes.list(namespaceId, { cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('create')\n .description('Create a new namespace.')\n .option('--name <value>', 'The display name of the namespace. (required)')\n .option('--external-id <value>', 'An optional external identifier for the namespace.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces create --name my-resource\\n $ cat payload.json | nuntly namespaces create\\n $ nuntly namespaces create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n externalId: opts.externalId\n };\n const result = await withSpinner('Creating...', () => nuntly.namespaces.create(body as CreateNamespaceRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('list')\n .description('List all namespaces.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces list\\n $ nuntly namespaces list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.namespaces.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('retrieve')\n .description('Retrieve a namespace with inbox stats.')\n .argument('<namespace-id>', 'The namespaceId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces retrieve ns_2345uvwx')\n .action(async (namespaceId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.namespaces.retrieve(namespaceId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('update')\n .description('Update a namespace.')\n .argument('<namespace-id>', 'The namespaceId')\n .option('--name <value>', 'The display name of the namespace.')\n .option('--external-id <value>', 'An optional external identifier for the namespace.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces update ns_2345uvwx\\n $ cat payload.json | nuntly namespaces update ns_2345uvwx\\n $ nuntly namespaces update ns_2345uvwx --file payload.json')\n .action(async (namespaceId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n externalId: opts.externalId\n };\n const result = await withSpinner('Updating...', () => nuntly.namespaces.update(namespaceId, body as UpdateNamespaceRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('delete')\n .description('Soft-delete a namespace. Rejects if it has active inboxes.')\n .argument('<namespace-id>', 'The namespaceId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces delete ns_2345uvwx')\n .action(async (namespaceId, opts) => {\n try {\n if (!await confirmDelete('namespaces', namespaceId)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.namespaces.delete(namespaceId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type UpdateApiKeyRequest, type CreateApiKeyRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const apiKeysCommand = new Command('api-keys')\n .description('ApiKeys resource.');\n\napiKeysCommand\n .command('retrieve')\n .description('Returns API key metadata. The key value is never returned after creation.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys retrieve id_example')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.apiKeys.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\napiKeysCommand\n .command('update')\n .description('Update the key name, permissions, or restrict it to specific sending domains.')\n .argument('<id>', 'The id')\n .option('--name <value>', 'The name of the api key')\n .option('--status <value>', 'status')\n .option('--permission <value>', 'The permission type for the api key (required)')\n .option('--domain-ids <value>', 'The domain ids to restrict the api key to (only for sendingAccess)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys update id_example --permission sendingAccess\\n $ cat payload.json | nuntly api-keys update id_example\\n $ nuntly api-keys update id_example --file payload.json')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n status: opts.status,\n permission: opts.permission,\n domainIds: opts.domainIds != null ? (opts.domainIds as string).split(',') : undefined\n };\n const result = await withSpinner('Updating...', () => nuntly.apiKeys.update(id, body as UpdateApiKeyRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\napiKeysCommand\n .command('delete')\n .description('Revoke an API key. Requests authenticating with this key will be rejected immediately.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys delete id_example')\n .action(async (id, opts) => {\n try {\n if (!await confirmDelete('api keys', id)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.apiKeys.delete(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\napiKeysCommand\n .command('create')\n .description('Generate a new API key. The key value is only returned once — store it securely.')\n .option('--name <value>', 'The name of the api key')\n .option('--status <value>', 'The status for the api key')\n .option('--permission <value>', 'The permission type for the api key (required)')\n .option('--domain-ids <value>', 'The domain ids to restrict the api key to (only for sendingAccess)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys create --permission sendingAccess\\n $ cat payload.json | nuntly api-keys create\\n $ nuntly api-keys create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n status: opts.status,\n permission: opts.permission,\n domainIds: opts.domainIds != null ? (opts.domainIds as string).split(',') : undefined\n };\n const result = await withSpinner('Creating...', () => nuntly.apiKeys.create(body as CreateApiKeyRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\napiKeysCommand\n .command('list')\n .description('Returns all API keys for the organization. Key values are never included in list responses.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys list\\n $ nuntly api-keys list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.apiKeys.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","const COMMANDS = [\n\t\"login\",\n\t\"profiles\",\n\t\"completion\",\n\t\"emails\",\n\t\"domains\",\n\t\"webhooks\",\n\t\"organizations\",\n\t\"inboxes\",\n\t\"agents\",\n\t\"threads\",\n\t\"messages\",\n\t\"namespaces\",\n\t\"api-keys\",\n];\n\nconst SUBCOMMANDS: Record<string, string[]> = {\n\temails: [\n\t\t\"send\",\n\t\t\"list\",\n\t\t\"retrieve\",\n\t\t\"cancel\",\n\t\t\"stats\",\n\t\t\"events\",\n\t\t\"content\",\n\t\t\"bulk\",\n\t],\n\tdomains: [\"create\", \"list\", \"retrieve\", \"update\", \"delete\"],\n\twebhooks: [\"create\", \"list\", \"retrieve\", \"update\", \"delete\", \"events\"],\n\torganizations: [\"list\", \"retrieve\", \"usage\"],\n\tinboxes: [\n\t\t\"create\",\n\t\t\"list\",\n\t\t\"retrieve\",\n\t\t\"update\",\n\t\t\"delete\",\n\t\t\"threads\",\n\t\t\"messages\",\n\t],\n\tagents: [\"memory\"],\n\tthreads: [\"retrieve\", \"update\", \"messages\"],\n\tmessages: [\"list\", \"retrieve\", \"reply\", \"forward\", \"content\", \"attachments\"],\n\tnamespaces: [\"create\", \"list\", \"retrieve\", \"update\", \"delete\", \"inboxes\"],\n\t\"api-keys\": [\"create\", \"list\", \"retrieve\", \"update\", \"delete\"],\n};\n\nexport function bashCompletion(): string {\n\treturn `#!/bin/bash\n_nuntly_completions() {\n local cur prev commands\n cur=\"\\${COMP_WORDS[COMP_CWORD]}\"\n prev=\"\\${COMP_WORDS[COMP_CWORD-1]}\"\n\n commands=\"${COMMANDS.join(\" \")}\"\n\n case \"\\${COMP_CWORD}\" in\n 1)\n COMPREPLY=( $(compgen -W \"\\${commands}\" -- \"\\${cur}\") )\n ;;\n 2)\n case \"\\${prev}\" in\n${Object.entries(SUBCOMMANDS)\n\t.map(\n\t\t([cmd, subs]) =>\n\t\t\t` ${cmd}) COMPREPLY=( $(compgen -W \"${subs.join(\" \")}\" -- \"\\${cur}\") ) ;;`,\n\t)\n\t.join(\"\\n\")}\n *) ;;\n esac\n ;;\n *)\n COMPREPLY=( $(compgen -W \"--json --yaml --markdown --table --quiet --profile --help\" -- \"\\${cur}\") )\n ;;\n esac\n}\ncomplete -F _nuntly_completions nuntly`;\n}\n\nexport function zshCompletion(): string {\n\treturn `#compdef nuntly\n\n_nuntly() {\n local -a commands\n commands=(\n${COMMANDS.map((c) => ` '${c}:${c} command'`).join(\"\\n\")}\n )\n\n _arguments -C \\\\\n '1:command:->command' \\\\\n '*::arg:->args'\n\n case $state in\n command)\n _describe 'command' commands\n ;;\n args)\n case $words[1] in\n${Object.entries(SUBCOMMANDS)\n\t.map(\n\t\t([cmd, subs]) =>\n\t\t\t` ${cmd}) _values 'subcommand' ${subs.map((s) => `'${s}'`).join(\" \")} ;;`,\n\t)\n\t.join(\"\\n\")}\n esac\n ;;\n esac\n}\n\n_nuntly`;\n}\n\nexport function fishCompletion(): string {\n\tconst lines = COMMANDS.map(\n\t\t(c) => `complete -c nuntly -n '__fish_use_subcommand' -a '${c}'`,\n\t);\n\tfor (const [cmd, subs] of Object.entries(SUBCOMMANDS)) {\n\t\tfor (const sub of subs) {\n\t\t\tlines.push(\n\t\t\t\t`complete -c nuntly -n '__fish_seen_subcommand_from ${cmd}' -a '${sub}'`,\n\t\t\t);\n\t\t}\n\t}\n\treturn lines.join(\"\\n\");\n}\n\nexport function powershellCompletion(): string {\n\tconst subBlocks = Object.entries(SUBCOMMANDS)\n\t\t.map(\n\t\t\t([cmd, subs]) =>\n\t\t\t\t` '${cmd}' { @(${subs.map((s) => `'${s}'`).join(\", \")}) | Where-Object { $_ -like \"$wordToComplete*\" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) } }`,\n\t\t)\n\t\t.join(\"\\n\");\n\n\treturn `Register-ArgumentCompleter -CommandName nuntly -ScriptBlock {\n param($wordToComplete, $commandAst, $cursorPosition)\n $elements = $commandAst.CommandElements\n if ($elements.Count -le 2) {\n @(${COMMANDS.map((c) => `'${c}'`).join(\", \")}) | Where-Object { $_ -like \"$wordToComplete*\" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }\n } else {\n $cmd = $elements[1].ToString()\n switch ($cmd) {\n${subBlocks}\n }\n }\n}`;\n}\n"],"mappings":";;;AACA,SAAS,WAAAA,iBAAe;AACxB,OAAOC,SAAQ;;;ACFf,SAAS,eAAe;AACxB,SAAS,cAAqE;;;ACD9E,SAAS,gBAAgB;AACzB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,SAAS,gBAAgB;AAClC,SAAS,eAAe;AACxB,YAAY,OAAO;AACnB,OAAO,QAAQ;AAmBR,IAAM,aAAa,QAAQ,QAAQ,GAAG,SAAS;AAC/C,IAAM,cAAc,QAAQ,YAAY,aAAa;AAE5D,SAAS,gBAA8B;AACtC,MAAI,CAAC,WAAW,WAAW,EAAG,QAAO,CAAC;AACtC,MAAI;AACH,WAAO,KAAK,MAAM,aAAa,aAAa,OAAO,CAAC;AAAA,EACrD,QAAQ;AACP,WAAO,CAAC;AAAA,EACT;AACD;AAEA,SAAS,eACR,QACA,aACgB;AAEhB,MAAI,CAAC,OAAO,YAAY,OAAO,QAAQ;AACtC,WAAO;AAAA,MACN,QAAQ,OAAO;AAAA,MACf,SAAS,OAAO;AAAA,MAChB,cAAc,OAAO;AAAA,IACtB;AAAA,EACD;AACA,QAAM,OAAO,eAAe,OAAO,kBAAkB;AACrD,SAAO,OAAO,WAAW,IAAI,KAAK,CAAC;AACpC;AAEA,SAAS,wBAAwB,UAAwB;AACxD,MAAI,SAAS,MAAM,SAAS;AAC3B,QAAI;AACH;AAAA,QACC,WAAW,QAAQ;AAAA,QACnB,EAAE,OAAO,SAAS;AAAA,MACnB;AAAA,IACD,QAAQ;AAAA,IAER;AAAA,EACD,OAAO;AACN,cAAU,UAAU,GAAK;AAAA,EAC1B;AACD;AAEO,SAAS,Y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AAC;AAAA,MACrF,UAAS,QAAQ,OAAK,QAAQ,IAAI,CAAC,CAAC;AAC3C,CAAC;AAEH,QACG,QAAQ,YAAY,EACpB,YAAY,gCAAgC,EAC5C,SAAS,WAAW,4CAA4C,EAChE,OAAO,CAAC,UAAU;AACjB,UAAQ,OAAO;AAAA,IACb,KAAK;AAAQ,cAAQ,IAAI,eAAe,CAAC;AAAG;AAAA,IAC5C,KAAK;AAAO,cAAQ,IAAI,cAAc,CAAC;AAAG;AAAA,IAC1C,KAAK;AAAQ,cAAQ,IAAI,eAAe,CAAC;AAAG;AAAA,IAC5C,KAAK;AAAc,cAAQ,IAAI,qBAAqB,CAAC;AAAG;AAAA,IACxD;AAAS,cAAQ,MAAMA,IAAG,IAAI,oBAAoB,KAAK,CAAC;AAAG,cAAQ,KAAK,CAAC;AAAA,EAC3E;AACF,CAAC;AAEH,QAAQ,WAAW,aAAa;AAChC,QAAQ,WAAW,cAAc;AACjC,QAAQ,WAAW,eAAe;AAClC,QAAQ,WAAW,oBAAoB;AACvC,QAAQ,WAAW,cAAc;AACjC,QAAQ,WAAW,aAAa;AAChC,QAAQ,WAAW,cAAc;AACjC,QAAQ,WAAW,eAAe;AAClC,QAAQ,WAAW,iBAAiB;AACpC,QAAQ,WAAW,cAAc;AAEjC,QAAQ,MAAM;","names":["Command","pc","pc","pc","readFileSync","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","eventsSub","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","messagesSub","Nuntly","Command","Nuntly","Command","contentSub","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","pc"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/version.ts","../src/commands/emails.ts","../src/auth.ts","../src/output.ts","../src/spinner.ts","../src/files.ts","../src/commands/domains.ts","../src/commands/webhooks.ts","../src/commands/organizations.ts","../src/commands/inboxes.ts","../src/commands/agents.ts","../src/commands/threads.ts","../src/commands/messages.ts","../src/commands/namespaces.ts","../src/commands/api-keys.ts","../src/completion.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from '@commander-js/extra-typings';\nimport pc from 'picocolors';\nimport { CLI_VERSION } from './version.js';\n\nimport { emailsCommand } from './commands/emails.js';\nimport { domainsCommand } from './commands/domains.js';\nimport { webhooksCommand } from './commands/webhooks.js';\nimport { organizationsCommand } from './commands/organizations.js';\nimport { inboxesCommand } from './commands/inboxes.js';\nimport { agentsCommand } from './commands/agents.js';\nimport { threadsCommand } from './commands/threads.js';\nimport { messagesCommand } from './commands/messages.js';\nimport { namespacesCommand } from './commands/namespaces.js';\nimport { apiKeysCommand } from './commands/api-keys.js';\n\nconst program = new Command()\n .name('nuntly')\n .description(pc.bold('Nuntly CLI') + ' - Developer-first email platform')\n .version(CLI_VERSION)\n .option('--profile <name>', 'Use a specific profile from ~/.nuntly/config.json');\n\nimport { login, listProfiles } from './auth.js';\nimport { bashCompletion, zshCompletion, fishCompletion, powershellCompletion } from './completion.js';\n\nprogram\n .command('login')\n .description('Save your API key to ~/.nuntly/config.json')\n .argument('[profile]', 'Profile name (default: \"default\")')\n .action(async (profile) => { await login(profile); });\n\nprogram\n .command('profiles')\n .description('List configured profiles')\n .action(() => {\n const profiles = listProfiles();\n if (profiles.length === 0) console.log(pc.dim('No profiles configured. Run: nuntly login'));\n else profiles.forEach(n => console.log(n));\n });\n\nprogram\n .command('completion')\n .description('Output shell completion script')\n .argument('<shell>', 'Shell type: bash, zsh, fish, or powershell')\n .action((shell) => {\n switch (shell) {\n case 'bash': console.log(bashCompletion()); break;\n case 'zsh': console.log(zshCompletion()); break;\n case 'fish': console.log(fishCompletion()); break;\n case 'powershell': console.log(powershellCompletion()); break;\n default: console.error(pc.red('Unknown shell: ' + shell)); process.exit(1);\n }\n });\n\nprogram.addCommand(emailsCommand);\nprogram.addCommand(domainsCommand);\nprogram.addCommand(webhooksCommand);\nprogram.addCommand(organizationsCommand);\nprogram.addCommand(inboxesCommand);\nprogram.addCommand(agentsCommand);\nprogram.addCommand(threadsCommand);\nprogram.addCommand(messagesCommand);\nprogram.addCommand(namespacesCommand);\nprogram.addCommand(apiKeysCommand);\n\nprogram.parse();\n","// Auto-generated. DO NOT EDIT.\n// Source of truth: package.json version.\n\nexport const CLI_VERSION = '1.0.0-alpha.3';\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type CreateEmailRequest, type CreateBulkEmailsRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const emailsCommand = new Command('emails')\n .description('Emails resource.');\n\nconst statsSub = new Command('stats');\nemailsCommand.addCommand(statsSub);\n\nstatsSub\n .command('retrieve')\n .description('Returns aggregated daily sending statistics for the current period.')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails stats retrieve')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.stats.retrieve());\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst eventsSub = new Command('events');\nemailsCommand.addCommand(eventsSub);\n\neventsSub\n .command('list')\n .description('Returns the full delivery event history for an email (sent, delivered, opened, bounced, etc.).')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails events list em_1234abcd')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.events.list(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst contentSub = new Command('content');\nemailsCommand.addCommand(contentSub);\n\ncontentSub\n .command('retrieve')\n .description('Returns presigned URLs to download the HTML, plain-text, and raw MIME source of a sent email.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails content retrieve em_1234abcd')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.content.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst bulkSub = new Command('bulk');\nemailsCommand.addCommand(bulkSub);\n\nbulkSub\n .command('send')\n .description('Send up to 20 emails in a single request. Use `fallback` to set default values shared across all messages.')\n .option('--fallback <value>', 'Used as a fallback field email value if no value is present in emails')\n .option('--emails <value>', 'The bulk emails to send (required)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails bulk send --emails \"value\"\\n $ cat payload.json | nuntly emails bulk send\\n $ nuntly emails bulk send --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n fallback: opts.fallback != null ? JSON.parse(opts.fallback as string) : undefined,\n emails: JSON.parse(opts.emails as string)\n };\n const result = await withSpinner('Creating...', () => nuntly.emails.bulk.send(body as CreateBulkEmailsRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nbulkSub\n .command('list')\n .description('Returns the delivery status of all emails submitted in a bulk request.')\n .argument('<bulk-id>', 'The bulkId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails bulk list em_1234abcd')\n .action(async (bulkId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.bulk.list(bulkId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nemailsCommand\n .command('retrieve')\n .description('Returns an email with its current delivery status and metadata.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails retrieve em_1234abcd')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.emails.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nemailsCommand\n .command('list')\n .description('Returns sent emails ordered by submission date, newest first.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails list\\n $ nuntly emails list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.emails.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nemailsCommand\n .command('send')\n .description('Send transactional emails through Nuntly platform. It supports HTML and plain-text emails, attachments, labels, custom headers and scheduling.')\n .option('--from <value>', 'The e-mail address of the sender (required)')\n .option('--to <value>', 'The primary recipient(s) of the email (required)')\n .option('--cc <value>', 'The carbon copy recipient(s) of the email')\n .option('--bcc <value>', 'The blind carbon copy recipient(s) of the email')\n .option('--reply-to <value>', 'The email address where replies should be sent. If a recipient replies, the response will go to this address instead of the sender\\'s email address')\n .option('--subject <value>', 'The subject of the e-mail (required)')\n .option('--text <value>', 'The plaintext version of the email')\n .option('--html <value>', 'The HTML version of the email')\n .option('--headers <value>', 'The headers to add to the email')\n .option('--tags <value>', 'The tags to add to the email')\n .option('--attachments <value>', 'The attachements to add to the email')\n .option('--variables <value>', 'The variables for the template')\n .option('--scheduled-at <value>', 'The date at which the email is scheduled to be sent')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails send --from hello@acme.com --to user@example.com --subject \"Welcome aboard\"\\n $ cat payload.json | nuntly emails send\\n $ nuntly emails send --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n from: opts.from,\n to: (opts.to as string).split(','),\n cc: opts.cc != null ? (opts.cc as string).split(',') : undefined,\n bcc: opts.bcc != null ? (opts.bcc as string).split(',') : undefined,\n replyTo: opts.replyTo != null ? (opts.replyTo as string).split(',') : undefined,\n subject: opts.subject,\n text: opts.text,\n html: opts.html,\n headers: opts.headers != null ? JSON.parse(opts.headers as string) : undefined,\n tags: opts.tags != null ? JSON.parse(opts.tags as string) : undefined,\n attachments: opts.attachments != null ? JSON.parse(opts.attachments as string) : undefined,\n variables: opts.variables != null ? JSON.parse(opts.variables as string) : undefined,\n scheduledAt: opts.scheduledAt\n };\n const result = await withSpinner('Creating...', () => nuntly.emails.send(body as CreateEmailRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nemailsCommand\n .command('cancel')\n .description('Cancel a scheduled email before delivery. Only emails with `scheduled` status can be cancelled.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly emails cancel em_1234abcd')\n .action(async (id, opts) => {\n try {\n if (!await confirmDelete('emails', id)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.emails.cancel(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { execSync } from \"node:child_process\";\nimport {\n\tchmodSync,\n\texistsSync,\n\tmkdirSync,\n\treadFileSync,\n\twriteFileSync,\n} from \"node:fs\";\nimport { homedir, platform } from \"node:os\";\nimport { resolve } from \"node:path\";\nimport * as p from \"@clack/prompts\";\nimport pc from \"picocolors\";\n\nexport type OutputFormat = \"json\" | \"table\" | \"yaml\" | \"markdown\" | \"quiet\";\n\nexport interface ProfileConfig {\n\tapiKey?: string;\n\tbaseUrl?: string;\n\toutputFormat?: OutputFormat;\n}\n\nexport interface NuntlyConfig {\n\tdefaultProfile?: string;\n\tprofiles?: Record<string, ProfileConfig>;\n\t// Legacy flat fields (migrated to profiles.default on read)\n\tapiKey?: string;\n\tbaseUrl?: string;\n\toutputFormat?: OutputFormat;\n}\n\nexport const CONFIG_DIR = resolve(homedir(), \".nuntly\");\nexport const CONFIG_PATH = resolve(CONFIG_DIR, \"config.json\");\n\nfunction loadRawConfig(): NuntlyConfig {\n\tif (!existsSync(CONFIG_PATH)) return {};\n\ttry {\n\t\treturn JSON.parse(readFileSync(CONFIG_PATH, \"utf-8\"));\n\t} catch {\n\t\treturn {};\n\t}\n}\n\nfunction resolveProfile(\n\tconfig: NuntlyConfig,\n\tprofileName?: string,\n): ProfileConfig {\n\t// Legacy flat config: treat as default profile\n\tif (!config.profiles && config.apiKey) {\n\t\treturn {\n\t\t\tapiKey: config.apiKey,\n\t\t\tbaseUrl: config.baseUrl,\n\t\t\toutputFormat: config.outputFormat,\n\t\t};\n\t}\n\tconst name = profileName ?? config.defaultProfile ?? \"default\";\n\treturn config.profiles?.[name] ?? {};\n}\n\nfunction restrictFilePermissions(filePath: string): void {\n\tif (platform() === \"win32\") {\n\t\ttry {\n\t\t\texecSync(\n\t\t\t\t`icacls \"${filePath}\" /inheritance:r /grant:r \"%USERNAME%:(R,W)\" /q`,\n\t\t\t\t{ stdio: \"ignore\" },\n\t\t\t);\n\t\t} catch {\n\t\t\t// icacls may not be available in all Windows environments\n\t\t}\n\t} else {\n\t\tchmodSync(filePath, 0o600);\n\t}\n}\n\nexport function saveProfile(profileName: string, profile: ProfileConfig): void {\n\tmkdirSync(CONFIG_DIR, { recursive: true });\n\tconst config = loadRawConfig();\n\tif (!config.profiles) config.profiles = {};\n\tconfig.profiles[profileName] = {\n\t\t...config.profiles[profileName],\n\t\t...profile,\n\t};\n\tif (!config.defaultProfile) config.defaultProfile = profileName;\n\t// Remove legacy flat fields\n\tdelete config.apiKey;\n\tdelete config.baseUrl;\n\tdelete config.outputFormat;\n\twriteFileSync(CONFIG_PATH, JSON.stringify(config, null, 2) + \"\\n\", {\n\t\tmode: 0o600,\n\t});\n\trestrictFilePermissions(CONFIG_PATH);\n}\n\nexport function listProfiles(): string[] {\n\tconst config = loadRawConfig();\n\treturn Object.keys(config.profiles ?? {});\n}\n\nfunction getGlobalProfile(): string | undefined {\n\tconst idx = process.argv.indexOf(\"--profile\");\n\tif (idx >= 0 && idx + 1 < process.argv.length) return process.argv[idx + 1];\n\treturn process.env[\"NUNTLY_PROFILE\"] ?? undefined;\n}\n\nexport function resolveApiKey(flagKey?: string, profileName?: string): string {\n\tconst config = loadRawConfig();\n\tconst profile = resolveProfile(config, profileName ?? getGlobalProfile());\n\tconst key = flagKey ?? process.env[\"NUNTLY_API_KEY\"] ?? profile.apiKey;\n\tif (!key) {\n\t\tconsole.error(pc.red(\"Error: API key not found.\"));\n\t\tconsole.error(\n\t\t\t`Run ${pc.bold(\"nuntly login\")}, set ${pc.bold(\"NUNTLY_API_KEY\")} env var, or use ${pc.bold(\"--api-key\")}`,\n\t\t);\n\t\tif (profileName) console.error(pc.dim(`Profile: ${profileName}`));\n\t\tprocess.exit(1);\n\t}\n\tif (flagKey) {\n\t\tconsole.error(\n\t\t\tpc.yellow(\n\t\t\t\t\"Warning: passing API key via flag is less secure than env var.\",\n\t\t\t),\n\t\t);\n\t}\n\treturn key;\n}\n\nexport function resolveBaseUrl(\n\tflagUrl?: string,\n\tprofileName?: string,\n): string | undefined {\n\tconst config = loadRawConfig();\n\tconst profile = resolveProfile(config, profileName ?? getGlobalProfile());\n\treturn flagUrl ?? process.env[\"NUNTLY_BASE_URL\"] ?? profile.baseUrl;\n}\n\nexport function resolveOutputFormat(\n\tprofileName?: string,\n): OutputFormat | undefined {\n\tconst config = loadRawConfig();\n\tconst profile = resolveProfile(config, profileName);\n\treturn profile.outputFormat;\n}\n\nexport async function login(profileName?: string): Promise<void> {\n\tconst name = profileName ?? \"default\";\n\tp.intro(\n\t\tpc.bold(`Nuntly Login${name !== \"default\" ? ` (profile: ${name})` : \"\"}`),\n\t);\n\n\tconst apiKey = await p.text({\n\t\tmessage: \"Enter your API key\",\n\t\tplaceholder: \"nuntly_sk_...\",\n\t\tvalidate: (value) => {\n\t\t\tif (!value || value.trim().length === 0) return \"API key is required\";\n\t\t\treturn undefined;\n\t\t},\n\t});\n\n\tif (p.isCancel(apiKey)) {\n\t\tp.cancel(\"Login cancelled.\");\n\t\tprocess.exit(0);\n\t}\n\n\tconst baseUrl = await p.text({\n\t\tmessage: \"API base URL (leave empty for default)\",\n\t\tplaceholder: \"https://api.nuntly.com\",\n\t});\n\n\tif (p.isCancel(baseUrl)) {\n\t\tp.cancel(\"Login cancelled.\");\n\t\tprocess.exit(0);\n\t}\n\n\tconst profile: ProfileConfig = { apiKey: apiKey.trim() };\n\tif (baseUrl && baseUrl.trim()) profile.baseUrl = baseUrl.trim();\n\n\tsaveProfile(name, profile);\n\n\tp.note(`Profile \"${name}\" saved to ${pc.dim(CONFIG_PATH)}`, \"Saved\");\n\tp.outro(pc.green(\"Logged in successfully.\"));\n}\n\nexport async function confirmDelete(\n\tresource: string,\n\tid: string,\n): Promise<boolean> {\n\tconst result = await p.confirm({\n\t\tmessage: `Delete ${resource} ${pc.bold(id)}?`,\n\t});\n\tif (p.isCancel(result)) return false;\n\treturn result;\n}\n","import pc from \"picocolors\";\n\nexport type OutputFormat =\n\t| \"json\"\n\t| \"raw\"\n\t| \"table\"\n\t| \"yaml\"\n\t| \"csv\"\n\t| \"markdown\"\n\t| \"quiet\";\n\nexport interface OutputOpts {\n\tformat?: string;\n\tquiet?: boolean;\n\traw?: boolean;\n\tfields?: string;\n\theader?: boolean;\n}\n\nfunction extractItems(data: unknown): Record<string, unknown>[] | null {\n\tif (\n\t\tdata &&\n\t\ttypeof data === \"object\" &&\n\t\t\"data\" in data &&\n\t\tArray.isArray((data as any).data)\n\t)\n\t\treturn (data as any).data;\n\tif (Array.isArray(data)) return data;\n\treturn null;\n}\n\nfunction resolveKeys(\n\titems: Record<string, unknown>[],\n\tfields?: string[],\n): string[] {\n\tconst allKeys = Object.keys(items[0]);\n\tif (!fields) return allKeys;\n\treturn fields.filter((f) => allKeys.includes(f));\n}\n\nexport function formatOutput(\n\tdata: unknown,\n\tformat: OutputFormat,\n\topts?: { fields?: string[]; noHeader?: boolean },\n): string {\n\tconst fields = opts?.fields;\n\tconst noHeader = opts?.noHeader ?? false;\n\n\tif (format === \"quiet\") {\n\t\tif (data && typeof data === \"object\" && \"id\" in data) {\n\t\t\treturn String((data as Record<string, unknown>).id);\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tif (format === \"table\") {\n\t\tconst items = extractItems(data);\n\n\t\tif (items) {\n\t\t\tif (items.length === 0) return pc.dim(\"No results.\");\n\t\t\tconst keys = resolveKeys(items, fields);\n\t\t\tconst widths = keys.map((k) =>\n\t\t\t\tMath.max(\n\t\t\t\t\tk.length,\n\t\t\t\t\t...items.map((r: any) => String(r[k] ?? \"\").slice(0, 40).length),\n\t\t\t\t),\n\t\t\t);\n\t\t\tconst rows = items.map((r: any) =>\n\t\t\t\tkeys\n\t\t\t\t\t.map((k, i) =>\n\t\t\t\t\t\tString(r[k] ?? \"\")\n\t\t\t\t\t\t\t.slice(0, 40)\n\t\t\t\t\t\t\t.padEnd(widths[i]),\n\t\t\t\t\t)\n\t\t\t\t\t.join(\" \"),\n\t\t\t);\n\n\t\t\tconst parts: string[] = [];\n\t\t\tif (!noHeader) {\n\t\t\t\tconst header = keys\n\t\t\t\t\t.map((k, i) => pc.bold(k.padEnd(widths[i])))\n\t\t\t\t\t.join(\" \");\n\t\t\t\tparts.push(header, pc.dim(\"-\".repeat(header.length)));\n\t\t\t}\n\t\t\tparts.push(...rows);\n\t\t\tconst result = parts.join(\"\\n\");\n\n\t\t\tconst nextCursor = (data as any)?.nextCursor;\n\t\t\tif (nextCursor)\n\t\t\t\treturn result + \"\\n\" + pc.dim(`next: --cursor ${nextCursor}`);\n\t\t\treturn result;\n\t\t}\n\n\t\treturn JSON.stringify(data, null, 2);\n\t}\n\n\tif (format === \"raw\") {\n\t\treturn JSON.stringify(data);\n\t}\n\n\tif (format === \"yaml\") {\n\t\treturn toYaml(data);\n\t}\n\n\tif (format === \"csv\") {\n\t\tconst items = extractItems(data);\n\n\t\tconst escapeCsv = (v: unknown): string => {\n\t\t\tconst s =\n\t\t\t\ttypeof v === \"object\" && v !== null\n\t\t\t\t\t? JSON.stringify(v)\n\t\t\t\t\t: String(v ?? \"\");\n\t\t\treturn s.includes(\",\") || s.includes('\"') || s.includes(\"\\n\")\n\t\t\t\t? `\"${s.replace(/\"/g, '\"\"')}\"`\n\t\t\t\t: s;\n\t\t};\n\n\t\tif (items && items.length > 0) {\n\t\t\tconst keys = resolveKeys(items, fields);\n\t\t\tconst rows = items.map((r: any) =>\n\t\t\t\tkeys.map((k) => escapeCsv(r[k])).join(\",\"),\n\t\t\t);\n\t\t\tif (noHeader) return rows.join(\"\\r\\n\");\n\t\t\treturn [keys.join(\",\"), ...rows].join(\"\\r\\n\");\n\t\t}\n\n\t\tif (data && typeof data === \"object\") {\n\t\t\tconst entries = Object.entries(data as Record<string, unknown>);\n\t\t\tif (noHeader)\n\t\t\t\treturn entries.map(([k, v]) => `${k},${escapeCsv(v)}`).join(\"\\r\\n\");\n\t\t\treturn [\n\t\t\t\t\"field,value\",\n\t\t\t\t...entries.map(([k, v]) => `${k},${escapeCsv(v)}`),\n\t\t\t].join(\"\\r\\n\");\n\t\t}\n\n\t\treturn String(data);\n\t}\n\n\tif (format === \"markdown\") {\n\t\tconst items = extractItems(data);\n\n\t\tif (items && items.length > 0) {\n\t\t\tconst keys = resolveKeys(items, fields);\n\t\t\tconst header = \"| \" + keys.join(\" | \") + \" |\";\n\t\t\tconst sep = \"| \" + keys.map(() => \"---\").join(\" | \") + \" |\";\n\t\t\tconst rows = items.map(\n\t\t\t\t(r: any) =>\n\t\t\t\t\t\"| \" +\n\t\t\t\t\tkeys.map((k) => String(r[k] ?? \"\").slice(0, 60)).join(\" | \") +\n\t\t\t\t\t\" |\",\n\t\t\t);\n\t\t\tif (noHeader) return rows.join(\"\\n\");\n\t\t\treturn [header, sep, ...rows].join(\"\\n\");\n\t\t}\n\n\t\tif (data && typeof data === \"object\") {\n\t\t\tconst entries = Object.entries(data as Record<string, unknown>);\n\t\t\tconst header = \"| Field | Value |\";\n\t\t\tconst sep = \"| --- | --- |\";\n\t\t\tconst rows = entries.map(\n\t\t\t\t([k, v]) =>\n\t\t\t\t\t`| ${k} | ${typeof v === \"object\" ? JSON.stringify(v) : String(v)} |`,\n\t\t\t);\n\t\t\tif (noHeader) return rows.join(\"\\n\");\n\t\t\treturn [header, sep, ...rows].join(\"\\n\");\n\t\t}\n\n\t\treturn String(data);\n\t}\n\n\treturn JSON.stringify(data, null, 2);\n}\n\nfunction toYaml(data: unknown, indent = 0): string {\n\tconst prefix = \" \".repeat(indent);\n\tif (data === null || data === undefined) return `${prefix}null`;\n\tif (typeof data === \"string\")\n\t\treturn data.includes(\"\\n\") ? `${prefix}|\\\\n${data}` : `${prefix}${data}`;\n\tif (typeof data === \"number\" || typeof data === \"boolean\")\n\t\treturn `${prefix}${data}`;\n\tif (Array.isArray(data)) {\n\t\tif (data.length === 0) return `${prefix}[]`;\n\t\treturn data\n\t\t\t.map((item) => {\n\t\t\t\tif (typeof item === \"object\" && item !== null) {\n\t\t\t\t\tconst inner = toYaml(item, indent + 1).trim();\n\t\t\t\t\treturn `${prefix}- ${inner.replace(/\\n/g, \"\\n\" + prefix + \" \")}`;\n\t\t\t\t}\n\t\t\t\treturn `${prefix}- ${item}`;\n\t\t\t})\n\t\t\t.join(\"\\n\");\n\t}\n\tif (typeof data === \"object\") {\n\t\treturn Object.entries(data as Record<string, unknown>)\n\t\t\t.map(([key, value]) => {\n\t\t\t\tif (value === null || value === undefined)\n\t\t\t\t\treturn `${prefix}${key}: null`;\n\t\t\t\tif (typeof value === \"object\")\n\t\t\t\t\treturn `${prefix}${key}:\\n${toYaml(value, indent + 1)}`;\n\t\t\t\treturn `${prefix}${key}: ${value}`;\n\t\t\t})\n\t\t\t.join(\"\\n\");\n\t}\n\treturn `${prefix}${String(data)}`;\n}\n\nexport function printResult(data: unknown, opts: OutputOpts) {\n\tlet format: OutputFormat;\n\tif (opts.quiet) format = \"quiet\";\n\telse if (opts.raw) format = \"raw\";\n\telse if (opts.format) format = opts.format as OutputFormat;\n\telse if (!process.stdout.isTTY) format = \"json\";\n\telse {\n\t\tconst isArray =\n\t\t\tArray.isArray(data) ||\n\t\t\t(data &&\n\t\t\t\ttypeof data === \"object\" &&\n\t\t\t\t\"data\" in data &&\n\t\t\t\tArray.isArray((data as any).data));\n\t\tformat = isArray ? \"table\" : \"json\";\n\t}\n\n\tconst fields = opts.fields?.split(\",\").map((f) => f.trim());\n\tconst noHeader = opts.header === false;\n\tconst output = formatOutput(data, format, { fields, noHeader });\n\tif (output) console.log(output);\n}\n\nfunction isJsonMode(opts?: OutputOpts): boolean {\n\tif (opts?.format === \"json\" || opts?.raw) return true;\n\tif (!opts?.format && !opts?.quiet && !process.stdout.isTTY) return true;\n\treturn false;\n}\n\nexport function printError(error: unknown, opts?: OutputOpts) {\n\tconst e = error as any;\n\tconst isApi = !!e?.status;\n\n\tif (isJsonMode(opts)) {\n\t\tconst envelope = {\n\t\t\terror: {\n\t\t\t\tcode: isApi ? `HTTP_${e.status}` : \"CLIENT_ERROR\",\n\t\t\t\tmessage: e?.body?.message ?? e?.message ?? String(error),\n\t\t\t\t...(e?.requestId && { requestId: e.requestId }),\n\t\t\t\t...(e?.body?.errors && { fields: e.body.errors }),\n\t\t\t},\n\t\t};\n\t\tconsole.error(JSON.stringify(envelope));\n\t} else {\n\t\tif (isApi) {\n\t\t\tconsole.error(\n\t\t\t\tpc.red(`HTTP ${e.status}: ${e.body?.message ?? e.message}`),\n\t\t\t);\n\t\t\tif (e.requestId) console.error(pc.dim(`request: ${e.requestId}`));\n\t\t\tif (e.body?.errors) {\n\t\t\t\tfor (const err of e.body.errors) {\n\t\t\t\t\tconsole.error(pc.yellow(` ${err.field}: ${err.message}`));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(pc.red(e?.message ?? String(error)));\n\t\t}\n\t}\n\n\tprocess.exit(isApi ? 1 : 2);\n}\n","import pc from \"picocolors\";\n\nconst isLegacyWindows =\n\tprocess.platform === \"win32\" &&\n\t!process.env[\"WT_SESSION\"] &&\n\t!process.env[\"TERM_PROGRAM\"];\n\nconst FRAMES = isLegacyWindows\n\t? [\"|\", \"/\", \"-\", \"\\\\\"]\n\t: [\n\t\t\t\"\\u280B\",\n\t\t\t\"\\u2819\",\n\t\t\t\"\\u2839\",\n\t\t\t\"\\u2838\",\n\t\t\t\"\\u283C\",\n\t\t\t\"\\u2834\",\n\t\t\t\"\\u2826\",\n\t\t\t\"\\u2827\",\n\t\t\t\"\\u2807\",\n\t\t\t\"\\u280F\",\n\t\t];\n\nconst INTERVAL = 80;\n\nexport async function withSpinner<T>(\n\tmessage: string,\n\tfn: () => Promise<T>,\n): Promise<T> {\n\tif (!process.stderr.isTTY) return fn();\n\n\tlet i = 0;\n\tconst timer = setInterval(() => {\n\t\tconst frame = FRAMES[i++ % FRAMES.length];\n\t\tprocess.stderr.write(`\\r${pc.cyan(frame)} ${pc.dim(message)}`);\n\t}, INTERVAL);\n\n\ttry {\n\t\treturn await fn();\n\t} finally {\n\t\tclearInterval(timer);\n\t\tprocess.stderr.write(`\\r${\" \".repeat(message.length + 4)}\\r`);\n\t}\n}\n","import { readFileSync, readSync } from \"node:fs\";\n\nfunction readStdin(): string {\n\tconst chunks: Buffer[] = [];\n\tconst buf = Buffer.alloc(4096);\n\ttry {\n\t\tlet bytesRead: number;\n\t\twhile ((bytesRead = readSync(0, buf, 0, buf.length, null)) > 0) {\n\t\t\tchunks.push(buf.subarray(0, bytesRead));\n\t\t}\n\t} catch (e: any) {\n\t\tif (e.code !== \"EOF\" && e.code !== \"EAGAIN\") throw e;\n\t}\n\treturn Buffer.concat(chunks).toString(\"utf-8\");\n}\n\nexport function readInput(filePath: string): unknown {\n\tconst raw = filePath === \"-\" ? readStdin() : readFileSync(filePath, \"utf-8\");\n\treturn JSON.parse(raw);\n}\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type CreateDomainRequest, type UpdateDomainRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const domainsCommand = new Command('domains')\n .description('Domains resource.');\n\ndomainsCommand\n .command('list')\n .description('Returns all domains with their verification and capability status.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains list\\n $ nuntly domains list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.domains.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ndomainsCommand\n .command('retrieve')\n .description('Returns a domain with its DNS record configuration and current verification status for each record.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains retrieve dm_5678efgh')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.domains.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ndomainsCommand\n .command('delete')\n .description('Permanently deletes a domain along with its inboxes, received messages, attachments, and sending configuration. This action is irreversible.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains delete dm_5678efgh')\n .action(async (id, opts) => {\n try {\n if (!await confirmDelete('domains', id)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.domains.delete(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ndomainsCommand\n .command('create')\n .description('Add a domain to start configuring DNS records for sending or receiving emails.')\n .option('--name <value>', 'The name of the domain to send e-mails\\' (required)')\n .option('--sending', 'Enable sending')\n .option('--receiving', 'Enable receiving')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains create --name my-resource\\n $ cat payload.json | nuntly domains create\\n $ nuntly domains create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n sending: opts.sending,\n receiving: opts.receiving\n };\n const result = await withSpinner('Creating...', () => nuntly.domains.create(body as CreateDomainRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ndomainsCommand\n .command('update')\n .description('Toggle sending, receiving, open tracking, or click tracking capabilities for a domain.')\n .argument('<id>', 'The id')\n .option('--open-tracking', 'Emit an event for each recipient opens an email their email client')\n .option('--click-tracking', 'Emit an event for each time the recipient clicks a link in the email')\n .option('--sending', 'Enable or disable sending')\n .option('--receiving', 'Enable or disable receiving')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly domains update dm_5678efgh\\n $ cat payload.json | nuntly domains update dm_5678efgh\\n $ nuntly domains update dm_5678efgh --file payload.json')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n openTracking: opts.openTracking,\n clickTracking: opts.clickTracking,\n sending: opts.sending,\n receiving: opts.receiving\n };\n const result = await withSpinner('Updating...', () => nuntly.domains.update(id, body as UpdateDomainRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type UpdateWebhookRequest, type CreateWebhookRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const webhooksCommand = new Command('webhooks')\n .description('Webhooks resource.');\n\nconst eventsSub = new Command('events');\nwebhooksCommand.addCommand(eventsSub);\n\neventsSub\n .command('list')\n .description('Returns recent webhook events across all registered endpoints.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks events list\\n $ nuntly webhooks events list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.webhooks.events.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\neventsSub\n .command('replay')\n .description('Re-deliver a webhook event to its endpoint. Useful for retrying failed deliveries.')\n .argument('<id>', 'The id')\n .argument('<event-id>', 'The eventId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks events replay wh_9012ijkl wh_9012ijkl')\n .action(async (id, eventId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Creating...', () => nuntly.webhooks.events.replay(id, eventId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\neventsSub\n .command('deliveries')\n .description('Returns all delivery attempts for a webhook event, including HTTP status codes and response times.')\n .argument('<id>', 'The id')\n .argument('<event-id>', 'The eventId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks events deliveries wh_9012ijkl wh_9012ijkl')\n .action(async (id, eventId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.webhooks.events.deliveries(id, eventId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('retrieve')\n .description('Returns a webhook endpoint with its URL, subscribed events, and configuration.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks retrieve wh_9012ijkl')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.webhooks.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('update')\n .description('Update the endpoint URL, subscribed event types, or rotate the signing secret.')\n .argument('<id>', 'The id')\n .option('--name <value>', 'The name of the webhook')\n .option('--endpoint-url <value>', 'The endpoint URL of the webhook')\n .option('--events <value>', 'The event types to subscribe to')\n .option('--status <value>', 'The status of the webhook.')\n .option('--rotate-secret', 'If true, a new signing secret will be generated')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks update wh_9012ijkl\\n $ cat payload.json | nuntly webhooks update wh_9012ijkl\\n $ nuntly webhooks update wh_9012ijkl --file payload.json')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n endpointUrl: opts.endpointUrl,\n events: opts.events != null ? (opts.events as string).split(',') : undefined,\n status: opts.status,\n rotateSecret: opts.rotateSecret\n };\n const result = await withSpinner('Updating...', () => nuntly.webhooks.update(id, body as UpdateWebhookRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('delete')\n .description('Remove a webhook endpoint. No further events will be delivered to this URL.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks delete wh_9012ijkl')\n .action(async (id, opts) => {\n try {\n if (!await confirmDelete('webhooks', id)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.webhooks.delete(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('create')\n .description('Register an endpoint to start receiving webhook events for your organization.')\n .option('--name <value>', 'The name of the webhook')\n .option('--endpoint-url <value>', 'The endpoint URL of the webhook (required)')\n .option('--status <value>', 'The status of the webhook.')\n .option('--events <value>', 'The event types to subscribe to (required)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks create --endpoint-url https://acme.com/webhooks --events email.sent,email.delivered\\n $ cat payload.json | nuntly webhooks create\\n $ nuntly webhooks create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n endpointUrl: opts.endpointUrl,\n status: opts.status,\n events: (opts.events as string).split(',')\n };\n const result = await withSpinner('Creating...', () => nuntly.webhooks.create(body as CreateWebhookRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nwebhooksCommand\n .command('list')\n .description('Returns all registered webhook endpoints for the organization.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly webhooks list\\n $ nuntly webhooks list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.webhooks.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\n\nexport const organizationsCommand = new Command('organizations')\n .description('Organizations resource.');\n\nconst usageSub = new Command('usage');\norganizationsCommand.addCommand(usageSub);\n\nusageSub\n .command('retrieve')\n .description('Returns current period usage metrics (daily and monthly) for sending and receiving, against your plan limits.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly organizations usage retrieve org_8901klmn')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.organizations.usage.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\norganizationsCommand\n .command('list')\n .description('Returns all organizations the authenticated user belongs to.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly organizations list\\n $ nuntly organizations list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.organizations.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\norganizationsCommand\n .command('retrieve')\n .description('Returns the organization\\'s profile, plan, region, and account status.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly organizations retrieve org_8901klmn')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.organizations.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type CreateInboxRequest, type UpdateInboxRequest, type SendMessageRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const inboxesCommand = new Command('inboxes')\n .description('Inboxes resource.');\n\nconst threadsSub = new Command('threads');\ninboxesCommand.addCommand(threadsSub);\n\nthreadsSub\n .command('list')\n .description('List threads in an inbox.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes threads list ib_7890qrst\\n $ nuntly inboxes threads list ib_7890qrst --format json | jq \\'.data[].id\\'')\n .action(async (inboxId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.inboxes.threads.list(inboxId, { cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst messagesSub = new Command('messages');\ninboxesCommand.addCommand(messagesSub);\n\nmessagesSub\n .command('send')\n .description('Send a new message from an inbox.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--to <value>', 'The recipient addresses. (required)')\n .option('--cc <value>', 'The CC addresses.')\n .option('--bcc <value>', 'The BCC addresses.')\n .option('--subject <value>', 'The message subject. (required)')\n .option('--text <value>', 'The plain text body.')\n .option('--html <value>', 'The HTML body.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes messages send ib_7890qrst --to user@example.com --subject \"Welcome aboard\"\\n $ cat payload.json | nuntly inboxes messages send ib_7890qrst\\n $ nuntly inboxes messages send ib_7890qrst --file payload.json')\n .action(async (inboxId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n to: (opts.to as string).split(','),\n cc: opts.cc != null ? (opts.cc as string).split(',') : undefined,\n bcc: opts.bcc != null ? (opts.bcc as string).split(',') : undefined,\n subject: opts.subject,\n text: opts.text,\n html: opts.html\n };\n const result = await withSpinner('Creating...', () => nuntly.inboxes.messages.send(inboxId, body as SendMessageRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('create')\n .description('Create a new inbox on a verified domain.')\n .option('--domain-id <value>', 'The id of the domain for this inbox. Defaults to your provided domain when omitted.')\n .option('--address <value>', 'The local-part of the email address (before the @). (required)')\n .option('--name <value>', 'The display name of the inbox.')\n .option('--namespace-id <value>', 'The id of the namespace to assign the inbox to.')\n .option('--agent-id <value>', 'The external AI agent identifier.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes create --address support\\n $ cat payload.json | nuntly inboxes create\\n $ nuntly inboxes create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n domainId: opts.domainId,\n address: opts.address,\n name: opts.name,\n namespaceId: opts.namespaceId,\n agentId: opts.agentId\n };\n const result = await withSpinner('Creating...', () => nuntly.inboxes.create(body as CreateInboxRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('list')\n .description('List all inboxes.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes list\\n $ nuntly inboxes list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.inboxes.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('retrieve')\n .description('Retrieve an inbox with thread stats.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes retrieve ib_7890qrst')\n .action(async (inboxId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.inboxes.retrieve(inboxId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('update')\n .description('Update an inbox.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--name <value>', 'The display name of the inbox.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes update ib_7890qrst\\n $ cat payload.json | nuntly inboxes update ib_7890qrst\\n $ nuntly inboxes update ib_7890qrst --file payload.json')\n .action(async (inboxId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name\n };\n const result = await withSpinner('Updating...', () => nuntly.inboxes.update(inboxId, body as UpdateInboxRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\ninboxesCommand\n .command('delete')\n .description('Soft-delete an inbox.')\n .argument('<inbox-id>', 'The inboxId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly inboxes delete ib_7890qrst')\n .action(async (inboxId, opts) => {\n try {\n if (!await confirmDelete('inboxes', inboxId)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.inboxes.delete(inboxId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type AgentMemoryRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const agentsCommand = new Command('agents')\n .description('Agents resource.');\n\nconst memorySub = new Command('memory');\nagentsCommand.addCommand(memorySub);\n\nmemorySub\n .command('retrieve')\n .description('Retrieve the memory for an AI agent.')\n .argument('<agent-id>', 'The agentId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly agents memory retrieve ag_6789yzab')\n .action(async (agentId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.agents.memory.retrieve(agentId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmemorySub\n .command('upsert')\n .description('Create or update the memory for an AI agent.')\n .argument('<agent-id>', 'The agentId')\n .option('--inbox-id <value>', 'The inbox id to scope the memory to.')\n .option('--thread-id <value>', 'The thread id to scope the memory to.')\n .option('--memory <value>', 'The agent memory key-value data. (required)')\n .option('--summary <value>', 'A human-readable conversation summary.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly agents memory upsert ag_6789yzab --memory \"value\"\\n $ cat payload.json | nuntly agents memory upsert ag_6789yzab\\n $ nuntly agents memory upsert ag_6789yzab --file payload.json')\n .action(async (agentId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n inboxId: opts.inboxId,\n threadId: opts.threadId,\n memory: JSON.parse(opts.memory as string),\n summary: opts.summary\n };\n const result = await withSpinner('Updating...', () => nuntly.agents.memory.upsert(agentId, body as AgentMemoryRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type UpdateThreadRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const threadsCommand = new Command('threads')\n .description('Threads resource.');\n\nconst messagesSub = new Command('messages');\nthreadsCommand.addCommand(messagesSub);\n\nmessagesSub\n .command('list')\n .description('List messages in a thread (chronological order).')\n .argument('<thread-id>', 'The threadId')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly threads messages list th_0123cdef\\n $ nuntly threads messages list th_0123cdef --format json | jq \\'.data[].id\\'')\n .action(async (threadId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.threads.messages.list(threadId, { cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nthreadsCommand\n .command('retrieve')\n .description('Retrieve a thread. Pass ?markRead=true to automatically remove the unread label from all messages.')\n .argument('<thread-id>', 'The threadId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly threads retrieve th_0123cdef')\n .action(async (threadId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.threads.retrieve(threadId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nthreadsCommand\n .command('update')\n .description('Update thread labels and agent assignment. Label operations apply to all messages in the thread.')\n .argument('<thread-id>', 'The threadId')\n .option('--add-labels <value>', 'Labels to add to all messages in the thread.')\n .option('--remove-labels <value>', 'Labels to remove from all messages in the thread.')\n .option('--agent-id <value>', 'The AI agent identifier.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly threads update th_0123cdef\\n $ cat payload.json | nuntly threads update th_0123cdef\\n $ nuntly threads update th_0123cdef --file payload.json')\n .action(async (threadId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n addLabels: opts.addLabels != null ? (opts.addLabels as string).split(',') : undefined,\n removeLabels: opts.removeLabels != null ? (opts.removeLabels as string).split(',') : undefined,\n agentId: opts.agentId\n };\n const result = await withSpinner('Updating...', () => nuntly.threads.update(threadId, body as UpdateThreadRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type UpdateMessageRequest, type ReplyMessageRequest, type ForwardMessageRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const messagesCommand = new Command('messages')\n .description('Messages resource.');\n\nconst contentSub = new Command('content');\nmessagesCommand.addCommand(contentSub);\n\ncontentSub\n .command('retrieve')\n .description('Returns presigned URLs to download the HTML, plain-text, and raw MIME source of a received message.')\n .argument('<message-id>', 'The messageId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages content retrieve mg_4567ghij')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.messages.content.retrieve(messageId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nconst attachmentsSub = new Command('attachments');\nmessagesCommand.addCommand(attachmentsSub);\n\nattachmentsSub\n .command('list')\n .description('List all attachments for a message.')\n .argument('<message-id>', 'The messageId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages attachments list mg_4567ghij')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.messages.attachments.list(messageId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nattachmentsSub\n .command('retrieve')\n .description('Retrieve an attachment with a presigned download URL.')\n .argument('<message-id>', 'The messageId')\n .argument('<attachment-id>', 'The attachmentId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages attachments retrieve mg_4567ghij mg_4567ghij')\n .action(async (messageId, attachmentId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.messages.attachments.retrieve(messageId, attachmentId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('list')\n .description('List all received messages across inboxes.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages list\\n $ nuntly messages list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.messages.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('retrieve')\n .description('Retrieve a single message with inbox enrichment.')\n .argument('<message-id>', 'The messageId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages retrieve mg_4567ghij')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.messages.retrieve(messageId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('update')\n .description('Update message labels. Only available for messages in user-created inboxes.')\n .argument('<message-id>', 'The messageId')\n .option('--add-labels <value>', 'Labels to add to the message.')\n .option('--remove-labels <value>', 'Labels to remove from the message.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages update mg_4567ghij\\n $ cat payload.json | nuntly messages update mg_4567ghij\\n $ nuntly messages update mg_4567ghij --file payload.json')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n addLabels: opts.addLabels != null ? (opts.addLabels as string).split(',') : undefined,\n removeLabels: opts.removeLabels != null ? (opts.removeLabels as string).split(',') : undefined\n };\n const result = await withSpinner('Updating...', () => nuntly.messages.update(messageId, body as UpdateMessageRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('reply')\n .description('Reply to a message. Set replyAll to true to reply to all recipients.')\n .argument('<message-id>', 'The messageId')\n .option('--text <value>', 'The plain text body.')\n .option('--html <value>', 'The HTML body.')\n .option('--reply-all', 'Whether to reply to all recipients. (required)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages reply mg_4567ghij --reply-all\\n $ cat payload.json | nuntly messages reply mg_4567ghij\\n $ nuntly messages reply mg_4567ghij --file payload.json')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n text: opts.text,\n html: opts.html,\n replyAll: opts.replyAll\n };\n const result = await withSpinner('Creating...', () => nuntly.messages.reply(messageId, body as ReplyMessageRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nmessagesCommand\n .command('forward')\n .description('Forward a message to new recipients.')\n .argument('<message-id>', 'The messageId')\n .option('--to <value>', 'The recipient addresses to forward to. (required)')\n .option('--text <value>', 'An optional comment to prepend.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly messages forward mg_4567ghij --to user@example.com\\n $ cat payload.json | nuntly messages forward mg_4567ghij\\n $ nuntly messages forward mg_4567ghij --file payload.json')\n .action(async (messageId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n to: (opts.to as string).split(','),\n text: opts.text\n };\n const result = await withSpinner('Creating...', () => nuntly.messages.forward(messageId, body as ForwardMessageRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type CreateNamespaceRequest, type UpdateNamespaceRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const namespacesCommand = new Command('namespaces')\n .description('Namespaces resource.');\n\nconst inboxesSub = new Command('inboxes');\nnamespacesCommand.addCommand(inboxesSub);\n\ninboxesSub\n .command('list')\n .description('List inboxes in a namespace.')\n .argument('<namespace-id>', 'The namespaceId')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces inboxes list ib_7890qrst\\n $ nuntly namespaces inboxes list ib_7890qrst --format json | jq \\'.data[].id\\'')\n .action(async (namespaceId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.namespaces.inboxes.list(namespaceId, { cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('create')\n .description('Create a new namespace.')\n .option('--name <value>', 'The display name of the namespace. (required)')\n .option('--external-id <value>', 'An optional external identifier for the namespace.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces create --name my-resource\\n $ cat payload.json | nuntly namespaces create\\n $ nuntly namespaces create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n externalId: opts.externalId\n };\n const result = await withSpinner('Creating...', () => nuntly.namespaces.create(body as CreateNamespaceRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('list')\n .description('List all namespaces.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces list\\n $ nuntly namespaces list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.namespaces.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('retrieve')\n .description('Retrieve a namespace with inbox stats.')\n .argument('<namespace-id>', 'The namespaceId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces retrieve ns_2345uvwx')\n .action(async (namespaceId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.namespaces.retrieve(namespaceId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('update')\n .description('Update a namespace.')\n .argument('<namespace-id>', 'The namespaceId')\n .option('--name <value>', 'The display name of the namespace.')\n .option('--external-id <value>', 'An optional external identifier for the namespace.')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces update ns_2345uvwx\\n $ cat payload.json | nuntly namespaces update ns_2345uvwx\\n $ nuntly namespaces update ns_2345uvwx --file payload.json')\n .action(async (namespaceId, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n externalId: opts.externalId\n };\n const result = await withSpinner('Updating...', () => nuntly.namespaces.update(namespaceId, body as UpdateNamespaceRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\nnamespacesCommand\n .command('delete')\n .description('Soft-delete a namespace. Rejects if it has active inboxes.')\n .argument('<namespace-id>', 'The namespaceId')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly namespaces delete ns_2345uvwx')\n .action(async (namespaceId, opts) => {\n try {\n if (!await confirmDelete('namespaces', namespaceId)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.namespaces.delete(namespaceId));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","import { Command } from '@commander-js/extra-typings';\nimport { Nuntly, type UpdateApiKeyRequest, type CreateApiKeyRequest } from '@nuntly/sdk';\nimport { resolveApiKey, resolveBaseUrl, confirmDelete } from '../auth.js';\nimport { CLI_VERSION } from '../version.js';\nimport { printResult, printError } from '../output.js';\nimport { withSpinner } from '../spinner.js';\nimport { readInput } from '../files.js';\n\nexport const apiKeysCommand = new Command('api-keys')\n .description('ApiKeys resource.');\n\napiKeysCommand\n .command('retrieve')\n .description('Returns API key metadata. The key value is never returned after creation.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys retrieve id_example')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Loading...', () => nuntly.apiKeys.retrieve(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\napiKeysCommand\n .command('update')\n .description('Update the key name, permissions, or restrict it to specific sending domains.')\n .argument('<id>', 'The id')\n .option('--name <value>', 'The name of the api key')\n .option('--status <value>', 'status')\n .option('--permission <value>', 'The permission type for the api key (required)')\n .option('--domain-ids <value>', 'The domain ids to restrict the api key to (only for sendingAccess)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys update id_example --permission sendingAccess\\n $ cat payload.json | nuntly api-keys update id_example\\n $ nuntly api-keys update id_example --file payload.json')\n .action(async (id, opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n status: opts.status,\n permission: opts.permission,\n domainIds: opts.domainIds != null ? (opts.domainIds as string).split(',') : undefined\n };\n const result = await withSpinner('Updating...', () => nuntly.apiKeys.update(id, body as UpdateApiKeyRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\napiKeysCommand\n .command('delete')\n .description('Revoke an API key. Requests authenticating with this key will be rejected immediately.')\n .argument('<id>', 'The id')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys delete id_example')\n .action(async (id, opts) => {\n try {\n if (!await confirmDelete('api keys', id)) return;\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const result = await withSpinner('Deleting...', () => nuntly.apiKeys.delete(id));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\napiKeysCommand\n .command('create')\n .description('Generate a new API key. The key value is only returned once — store it securely.')\n .option('--name <value>', 'The name of the api key')\n .option('--status <value>', 'The status for the api key')\n .option('--permission <value>', 'The permission type for the api key (required)')\n .option('--domain-ids <value>', 'The domain ids to restrict the api key to (only for sendingAccess)')\n .option('--file <path>', 'Read JSON body from file (use - for stdin)')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys create --permission sendingAccess\\n $ cat payload.json | nuntly api-keys create\\n $ nuntly api-keys create --file payload.json')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const body = opts.file ? readInput(opts.file) : !process.stdin.isTTY ? readInput('-') : {\n name: opts.name,\n status: opts.status,\n permission: opts.permission,\n domainIds: opts.domainIds != null ? (opts.domainIds as string).split(',') : undefined\n };\n const result = await withSpinner('Creating...', () => nuntly.apiKeys.create(body as CreateApiKeyRequest));\n printResult(result, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\napiKeysCommand\n .command('list')\n .description('Returns all API keys for the organization. Key values are never included in list responses.')\n .option('--cursor <cursor>', 'Pagination cursor')\n .option('--limit <limit>', 'Max items to return')\n .option('--format <fmt>', 'Output format: json, raw, yaml, csv, markdown, table, quiet')\n .option('-q, --quiet', 'Shorthand for --format quiet')\n .option('--raw', 'Shorthand for --format raw')\n .option('--fields <fields>', 'Comma-separated list of fields to display')\n .option('--no-header', 'Omit column headers in table/csv output')\n .addHelpText('after', '\\nExample:\\n $ nuntly api-keys list\\n $ nuntly api-keys list --format json | jq \\'.data[].id\\'')\n .action(async (opts) => {\n try {\n const nuntly = new Nuntly({ apiKey: resolveApiKey(), baseUrl: resolveBaseUrl(), appInfo: { name: '@nuntly/cli', version: CLI_VERSION } });\n const page = await withSpinner('Loading...', () => nuntly.apiKeys.list({ cursor: opts.cursor, limit: opts.limit ? Number(opts.limit) : undefined }));\n printResult({ data: page.data, nextCursor: page.nextCursor }, opts);\n } catch (error) {\n printError(error, opts);\n }\n });\n\n","const COMMANDS = [\n\t\"login\",\n\t\"profiles\",\n\t\"completion\",\n\t\"emails\",\n\t\"domains\",\n\t\"webhooks\",\n\t\"organizations\",\n\t\"inboxes\",\n\t\"agents\",\n\t\"threads\",\n\t\"messages\",\n\t\"namespaces\",\n\t\"api-keys\",\n];\n\nconst SUBCOMMANDS: Record<string, string[]> = {\n\temails: [\n\t\t\"send\",\n\t\t\"list\",\n\t\t\"retrieve\",\n\t\t\"cancel\",\n\t\t\"stats\",\n\t\t\"events\",\n\t\t\"content\",\n\t\t\"bulk\",\n\t],\n\tdomains: [\"create\", \"list\", \"retrieve\", \"update\", \"delete\"],\n\twebhooks: [\"create\", \"list\", \"retrieve\", \"update\", \"delete\", \"events\"],\n\torganizations: [\"list\", \"retrieve\", \"usage\"],\n\tinboxes: [\n\t\t\"create\",\n\t\t\"list\",\n\t\t\"retrieve\",\n\t\t\"update\",\n\t\t\"delete\",\n\t\t\"threads\",\n\t\t\"messages\",\n\t],\n\tagents: [\"memory\"],\n\tthreads: [\"retrieve\", \"update\", \"messages\"],\n\tmessages: [\"list\", \"retrieve\", \"reply\", \"forward\", \"content\", \"attachments\"],\n\tnamespaces: [\"create\", \"list\", \"retrieve\", \"update\", \"delete\", \"inboxes\"],\n\t\"api-keys\": [\"create\", \"list\", \"retrieve\", \"update\", \"delete\"],\n};\n\nexport function bashCompletion(): string {\n\treturn `#!/bin/bash\n_nuntly_completions() {\n local cur prev commands\n cur=\"\\${COMP_WORDS[COMP_CWORD]}\"\n prev=\"\\${COMP_WORDS[COMP_CWORD-1]}\"\n\n commands=\"${COMMANDS.join(\" \")}\"\n\n case \"\\${COMP_CWORD}\" in\n 1)\n COMPREPLY=( $(compgen -W \"\\${commands}\" -- \"\\${cur}\") )\n ;;\n 2)\n case \"\\${prev}\" in\n${Object.entries(SUBCOMMANDS)\n\t.map(\n\t\t([cmd, subs]) =>\n\t\t\t` ${cmd}) COMPREPLY=( $(compgen -W \"${subs.join(\" \")}\" -- \"\\${cur}\") ) ;;`,\n\t)\n\t.join(\"\\n\")}\n *) ;;\n esac\n ;;\n *)\n COMPREPLY=( $(compgen -W \"--json --yaml --markdown --table --quiet --profile --help\" -- \"\\${cur}\") )\n ;;\n esac\n}\ncomplete -F _nuntly_completions nuntly`;\n}\n\nexport function zshCompletion(): string {\n\treturn `#compdef nuntly\n\n_nuntly() {\n local -a commands\n commands=(\n${COMMANDS.map((c) => ` '${c}:${c} command'`).join(\"\\n\")}\n )\n\n _arguments -C \\\\\n '1:command:->command' \\\\\n '*::arg:->args'\n\n case $state in\n command)\n _describe 'command' commands\n ;;\n args)\n case $words[1] in\n${Object.entries(SUBCOMMANDS)\n\t.map(\n\t\t([cmd, subs]) =>\n\t\t\t` ${cmd}) _values 'subcommand' ${subs.map((s) => `'${s}'`).join(\" \")} ;;`,\n\t)\n\t.join(\"\\n\")}\n esac\n ;;\n esac\n}\n\n_nuntly`;\n}\n\nexport function fishCompletion(): string {\n\tconst lines = COMMANDS.map(\n\t\t(c) => `complete -c nuntly -n '__fish_use_subcommand' -a '${c}'`,\n\t);\n\tfor (const [cmd, subs] of Object.entries(SUBCOMMANDS)) {\n\t\tfor (const sub of subs) {\n\t\t\tlines.push(\n\t\t\t\t`complete -c nuntly -n '__fish_seen_subcommand_from ${cmd}' -a '${sub}'`,\n\t\t\t);\n\t\t}\n\t}\n\treturn lines.join(\"\\n\");\n}\n\nexport function powershellCompletion(): string {\n\tconst subBlocks = Object.entries(SUBCOMMANDS)\n\t\t.map(\n\t\t\t([cmd, subs]) =>\n\t\t\t\t` '${cmd}' { @(${subs.map((s) => `'${s}'`).join(\", \")}) | Where-Object { $_ -like \"$wordToComplete*\" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) } }`,\n\t\t)\n\t\t.join(\"\\n\");\n\n\treturn `Register-ArgumentCompleter -CommandName nuntly -ScriptBlock {\n param($wordToComplete, $commandAst, $cursorPosition)\n $elements = $commandAst.CommandElements\n if ($elements.Count -le 2) {\n @(${COMMANDS.map((c) => `'${c}'`).join(\", \")}) | Where-Object { $_ -like \"$wordToComplete*\" } | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }\n } else {\n $cmd = $elements[1].ToString()\n switch ($cmd) {\n${subBlocks}\n }\n }\n}`;\n}\n"],"mappings":";;;AACA,SAAS,WAAAA,iBAAe;AACxB,OAAOC,SAAQ;;;AC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,IAC5C,KAAK;AAAO,cAAQ,IAAI,cAAc,CAAC;AAAG;AAAA,IAC1C,KAAK;AAAQ,cAAQ,IAAI,eAAe,CAAC;AAAG;AAAA,IAC5C,KAAK;AAAc,cAAQ,IAAI,qBAAqB,CAAC;AAAG;AAAA,IACxD;AAAS,cAAQ,MAAMA,IAAG,IAAI,oBAAoB,KAAK,CAAC;AAAG,cAAQ,KAAK,CAAC;AAAA,EAC3E;AACF,CAAC;AAEH,QAAQ,WAAW,aAAa;AAChC,QAAQ,WAAW,cAAc;AACjC,QAAQ,WAAW,eAAe;AAClC,QAAQ,WAAW,oBAAoB;AACvC,QAAQ,WAAW,cAAc;AACjC,QAAQ,WAAW,aAAa;AAChC,QAAQ,WAAW,cAAc;AACjC,QAAQ,WAAW,eAAe;AAClC,QAAQ,WAAW,iBAAiB;AACpC,QAAQ,WAAW,cAAc;AAEjC,QAAQ,MAAM;","names":["Command","pc","pc","pc","readFileSync","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","eventsSub","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","messagesSub","Nuntly","Command","Nuntly","Command","contentSub","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","Nuntly","Command","pc"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuntly/cli",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "test": "bun test"
30
30
  },
31
31
  "dependencies": {
32
- "@nuntly/sdk": "^1.0.0-alpha.1",
32
+ "@nuntly/sdk": "^1.0.0-alpha.3",
33
33
  "@clack/prompts": "^0.10.0",
34
34
  "@commander-js/extra-typings": "^13.1.0",
35
35
  "commander": "^13.1.0",