@mintlify/cli 4.0.1088 → 4.0.1090

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/cli",
3
- "version": "4.0.1088",
3
+ "version": "4.0.1090",
4
4
  "description": "The Mintlify CLI",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -46,9 +46,9 @@
46
46
  "dependencies": {
47
47
  "@inquirer/prompts": "7.9.0",
48
48
  "@mintlify/common": "1.0.835",
49
- "@mintlify/link-rot": "3.0.1009",
49
+ "@mintlify/link-rot": "3.0.1010",
50
50
  "@mintlify/prebuild": "1.0.977",
51
- "@mintlify/previewing": "4.0.1037",
51
+ "@mintlify/previewing": "4.0.1038",
52
52
  "@mintlify/validation": "0.1.653",
53
53
  "adm-zip": "0.5.16",
54
54
  "chalk": "5.2.0",
@@ -93,5 +93,5 @@
93
93
  "vitest": "2.1.9",
94
94
  "vitest-mock-process": "1.0.4"
95
95
  },
96
- "gitHead": "8d3507469a2bba7c8ff8b0f5f7139ff3c8240041"
96
+ "gitHead": "a92a9ad306f6cb919dc792f85519ccc7242a6d67"
97
97
  }
package/src/cli.tsx CHANGED
@@ -20,6 +20,7 @@ import { hideBin } from 'yargs/helpers';
20
20
 
21
21
  import { accessibilityCheck } from './accessibilityCheck.js';
22
22
  import { analyticsBuilder } from './analytics/index.js';
23
+ import { comingSoon } from './comingSoon.js';
23
24
  import { setTelemetryEnabled } from './config.js';
24
25
  import { getConfigValue, setConfigValue, clearConfigValue } from './config.js';
25
26
  import { API_URL } from './constants.js';
@@ -69,7 +70,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
69
70
  .middleware(telemetryMiddleware)
70
71
  .command(
71
72
  'dev',
72
- 'initialize a local preview environment',
73
+ 'Initialize a local preview environment',
73
74
  (yargs) =>
74
75
  yargs
75
76
  .option('open', {
@@ -138,7 +139,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
138
139
  )
139
140
  .command(
140
141
  'validate',
141
- 'validate the documentation build (strict mode, exits on warnings or errors)',
142
+ 'Validate the documentation build (strict mode, exits on warnings or errors)',
142
143
  (yargs) =>
143
144
  yargs
144
145
  .option('local-schema', {
@@ -192,7 +193,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
192
193
  )
193
194
  .command(
194
195
  'export',
195
- 'export a static site for air-gapped deployment',
196
+ 'Export a static site for air-gapped deployment',
196
197
  (yargs) =>
197
198
  yargs
198
199
  .option('output', {
@@ -253,7 +254,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
253
254
  )
254
255
  .command(
255
256
  'broken-links',
256
- 'check for broken links',
257
+ 'Check for broken links',
257
258
  (yargs) =>
258
259
  yargs
259
260
  .option('check-anchors', {
@@ -340,7 +341,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
340
341
  )
341
342
  .command(
342
343
  'logout',
343
- 'logout of your mintlify account',
344
+ 'Logout of your Mintlify account',
344
345
  () => undefined,
345
346
  async () => {
346
347
  await logout();
@@ -349,18 +350,18 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
349
350
  )
350
351
  .command(
351
352
  'login',
352
- 'authenticate your account to mintlify',
353
+ 'Authenticate your account to Mintlify',
353
354
  () => undefined,
354
355
  async () => {
355
356
  await login();
356
357
  await terminate(0);
357
358
  }
358
359
  )
359
- .command('config', 'manage CLI configuration', (yargs) =>
360
+ .command('config', 'Manage CLI configuration', (yargs) =>
360
361
  yargs
361
362
  .command(
362
363
  'set <key> <value>',
363
- 'set a configuration value',
364
+ 'Set a configuration value',
364
365
  (yargs) =>
365
366
  yargs
366
367
  .positional('key', {
@@ -391,7 +392,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
391
392
  )
392
393
  .command(
393
394
  'get <key>',
394
- 'get a configuration value',
395
+ 'Get a configuration value',
395
396
  (yargs) =>
396
397
  yargs.positional('key', {
397
398
  type: 'string',
@@ -416,7 +417,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
416
417
  )
417
418
  .command(
418
419
  'clear <key>',
419
- 'remove a configuration value',
420
+ 'Remove a configuration value',
420
421
  (yargs) =>
421
422
  yargs.positional('key', {
422
423
  type: 'string',
@@ -443,7 +444,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
443
444
  )
444
445
  .command(
445
446
  'update',
446
- 'update the CLI to the latest version',
447
+ 'Update the CLI to the latest version',
447
448
  () => undefined,
448
449
  async () => {
449
450
  await update({ packageName });
@@ -452,7 +453,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
452
453
  )
453
454
  .command(
454
455
  ['a11y', 'accessibility-check', 'a11y-check', 'accessibility'],
455
- 'check for accessibility issues in documentation',
456
+ 'Check for accessibility issues in documentation',
456
457
  (yargs) =>
457
458
  yargs
458
459
  .option('skip-contrast', {
@@ -491,7 +492,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
491
492
  )
492
493
  .command(
493
494
  ['version', 'v'],
494
- 'display the current version of the cli and client',
495
+ 'Display the current version of the CLI and client',
495
496
  () => undefined,
496
497
  async () => {
497
498
  const { cli, client } = getVersions();
@@ -515,7 +516,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
515
516
  )
516
517
  .command(
517
518
  'new [directory]',
518
- 'create a new mintlify documentation site',
519
+ 'Create a new Mintlify documentation site',
519
520
  (yargs) =>
520
521
  yargs
521
522
  .positional('directory', {
@@ -550,7 +551,7 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
550
551
  )
551
552
  .command(
552
553
  'workflow',
553
- 'add a workflow to your documentation repository',
554
+ 'Add a workflow to your documentation repository',
554
555
  () => undefined,
555
556
  async () => {
556
557
  try {
@@ -564,7 +565,32 @@ export const cli = ({ packageName = 'mint' }: { packageName?: string }) => {
564
565
  }
565
566
  }
566
567
  )
567
- .command('analytics', 'view analytics for your documentation', analyticsBuilder)
568
+ .command('analytics', 'View analytics for your documentation', analyticsBuilder)
569
+ // Coming soon commands — visible in help, tracked via telemetry to gauge interest.
570
+ .command(
571
+ 'ai',
572
+ '[Coming soon] AI-powered documentation (run mint ai to vote)',
573
+ () => undefined,
574
+ comingSoon('ai', packageName)
575
+ )
576
+ .command(
577
+ 'test',
578
+ '[Coming soon] Test your documentation (run mint test to vote)',
579
+ () => undefined,
580
+ comingSoon('test', packageName)
581
+ )
582
+ .command(
583
+ 'signup',
584
+ '[Coming soon] Sign up for a Mintlify account (run mint signup to vote)',
585
+ () => undefined,
586
+ comingSoon('signup', packageName)
587
+ )
588
+ .command(
589
+ 'mcp',
590
+ '[Coming soon] MCP server for documentation (run mint mcp to vote)',
591
+ () => undefined,
592
+ comingSoon('mcp', packageName)
593
+ )
568
594
  // Print the help menu when the user enters an invalid command.
569
595
  .strictCommands()
570
596
  .demandCommand(1, 'unknown command. see above for the list of supported commands.')
@@ -0,0 +1,29 @@
1
+ import { addLog, SuccessLog, WarningLog } from '@mintlify/previewing';
2
+ import { Text } from 'ink';
3
+
4
+ import { isTelemetryEnabled } from './config.js';
5
+ import { terminate } from './helpers.js';
6
+
7
+ export function comingSoon(command: string, packageName: string) {
8
+ return async () => {
9
+ if (!isTelemetryEnabled()) {
10
+ addLog(
11
+ <WarningLog
12
+ message={`Telemetry is disabled, so your vote won't be counted. Enable it with: ${packageName} --telemetry=true`}
13
+ />
14
+ );
15
+ } else {
16
+ addLog(
17
+ <SuccessLog
18
+ message={`Thanks for your interest in "${packageName} ${command}"! Your vote has been counted.`}
19
+ />
20
+ );
21
+ }
22
+ addLog(
23
+ <Text dimColor>
24
+ This feature is currently in development. Learn more at https://mintlify.com/docs
25
+ </Text>
26
+ );
27
+ await terminate(0);
28
+ };
29
+ }