openads-ai 0.2.20 → 0.2.21

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.
Files changed (2) hide show
  1. package/dist/cli.js +73 -68
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -199,9 +199,6 @@ function showSkills() {
199
199
  console.log('');
200
200
  }
201
201
  console.log(chalk.gray(' ─────────────────────────────────────────────────────'));
202
- console.log(` ${chalk.bold.white('Want more?')} 30+ community skills available at:`);
203
- console.log(` ${chalk.cyan('https://github.com/coreyhaines31/marketingskills')}`);
204
- console.log('');
205
202
  console.log(chalk.gray(' To add a skill, drop a .md file into the skills/ folder.'));
206
203
  console.log(chalk.gray(' The agent picks them up automatically — no code needed.'));
207
204
  console.log('');
@@ -249,10 +246,7 @@ async function main() {
249
246
  return;
250
247
  }
251
248
  // ─── Splash Screen ──────────────────────────────────────────────
252
- console.clear();
253
- console.log('');
254
- console.log(openadsGradient(LOGO));
255
- console.log('');
249
+ const pkg = JSON.parse(fs.readFileSync(path.join(pkgDir, 'package.json'), 'utf8'));
256
250
  const cleanProvider = resolveModel(config.provider);
257
251
  const modelName = chalk.cyan.bold(cleanProvider);
258
252
  const googleStatus = config.connectGoogle ? chalk.green('● Connected') : chalk.gray('○ Not connected');
@@ -265,73 +259,84 @@ async function main() {
265
259
  ` ${chalk.bold.white('Google Ads')} ${googleStatus}`,
266
260
  ` ${chalk.bold.white('Meta Ads')} ${metaStatus}`,
267
261
  '',
268
- ` ${chalk.gray('v0.2.1')} ${chalk.gray('·')} ${chalk.gray('AI Command Center for Marketers')}`,
262
+ ` ${chalk.gray(`v${pkg.version}`)} ${chalk.gray('·')} ${chalk.gray('AI Command Center for Marketers')}`,
269
263
  ].join('\n');
270
- console.log(boxen(statusLines, {
271
- padding: { top: 1, bottom: 1, left: 2, right: 2 },
272
- margin: { top: 0, bottom: 1, left: 2, right: 2 },
273
- borderStyle: 'round',
274
- borderColor: 'cyan',
275
- dimBorder: true,
276
- }));
277
264
  // ─── Interactive Menu (when no args) ────────────────────────────
278
265
  let finalArgs = [...args];
279
266
  if (args.length === 0) {
280
- const { action } = await enquirer.prompt({
281
- type: 'select',
282
- name: 'action',
283
- message: chalk.bold('What would you like to do?'),
284
- choices: [
285
- { name: 'chat', message: `${chalk.cyan('💬')} Ask anything` },
286
- { name: 'audit', message: `${chalk.cyan('🔍')} Audit my ad campaigns ${chalk.gray('(audit)')}` },
287
- { name: 'copy', message: `${chalk.cyan('✍️')} Write ad copy for any platform ${chalk.gray('(copywriting)')}` },
288
- { name: 'autoresearch', message: `${chalk.cyan('🔄')} Test and improve ideas automatically ${chalk.gray('(autoresearch)')}` },
289
- { name: 'gtm', message: `${chalk.cyan('📈')} Build a go-to-market plan ${chalk.gray('(strategy)')}` },
290
- { name: 'skills', message: `${chalk.cyan('📚')} Browse available skills` },
291
- { name: 'schedule', message: `${chalk.cyan('⏰')} Schedule automations` },
292
- { name: 'setup', message: `${chalk.gray('⚙️')} Settings` },
293
- { name: 'doctor', message: `${chalk.gray('🩺')} Diagnostics` },
294
- { name: 'exit', message: `${chalk.gray('❌')} Exit` }
295
- ]
296
- });
297
- if (action === 'exit') {
298
- console.log(chalk.cyan('\n Goodbye! Keep marketing 🎯\n'));
299
- return;
300
- }
301
- if (action === 'setup') {
302
- await runSetup();
303
- return;
304
- }
305
- if (action === 'doctor') {
306
- await runDoctor();
307
- return;
308
- }
309
- if (action === 'skills') {
310
- showSkills();
311
- return;
312
- }
313
- if (action === 'schedule') {
314
- await runScheduleManager();
315
- return;
316
- }
317
- if (action === 'audit') {
318
- let auditTemplate = '/audit-google-ads';
319
- if (config.metaToken && !config.connectGoogle) {
320
- auditTemplate = '/audit-meta-ads';
267
+ while (true) {
268
+ console.clear();
269
+ console.log('');
270
+ console.log(openadsGradient(LOGO));
271
+ console.log('');
272
+ console.log(boxen(statusLines, {
273
+ padding: { top: 1, bottom: 1, left: 2, right: 2 },
274
+ margin: { top: 0, bottom: 1, left: 2, right: 2 },
275
+ borderStyle: 'round',
276
+ borderColor: 'cyan',
277
+ dimBorder: true,
278
+ }));
279
+ const { action } = await enquirer.prompt({
280
+ type: 'select',
281
+ name: 'action',
282
+ message: chalk.bold('What would you like to do?'),
283
+ choices: [
284
+ { name: 'chat', message: `${chalk.cyan('💬')} Ask anything` },
285
+ { name: 'audit', message: `${chalk.cyan('🔍')} Audit my ad campaigns ${chalk.gray('(audit)')}` },
286
+ { name: 'copy', message: `${chalk.cyan('✍️')} Write ad copy for any platform ${chalk.gray('(copywriting)')}` },
287
+ { name: 'autoresearch', message: `${chalk.cyan('🔄')} Test and improve ideas automatically ${chalk.gray('(autoresearch)')}` },
288
+ { name: 'gtm', message: `${chalk.cyan('📈')} Build a go-to-market plan ${chalk.gray('(strategy)')}` },
289
+ { name: 'skills', message: `${chalk.cyan('📚')} Browse available skills` },
290
+ { name: 'schedule', message: `${chalk.cyan('⏰')} Schedule automations` },
291
+ { name: 'setup', message: `${chalk.gray('⚙️')} Settings` },
292
+ { name: 'doctor', message: `${chalk.gray('🩺')} Diagnostics` },
293
+ { name: 'exit', message: `${chalk.gray('❌')} Exit` }
294
+ ]
295
+ });
296
+ if (action === 'exit') {
297
+ console.log(chalk.cyan('\n Goodbye! Keep marketing 🎯\n'));
298
+ return;
321
299
  }
322
- else if (config.metaToken && config.connectGoogle) {
323
- auditTemplate = '/audit-campaigns';
300
+ if (action === 'setup') {
301
+ await runSetup();
302
+ return;
324
303
  }
325
- finalArgs = [auditTemplate];
326
- }
327
- else {
328
- const actionMap = {
329
- chat: [],
330
- copy: ['/write-ad-copy'],
331
- autoresearch: ['/autoresearch-plan'],
332
- gtm: ['/go-to-market'],
333
- };
334
- finalArgs = actionMap[action] || [];
304
+ if (action === 'doctor') {
305
+ await runDoctor();
306
+ console.log(chalk.cyan('\n Press Enter to go back to the menu...'));
307
+ await new Promise(resolve => process.stdin.once('data', resolve));
308
+ continue;
309
+ }
310
+ if (action === 'skills') {
311
+ showSkills();
312
+ console.log(chalk.cyan('\n Press Enter to go back to the menu...'));
313
+ await new Promise(resolve => process.stdin.once('data', resolve));
314
+ continue;
315
+ }
316
+ if (action === 'schedule') {
317
+ await runScheduleManager();
318
+ continue;
319
+ }
320
+ if (action === 'audit') {
321
+ let auditTemplate = '/audit-google-ads';
322
+ if (config.metaToken && !config.connectGoogle) {
323
+ auditTemplate = '/audit-meta-ads';
324
+ }
325
+ else if (config.metaToken && config.connectGoogle) {
326
+ auditTemplate = '/audit-campaigns';
327
+ }
328
+ finalArgs = [auditTemplate];
329
+ }
330
+ else {
331
+ const actionMap = {
332
+ chat: [],
333
+ copy: ['/write-ad-copy'],
334
+ autoresearch: ['/autoresearch-plan'],
335
+ gtm: ['/go-to-market'],
336
+ };
337
+ finalArgs = actionMap[action] || [];
338
+ }
339
+ break;
335
340
  }
336
341
  }
337
342
  // ─── Loading Spinner ────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openads-ai",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "description": "Open-source AI command center for digital marketers. Audit campaigns, write ad copy, and build strategies — from your terminal.",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {