Skip to content

Commit c20c995

Browse files
committed
Add --deep flag documentation to fern generate command
Update all SDK quickstart guides and CLI reference to include the --deep flag for fern generate commands. This flag enables deep generation mode and ensures complete SDK generation with the latest CLI version. Changes include: - Added --deep flag documentation to CLI commands reference - Updated all SDK quickstart examples (C#, Go, Java, PHP, Python, Ruby, Swift, TypeScript, Postman) - Updated example output paths to reflect --deep flag usage
1 parent 7cc39d3 commit c20c995

File tree

10 files changed

+44
-36
lines changed

10 files changed

+44
-36
lines changed

fern/products/cli-api-reference/pages/commands.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,21 +174,29 @@ hideOnThisPage: true
174174

175175
<CodeBlock title="terminal">
176176
```bash
177-
fern generate [--group <group>] [--api <api>] [--version <version>] [--preview]
177+
fern generate [--deep] [--group <group>] [--api <api>] [--version <version>] [--preview]
178178
```
179179
</CodeBlock>
180180

181+
### deep
182+
183+
Use `--deep` to enable deep generation mode. This flag is recommended for the latest CLI version and ensures complete SDK generation.
184+
185+
```bash
186+
fern generate --deep --group ts-sdk
187+
```
188+
181189
### preview
182190

183191
Use `--preview` to test SDK changes locally before publishing. This is especially useful during development:
184192
- Generates SDK into a local `.preview/` folder
185193
- Allows quick iteration on your Fern definition
186194
- No changes are published to package managers or GitHub
187-
195+
188196
```bash
189197
# Preview all SDKs
190198
fern generate --preview
191-
199+
192200
# Preview specific SDK group
193201
fern generate --group python-sdk --preview
194202
```

fern/products/sdks/overview/csharp/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group csharp-sdk
45+
fern generate --deep --group csharp-sdk
4646
```
4747

4848
<Note>
4949
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5050

5151
```bash
52-
fern generate --group csharp-sdk --api your-api-name
53-
```
52+
fern generate --deep --group csharp-sdk --api your-api-name
53+
```
5454
</Note>
5555

5656
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5757

5858
```bash
5959
fern/ # created by fern init
60-
sdks/ # created by fern generate --group csharp-sdk
60+
sdks/ # created by fern generate --deep --group csharp-sdk
6161
├─ csharp
6262
└─ src/
6363
├─ YourOrganizationApi.sln

fern/products/sdks/overview/go/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group go-sdk
45+
fern generate --deep --group go-sdk
4646
```
4747

4848
<Note>
4949
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5050

5151
```bash
52-
fern generate --group go-sdk --api your-api-name
53-
```
52+
fern generate --deep --group go-sdk --api your-api-name
53+
```
5454
</Note>
5555

5656
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5757

5858
```bash
5959
fern/ # created by fern init
60-
sdks/ # created by fern generate --group go-sdk
60+
sdks/ # created by fern generate --deep --group go-sdk
6161
├─ go
6262
├─ core/
6363
└─ go.mod

fern/products/sdks/overview/java/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group java-sdk
45+
fern generate --deep --group java-sdk
4646
```
4747

4848
<Note>
4949
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5050

5151
```bash
52-
fern generate --group java-sdk --api your-api-name
53-
```
52+
fern generate --deep --group java-sdk --api your-api-name
53+
```
5454
</Note>
5555

5656
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5757

5858
```bash
5959
fern/ # created by fern init
60-
sdks/ # created by fern generate --group java-sdk
60+
sdks/ # created by fern generate --deep --group java-sdk
6161
├─ java
6262
├─ YourOrganizationApiClient.java
6363
├─ core/

fern/products/sdks/overview/php/quickstart.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,27 @@ This command adds the following `group` to `generators.yml`:
4343
Run the following command to generate your SDK:
4444
4545
```bash
46-
fern generate --group php-sdk
46+
fern generate --deep --group php-sdk
4747
```
4848

4949
<Note>
5050
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5151

5252
```bash
53-
fern generate --group php-sdk --api your-api-name
54-
```
53+
fern generate --deep --group php-sdk --api your-api-name
54+
```
5555
</Note>
5656

5757
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5858

5959
```bash
6060
fern/ # created by fern init
61-
sdks/ # created by fern generate --group php-sdk
61+
sdks/ # created by fern generate --deep --group php-sdk
6262
├─ php
6363
└─ sdk/
6464
├─ src/
6565
├─ YourOrganizationClient.php
66-
└─ Types/
66+
└─ Types/
6767
└─ tests/
6868
└─ Core/
6969
```

fern/products/sdks/overview/postman/quickstart.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ groups:
4646
Run the following command:
4747
4848
```sh
49-
fern generate --group postman
49+
fern generate --deep --group postman
5050
```
5151

5252
<Note>
5353
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5454

5555
```bash
56-
fern generate --group postman --api your-api-name
56+
fern generate --deep --group postman --api your-api-name
5757
```
5858
</Note>
5959

fern/products/sdks/overview/python/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group python-sdk
45+
fern generate --deep --group python-sdk
4646
```
4747

4848
<Note>
4949
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5050

5151
```bash
52-
fern generate --group python-sdk --api your-api-name
53-
```
52+
fern generate --deep --group python-sdk --api your-api-name
53+
```
5454
</Note>
5555

5656
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5757

5858
```bash
5959
fern/ # created by fern init
60-
sdks/ # created by fern generate --group python-sdk
60+
sdks/ # created by fern generate --deep --group python-sdk
6161
├─ python
6262
├─ __init__.py
6363
├─ client.py

fern/products/sdks/overview/ruby/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,22 @@ This command adds the following `group` to `generators.yml`:
4343
Run the following command to generate your SDK:
4444
4545
```bash
46-
fern generate --group ruby-sdk
46+
fern generate --deep --group ruby-sdk
4747
```
4848

4949
<Note>
5050
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5151

5252
```bash
53-
fern generate --group ruby-sdk --api your-api-name
54-
```
53+
fern generate --deep --group ruby-sdk --api your-api-name
54+
```
5555
</Note>
5656

5757
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5858

5959
```bash
6060
fern/ # created by fern init
61-
sdks/ # created by fern generate --group ruby-sdk
61+
sdks/ # created by fern generate --deep --group ruby-sdk
6262
├─ ruby
6363
├─ YourOrganization_api_client.gemspec
6464
├─ test/

fern/products/sdks/overview/swift/quickstart.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group swift-sdk
45+
fern generate --deep --group swift-sdk
4646
```
4747

4848
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
4949

5050
```bash
5151
fern/ # created by fern init
52-
sdks/ # created by fern generate --group swift-sdk
52+
sdks/ # created by fern generate --deep --group swift-sdk
5353
├─ swift
5454
├─ Package.swift
5555
└─ Sources

fern/products/sdks/overview/typescript/quickstart.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ This command adds the following `group` to `generators.yml`:
4242
Run the following command to generate your SDK:
4343
4444
```bash
45-
fern generate --group ts-sdk
45+
fern generate --deep --group ts-sdk
4646
```
4747

4848
<Note>
4949
If you have multiple APIs, use the [`--api` flag](/cli-api-reference/cli-reference/commands#api) to specify the API you want to generate:
5050

5151
```bash
52-
fern generate --group ts-sdk --api your-api-name
53-
```
52+
fern generate --deep --group ts-sdk --api your-api-name
53+
```
5454
</Note>
5555

5656
<Markdown src="/products/sdks/snippets/generate-sdk.mdx"/>
5757

5858
```bash
5959
fern/ # created by fern init
60-
sdks/ # created by fern generate --group ts-sdk
60+
sdks/ # created by fern generate --deep --group ts-sdk
6161
├─ typescript
6262
├─ Client.ts
6363
├─ index.ts

0 commit comments

Comments
 (0)