Skip to content

Commit 6b4c5e0

Browse files
Visual Editor: Update
1 parent f44e6ed commit 6b4c5e0

File tree

2 files changed

+79
-50
lines changed

2 files changed

+79
-50
lines changed
Lines changed: 77 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,84 @@
11
---
2-
title: 'Overview'
2+
title: Overview
33
subtitle: Manage and configure your Fern projects, all from the command line.
4-
description: 'Overview of the Fern CLI including usage, installation, and CI/CD environments'
4+
description: Overview of the Fern CLI including usage, installation, and CI/CD environments
55
---
66

77
## Installing Fern CLI
88

99
Run the following command to download and install Fern CLI from the [npm](https://www.npmjs.com/) registry.
1010

11-
```bash
11+
or you can install from homebrew.
12+
13+
```
14+
brew install fern-api
15+
```
16+
17+
> This is the coolest way to install the API, tho:
18+
19+
```
20+
21+
1222
npm install -g fern-api # install Fern CLI
1323
fern -v # ensure Fern was successfully installed
1424
```
1525

1626
<Accordion title="Installing Fern CLI locally" toc={true}>
27+
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:
28+
29+
<Steps>
30+
<Step title="Install as project dependency">
31+
Add `fern-api` to your project dependencies:
1732

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:
33+
```bash
34+
npm install fern-api
35+
```
1936

20-
<Steps>
21-
<Step title="Install as project dependency">
37+
</Step>
2238

23-
Add `fern-api` to your project dependencies:
39+
<Step title="Update configuration">
40+
In your `fern.config.json`, set the version to `*` to use your locally installed version:
2441

25-
```bash
26-
npm install fern-api
27-
```
42+
```json
43+
{
44+
"organization": "your-org",
45+
"version": "*"
46+
}
47+
```
2848

29-
</Step>
49+
</Step>
3050

31-
<Step title="Update configuration">
51+
<Step title="Run via package manager">
52+
Use your package manager to run Fern commands:
3253

33-
In your `fern.config.json`, set the version to `*` to use your locally installed version:
54+
```bash
55+
npm fern check # Validate API definition
56+
npm fern --version # Check CLI version to see if it's right
57+
npm fern generate # Generate outputs
58+
```
59+
</Step>
60+
</Steps>
61+
</Accordion>
3462

35-
```json fern.config.json {3}
36-
{
37-
"organization": "your-org",
38-
"version": "*"
39-
}
63+
64+
```ruby
65+
Stripe::Charge.create(payment_method: "pm_card_visa")
4066
```
4167

42-
</Step>
68+
```python
69+
stripe.Charge.create( "payment_method" : "pm_card_visa")
70+
```
4371

44-
<Step title="Run via package manager">
72+
<Tabs>
73+
<Tab title="Ruby">
4574

46-
Use your package manager to run Fern commands:
75+
</Tab>
4776

48-
```bash
49-
npm fern check # Validate API definition
50-
npm fern --version # Check CLI version
51-
npm fern generate # Generate outputs
52-
```
77+
<Tab title="Python">
5378

54-
</Step>
55-
</Steps>
79+
</Tab>
80+
</Tabs>
5681

57-
</Accordion>
5882

5983
## CLI quickstart
6084

@@ -84,41 +108,47 @@ The "default SDK group" refers to the group marked as default in your `generator
84108
<AccordionGroup>
85109
<Accordion title="Setting up Docs">
86110
1. Initialize a new docs project:
87-
```bash
88-
fern init --docs
89-
```
90-
91-
2. Preview locally while making changes:
92-
```bash
93-
fern docs dev
94-
```
95-
96-
3. When ready to preview or publish:
97-
```bash
98-
fern generate --docs --preview # Generate a shareable preview link
99-
fern generate --docs # Publish to production
100-
```
111+
112+
```bash
113+
fern init --docs
114+
```
115+
116+
2. Preview locally while making changes:
117+
118+
```bash
119+
fern docs dev
120+
```
121+
122+
3. When ready to preview or publish:
123+
124+
```bash
125+
fern generate --docs --preview # Generate a shareable preview link
126+
fern generate --docs # Publish to production
127+
```
128+
101129
</Accordion>
102130

103131
<Accordion title="Setting up SDK generation">
104132
1. Initialize a new SDK project:
133+
105134
```bash
106135
fern init
107136
```
108-
137+
109138
2. Configure your generators in [configuration options](/learn/sdks/introduction/configuration)
110-
139+
111140
3. Generate SDKs:
141+
112142
```bash
113143
fern generate --preview # Preview changes locally
114144
fern generate --group python-sdk --preview # Preview specific SDK group
115145
fern generate # Publish to production
116146
```
117147

118148
<Tip>
119-
During development, use `--preview` to test your changes locally before publishing.
149+
During development, use `--preview` to test your changes locally before publishing.
120150
The preview SDK will be generated into the `.preview/` folder.
121151
</Tip>
122152
</Accordion>
123-
124153
</AccordionGroup>
154+

fern/products/home/pages/welcome.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
22
title: Build with Fern
3-
description: Explore our guides for how to generate SDKs and Docs with Fern.
43
slug: /
4+
description: Explore our guides for how to generate SDKs and Docs with Fern.
55
hide-toc: true
66
layout: custom
77
---
88

9-
109
import { FernFooter } from "../../../components/FernFooter";
1110

1211
<div className="lp-page-container">
@@ -389,4 +388,4 @@ import { FernFooter } from "../../../components/FernFooter";
389388
</div>
390389

391390
</div>
392-
</div>
391+
</div>

0 commit comments

Comments
 (0)