Skip to content

Commit

Permalink
add clarity and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dannysheridan committed Jan 25, 2025
1 parent d1ea25b commit 291e41f
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions fern/pages/cli-api/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,29 @@ Get started with these commonly used commands:

<CodeBlock title="Common Commands">
```bash
# Documentation
# Docs Development
fern init --docs # Create a new documentation project
fern docs dev # Preview docs locally at http://localhost:3000
fern docs dev # Preview docs locally at localhost:3000
fern generate --docs --preview # Preview documentation changes
fern generate --docs # Generate and publish documentation

# SDK Development
fern init # Create a new SDK project
fern check # Validate your API definition
fern generate --preview # Preview all SDK changes in .preview/ folder
fern generate # Generate and publish SDKs for the default group
fern generate --group python-sdk # Generate an SDK for a specific group
fern init # Start new SDK project
fern check # Validate API definition
fern generate --preview # Preview SDKs in .preview/ folder
fern generate # Generate default SDK group
fern generate --group ts-sdk # Generate specific SDK group
```
</CodeBlock>

<Note>
The "default SDK group" refers to the group marked as default in your `generators.yml`. Learn more about [default groups](/learn/generate-sdks/configuration#default-group).
</Note>

## Common Workflows

<AccordionGroup>
<Accordion title="Setting up a new documentation site">
<Accordion title="Setting up Docs">
1. Initialize a new docs project:
```bash
fern init --docs
Expand Down Expand Up @@ -66,24 +70,6 @@ fern generate --group python-sdk # Generate an SDK for a specific group
</Tip>
</Accordion>

<Accordion title="Converting from OpenAPI">
1. Place your OpenAPI spec in `fern/openapi/`

2. Generate a Fern definition:
```bash
fern write-definition
```

3. Generate OpenAPI overrides (optional):
```bash
fern write-overrides
```

4. Generate SDKs or docs:
```bash
fern generate [--docs]
```
</Accordion>
</AccordionGroup>

## Command Reference
Expand Down

0 comments on commit 291e41f

Please sign in to comment.