Skip to content

Commit 49d71a8

Browse files
authored
Merge branch 'main' into assistant-docs
2 parents bf217ac + 3f86ce4 commit 49d71a8

File tree

2 files changed

+46
-36
lines changed

2 files changed

+46
-36
lines changed

changelog.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ mode: "center"
1414

1515
Learn more at [API playground docs.](/api-playground/)
1616

17-
## npm i mint
18-
19-
Can now use `npm i mint@latest -g` to upgrade your CLI.
17+
## `mint update`
18+
Can now use `mint update` to update your CLI.
2019
</Update>
2120

2221
<Update label="April 2025">

installation.mdx

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
title: "Installation"
2+
title: "CLI"
3+
sidebarTitle: "Installation"
34
description: "Install the CLI to preview and develop your docs locally"
45
icon: "terminal"
56
---
@@ -13,37 +14,45 @@ icon: "terminal"
1314
src="/images/installation/local-development-dark.png"
1415
/>
1516

17+
## Installing the CLI
18+
1619
<Info>
1720
**Prerequisite**: Please install [Node.js](https://nodejs.org/en) (version 19 or higher) before proceeding.
1821
</Info>
1922

20-
**Step 1**: Install the [CLI](https://www.npmjs.com/package/mint):
23+
<Steps>
24+
<Step title="Install the CLI.">
25+
Run the following command to install the [CLI](https://www.npmjs.com/package/mint):
26+
<CodeGroup>
2127

22-
<CodeGroup>
28+
```bash npm
29+
npm i -g mint
30+
```
2331

24-
```bash npm
25-
npm i -g mint
26-
```
2732

28-
29-
```bash yarn
30-
yarn global add mint
31-
```
33+
```bash yarn
34+
yarn global add mint
35+
```
3236

3337

34-
```bash pnpm
35-
pnpm add -g mint
36-
```
38+
```bash pnpm
39+
pnpm add -g mint
40+
```
3741

38-
</CodeGroup>
42+
</CodeGroup>
43+
</Step>
44+
<Step title="Preview locally.">
45+
Navigate to your docs directory (where your `docs.json` file is located) and execute the following command:
3946

40-
**Step 2**: Navigate to the docs directory (where the `docs.json` file is located) and execute the following command:
47+
```bash
48+
mint dev
49+
```
4150

42-
```bash
43-
mint dev
44-
```
51+
A local preview of your documentation will be available at `http://localhost:3000`.
52+
</Step>
53+
</Steps>
4554

46-
Alternatively, if you do not want to install the CLI globally, you can use a run a one-time script:
55+
Alternatively, if you do not want to install the CLI globally, you can run a one-time script:
4756

4857
<CodeGroup>
4958

@@ -63,11 +72,15 @@ pnpm dlx mint dev
6372

6473
</CodeGroup>
6574

66-
A local preview of your documentation will be available at `http://localhost:3000`.
67-
6875
## Updates
6976

70-
Each CLI release is associated with a specific version of the Mintlify platform. If your local preview doesn't align with the production version, please update the CLI:
77+
If your local preview is out of sync with what you see on the web in the production version, update your local CLI:
78+
79+
```bash
80+
mint update
81+
```
82+
83+
If this `mint update` command is not available on your local version, re-install the CLI with the latest version:
7184

7285
<CodeGroup>
7386

@@ -87,33 +100,33 @@ pnpm up --global mint
87100

88101
</CodeGroup>
89102

90-
## Custom Ports
103+
## Custom ports
91104

92105
By default, the CLI uses port 3000. You can customize the port using the `--port` flag. To run the CLI on port 3333, for instance, use this command:
93106

94107
```bash
95108
mint dev --port 3333
96109
```
97110

98-
If you attempt to run on a port that's already in use, it will use the next available port:
111+
If you attempt to run on a port that is already in use, it will use the next available port:
99112

100113
```mdx
101114
Port 3000 is already in use. Trying 3001 instead.
102115
```
103116

104-
## Additional Commands
117+
## Additional commands
105118

106119
While `mint dev` is the most commonly used command, there are other commands you can use to manage your documentation.
107120

108-
### Find Broken Links
121+
### Finding broken links
109122

110123
The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command:
111124

112125
```bash
113126
mint broken-links
114127
```
115128

116-
### Check OpenAPI Spec
129+
### Checking OpenAPI spec
117130

118131
You can use the CLI to check your OpenAPI file for errors using the following command:
119132

@@ -123,19 +136,17 @@ mint openapi-check <openapiFilenameOrUrl>
123136

124137
You can pass in a filename (e.g. `./openapi.yaml`) or a URL (e.g. `https://petstore3.swagger.io/api/v3/openapi.json`).
125138

126-
### Renaming Files
139+
### Renaming files
127140

128-
You can rename files using the following command:
141+
You can rename and update all references to files using the following command:
129142

130143
```bash
131144
mint rename <oldFilename> <newFilename>
132145
```
133146

134-
This is an improvement over updating the filename normally as it will also update all references to the file, ensuring no broken links.
135-
136147
## Formatting
137148

138-
While developing locally, we recommend using extensions on your IDE to recognize and format MDX.
149+
While developing locally, we recommend using extensions in your IDE to recognize and format `MDX` files.
139150

140151
If you use Cursor, Windsurf, or VSCode, we recommend the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.
141152

@@ -152,6 +163,6 @@ If you use JetBrains, we recommend the [MDX IntelliJ IDEA plugin](https://plugin
152163
3. Reinstall the mint CLI: `npm install -g mint`
153164
</Accordion>
154165
<Accordion title="Issue: Encountering an unknown error">
155-
Solution: Go to the root of your device and delete the ~/.mintlify folder. Afterwards, run `mint dev` again.
166+
Solution: Go to the root of your device and delete the `~/.mintlify` folder. Afterwards, run `mint dev` again.
156167
</Accordion>
157168
</AccordionGroup>

0 commit comments

Comments
 (0)