You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: fern/products/cli-api-reference/pages/cli-get-started.mdx
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,50 @@ fern generate --group ts-sdk # Generate specific SDK group
36
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
37
</Note>
38
38
39
+
## Performance Optimization
40
+
41
+
For improved performance, you can install Fern CLI as a local project dependency:
42
+
43
+
<Steps>
44
+
<Steptitle="Install as project dependency">
45
+
46
+
Add `fern-api` to your project dependencies:
47
+
48
+
```bash
49
+
npm install fern-api
50
+
```
51
+
52
+
</Step>
53
+
54
+
<Steptitle="Update configuration">
55
+
56
+
In your `fern.config.json`, set the version to `*`:
57
+
58
+
```json fern.config.json
59
+
{
60
+
"version": "*"
61
+
}
62
+
```
63
+
64
+
</Step>
65
+
66
+
<Steptitle="Run via package manager">
67
+
68
+
Use npm to run Fern commands:
69
+
70
+
```bash
71
+
npm fern check # Validate API definition
72
+
npm fern --version # Check CLI version
73
+
npm fern generate # Generate outputs
74
+
```
75
+
76
+
</Step>
77
+
</Steps>
78
+
79
+
<Tip>
80
+
This approach uses your project-specific version of Fern CLI, which can improve performance and ensure consistency across your team.
0 commit comments