Skip to content

Commit 06eb26a

Browse files
committed
add use case info
1 parent ed5f7ac commit 06eb26a

File tree

1 file changed

+31
-32
lines changed

1 file changed

+31
-32
lines changed

fern/products/cli-api-reference/pages/cli-get-started.mdx

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,9 @@ npm install -g fern-api # install Fern CLI
1313
fern -v # ensure Fern was successfully installed
1414
```
1515

16-
## CLI Quick Start
16+
<Accordion title="Installing Fern CLI locally" toc={true}>
1717

18-
Get started with these commonly used commands:
19-
20-
```bash title="Common Commands"
21-
# Docs Development
22-
fern init --docs # Create a new documentation project
23-
fern docs dev # Preview docs locally at localhost:3000
24-
fern generate --docs --preview # Preview documentation changes
25-
fern generate --docs # Generate and publish documentation
26-
27-
# SDK Development
28-
fern init # Start new SDK project
29-
fern check # Validate API definition
30-
fern generate --preview # Preview SDKs in .preview/ folder
31-
fern generate # Generate default SDK group
32-
fern generate --group ts-sdk # Generate specific SDK group
33-
```
34-
35-
<Note>
36-
The "default SDK group" refers to the group marked as default in your `generators.yml`. Learn more about [default groups](/learn/sdks/introduction/configuration).
37-
</Note>
38-
39-
## Performance Optimization
40-
41-
For improved performance, you can install Fern CLI as a local project dependency:
18+
If you're experiencing network delays with the global installation, working in an environment with limited internet connectivity, or prefer to manage Fern as a project dependency, you can install the CLI locally:
4219

4320
<Steps>
4421
<Step title="Install as project dependency">
@@ -53,10 +30,11 @@ npm install fern-api
5330

5431
<Step title="Update configuration">
5532

56-
In your `fern.config.json`, set the version to `*`:
33+
In your `fern.config.json`, set the version to `*` to use your locally installed version:
5734

58-
```json fern.config.json
35+
```json fern.config.json {3}
5936
{
37+
"organization": "your-org",
6038
"version": "*"
6139
}
6240
```
@@ -65,7 +43,7 @@ In your `fern.config.json`, set the version to `*`:
6543

6644
<Step title="Run via package manager">
6745

68-
Use npm to run Fern commands:
46+
Use your package manager to run Fern commands:
6947

7048
```bash
7149
npm fern check # Validate API definition
@@ -76,11 +54,32 @@ npm fern generate # Generate outputs
7654
</Step>
7755
</Steps>
7856

79-
<Tip>
80-
This approach uses your project-specific version of Fern CLI, which can improve performance and ensure consistency across your team.
81-
</Tip>
57+
</Accordion>
58+
59+
## CLI quickstart
60+
61+
Get started with these commonly used commands:
62+
63+
```bash title="Common Commands"
64+
# Docs Development
65+
fern init --docs # Create a new documentation project
66+
fern docs dev # Preview docs locally at localhost:3000
67+
fern generate --docs --preview # Preview documentation changes
68+
fern generate --docs # Generate and publish documentation
69+
70+
# SDK Development
71+
fern init # Start new SDK project
72+
fern check # Validate API definition
73+
fern generate --preview # Preview SDKs in .preview/ folder
74+
fern generate # Generate default SDK group
75+
fern generate --group ts-sdk # Generate specific SDK group
76+
```
77+
78+
<Note>
79+
The "default SDK group" refers to the group marked as default in your `generators.yml`. Learn more about [default groups](/learn/sdks/introduction/configuration).
80+
</Note>
8281

83-
## Common Workflows
82+
## Common workflows
8483

8584
<AccordionGroup>
8685
<Accordion title="Setting up Docs">

0 commit comments

Comments
 (0)