@clipit-ai/cli 0.2.8 → 0.2.9
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/bin/clipit.mjs +47 -2
- package/package.json +1 -1
package/bin/clipit.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import path from 'node:path';
|
|
|
9
9
|
import process from 'node:process';
|
|
10
10
|
import { fileURLToPath } from 'node:url';
|
|
11
11
|
|
|
12
|
-
const VERSION = '0.2.
|
|
12
|
+
const VERSION = '0.2.9';
|
|
13
13
|
const DEFAULT_BASE_URL = 'https://clipit.dev';
|
|
14
14
|
const DEFAULT_SCOPES = [
|
|
15
15
|
'clippy_agent',
|
|
@@ -484,6 +484,51 @@ function usage() {
|
|
|
484
484
|
].join('\n');
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
+
function commandUsage(command, subcommand) {
|
|
488
|
+
if (command === 'social' && subcommand === 'schedule') {
|
|
489
|
+
return [
|
|
490
|
+
'Usage:',
|
|
491
|
+
' clipit social schedule --clip-id <id> --platforms <platform[,platform]> --caption <text> --at <ISO-8601> --confirm',
|
|
492
|
+
'',
|
|
493
|
+
'Required:',
|
|
494
|
+
' --clip-id <id> Clip to schedule',
|
|
495
|
+
' --platforms <list> Comma-separated destination platforms',
|
|
496
|
+
' --caption <text> Post caption',
|
|
497
|
+
' --at <ISO-8601> Scheduled publish time',
|
|
498
|
+
' --confirm Confirm the scheduling mutation',
|
|
499
|
+
'',
|
|
500
|
+
'Optional:',
|
|
501
|
+
' --export-id <id> Pin the exact completed export',
|
|
502
|
+
' --account-ids <map> Exact accounts as platform=accountId pairs',
|
|
503
|
+
' --title <text> Post title',
|
|
504
|
+
' --hashtags <list> Comma-separated hashtags',
|
|
505
|
+
' --profile <name> Named ClipIt credential profile',
|
|
506
|
+
' --json Emit machine-readable JSON',
|
|
507
|
+
'',
|
|
508
|
+
'Enterprise scheduling requires a client-selected deliverable and a granted connected account.',
|
|
509
|
+
].join('\n');
|
|
510
|
+
}
|
|
511
|
+
if (command === 'deliverables' && subcommand === 'create') {
|
|
512
|
+
return [
|
|
513
|
+
'Usage:',
|
|
514
|
+
' clipit deliverables create --export-id <id> --title <text> --confirm',
|
|
515
|
+
'',
|
|
516
|
+
'Required:',
|
|
517
|
+
' --export-id <id> Exact completed export to deliver',
|
|
518
|
+
' --title <text> Client-facing deliverable title',
|
|
519
|
+
' --confirm Confirm the delivery mutation',
|
|
520
|
+
'',
|
|
521
|
+
'Optional:',
|
|
522
|
+
' --note <text> Client-facing note',
|
|
523
|
+
' --profile <name> Named ClipIt credential profile',
|
|
524
|
+
' --json Emit machine-readable JSON',
|
|
525
|
+
'',
|
|
526
|
+
'The response includes clientSelectionUrl; the client must select the delivery before enterprise social publishing.',
|
|
527
|
+
].join('\n');
|
|
528
|
+
}
|
|
529
|
+
return null;
|
|
530
|
+
}
|
|
531
|
+
|
|
487
532
|
function getBaseUrl(config, options) {
|
|
488
533
|
const profile = profileData(config, options);
|
|
489
534
|
const selected = profileIsAuthoritative(config, options);
|
|
@@ -4438,7 +4483,7 @@ async function main() {
|
|
|
4438
4483
|
return;
|
|
4439
4484
|
}
|
|
4440
4485
|
if (!command || options.help) {
|
|
4441
|
-
console.log(usage());
|
|
4486
|
+
console.log(commandUsage(command, subcommand) ?? usage());
|
|
4442
4487
|
return;
|
|
4443
4488
|
}
|
|
4444
4489
|
if (command === 'version' || command === '--version' || command === '-v') {
|