Skip to content

Commit 625c758

Browse files
docs: Document CLI performance optimization setup (#787)
Co-authored-by: promptless[bot] <179508745+promptless[bot]@users.noreply.github.com> Co-authored-by: Devin Logan <[email protected]>
1 parent e18e017 commit 625c758

File tree

1 file changed

+45
-2
lines changed

1 file changed

+45
-2
lines changed

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

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,50 @@ 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}>
17+
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:
19+
20+
<Steps>
21+
<Step title="Install as project dependency">
22+
23+
Add `fern-api` to your project dependencies:
24+
25+
```bash
26+
npm install fern-api
27+
```
28+
29+
</Step>
30+
31+
<Step title="Update configuration">
32+
33+
In your `fern.config.json`, set the version to `*` to use your locally installed version:
34+
35+
```json fern.config.json {3}
36+
{
37+
"organization": "your-org",
38+
"version": "*"
39+
}
40+
```
41+
42+
</Step>
43+
44+
<Step title="Run via package manager">
45+
46+
Use your package manager to run Fern commands:
47+
48+
```bash
49+
npm fern check # Validate API definition
50+
npm fern --version # Check CLI version
51+
npm fern generate # Generate outputs
52+
```
53+
54+
</Step>
55+
</Steps>
56+
57+
</Accordion>
58+
59+
## CLI quickstart
1760

1861
Get started with these commonly used commands:
1962

@@ -36,7 +79,7 @@ fern generate --group ts-sdk # Generate specific SDK group
3679
The "default SDK group" refers to the group marked as default in your `generators.yml`. Learn more about [default groups](/learn/sdks/introduction/configuration).
3780
</Note>
3881

39-
## Common Workflows
82+
## Common workflows
4083

4184
<AccordionGroup>
4285
<Accordion title="Setting up Docs">

0 commit comments

Comments
 (0)