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.
- package/dist/cli.js +73 -68
- 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
|
-
|
|
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(
|
|
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
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
{
|
|
287
|
-
{
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
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
|
-
|
|
323
|
-
|
|
300
|
+
if (action === 'setup') {
|
|
301
|
+
await runSetup();
|
|
302
|
+
return;
|
|
324
303
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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