Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 1, 2025

🌿 Fern Scribe Documentation Update

Original Request: Update docs to add cleared outline of fern convert

Files Updated:

  • fern/products/fern-def/pages/export-openapi.mdx

Priority: Medium

Related Discussion: https://buildwithfern.slack.com/archives/C06UVH9HKRC/p1750703512877769

Additional Context: No response

⚠️ Files with MDX Validation Issues

The following files could not be updated due to MDX validation failures after 3 attempts:

1. /learn/cli-api-reference/cli-reference/commands (Commands)

Suggested Content (needs manual MDX fixes):

---
title: 'Commands'
description: 'Complete reference for all Fern CLI commands for generating SDKs and developer documentation.'
subtitle: 'Learn about the Fern CLI commands.'
hideOnThisPage: true
---

| Command | Description |
|---------|-------------|
| [`fern init`](#fern-init) | Create new Fern project from OpenAPI spec or scratch |
| [`fern check`](#fern-check) | Validate API definition & configuration |
| [`fern upgrade`](#fern-upgrade) | Update Fern CLI & generators to latest versions |

## Documentation Commands

| Command | Description |
|---------|-------------|
| [`fern docs dev`](#fern-docs-dev) | Run local documentation preview server |
| [`fern generate --docs`](#fern-generate---docs) | Build & publish documentation updates |

## SDK Generation Commands  

| Command | Description |
|---------|-------------|
| [`fern generate`](#fern-generate) | Build & publish SDK updates |
| [`fern write-definition`](#fern-write-definition) | Convert OpenAPI specifications to [Fern Definition](/learn/api-definition/fern/overview) |
| [`fern write-overrides`](#fern-write-overrides) | Create OpenAPI customizations |
| [`fern generator upgrade`](#fern-generator-upgrade) | Update SDK generators to latest versions |

## Detailed Command Documentation

<AccordionGroup>
  <Accordion title="fern init">

    Use `fern init` to initialize a new Fern workspace in the current folder. By default, you'll see the IMDb API example.

    <CodeBlock title="terminal">
    ```bash
    fern init [--docs] [--openapi <path/url>]
    ```
    </CodeBlock>

    When initializing with OpenAPI, your project structure will look like this:

    ```bash
    fern/
    ├─ fern.config.json
    ├─ generators.yml # generators you're using
    └─ openapi/
        └─ openapi.json # your OpenAPI specification
    ```

    For Fern Definition initialization (without OpenAPI), you'll see this structure:

    ```bash
    fern/
    ├─ fern.config.json
    ├─ generators.yml # generators you're using
    └─ definition/
        ├─ api.yml  # API-level configuration
        └─ imdb.yml # endpoints, types, and errors
    ```

    ### openapi

    Use `--openapi` to initialize a project from an OpenAPI specification:

    ```bash
    # Initialize from local file
    fern init --openapi ./path/to/openapi.yml

    # Initialize from URL
    fern init --openapi https://link.buildwithfern.com/petstore-openapi
    ```

    ### docs

    By adding `--docs`, you'll also get a sample documentation website for your API with an API Reference section.

    ```bash
    fern init --docs
    ```

    The file added will contain:

    ```yaml docs.yaml
    instances:
      - url: https://your-organization.docs.buildwithfern.com
    title: Your Organization | Documentation
    navigation:
      - api: API Reference
    colors:
    accent-primary: '#ffffff'
    background: '#000000'
    ```

    To publish the API docs, run [`fern generate --docs`](/learn/cli-api/cli-reference/commands#fern-generate---docs).

    ### mintlify

    By adding `--mintlify PATH_TO_MINT_CONFIG`, the CLI will automatically convert your Mintlify docs folder into a Fern docs site, based on the `mint.json` file.

    ```bash
    fern init --mintlify PATH_TO_MINT_CONFIG
    ```

    The CLI will create a `fern/` folder with the following structure:

    ```bash
    fern/
    ├─ fern.config.json # root-level configuration
    ├─ docs.yml # docs configuration
    └─ ... # any other files / pages needed in your docs
    ```

    ### readme

    The `fern init` command supports importing Readme generated docs sites. This requires having a local chromium browser instance installed.
    You can ensure this is installed by installing the `fern` cli from source, following the instructions [here](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md).

    By adding `--readme URL_TO_README_DOCS_SITE`, the CLI will automatically convert the Readme generated docs site into a Fern docs site.

    ```bash
    fern init --readm

... [Content truncated due to length]

Note: These files require manual review and correction of their MDX component structure before the content can be applied.


This PR was automatically generated by Fern Scribe based on issue #319

Please review the changes carefully before merging.

Copy link
Contributor Author

This PR is stale because it has been open 25 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale This PR hasn't has any commits or comments in 25 days or more. label Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale This PR hasn't has any commits or comments in 25 days or more.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants