# Quickstart > Set up the fern folder Configuring Fern starts with the `fern` folder, the root directory that contains your API definitions, generators, and your CLI version. ## Set up the fern folder ### Install the Fern CLI Run the following command to install the CLI tool or update it to the latest version: ```bash npm install -g fern-api ``` ### Initialize the Fern Folder You can initialize your fern folder with either a Fern Definition or OpenAPI specification. You can always convert a [Fern Definition to OpenAPI](/api-definitions/ferndef/export-openapi) or OpenAPI to a Fern Definition later on. Initialize the fern folder using your OpenAPI Specification. Fern can handle both JSON and YML formats for OpenAPI specifications and the `--openapi` flag accepts either format, so you can use whichever format your API spec is available in. Run one of the following commands based on your spec's location:test ```bash fern init --openapi path/to/openapi.yml \ --organization ``` ```bash fern init --openapi https://api.example.com/openapi.yml \ --organization ``` `--organization ` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK. This creates a `fern` folder in your current directory with the OpenAPI Specification. The exact folder structure might look different depending on your initial input files. ```bash fern/ ├─ fern.config.json # root-level configuration └─ api/ # your API ├─ generators.yml # generators you're using └─ openapi/ ├─ openapi.yml # API-level configuration ``` 1. Initialize the fern folder using the Fern Definition by running the following command: ```bash fern init --organization ``` `--organization ` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK. This creates a `fern` folder in your current directory with the Fern Definition. ```bash fern/ ├─ fern.config.json # root-level configuration ├─ generators.yml # generators you're using └─ definition/ ├─ api.yml # API-level configuration └─ imdb.yml # endpoints, types, and errors ``` `imdb.yml` contains an example movies API. If you’re just generating an SDK for test purposes, you can leave this file as it is. To generate an SDK for your own API instead of the example movies API, replace `imdb.yml` with your own endpoints, types, and errors before proceeding with the rest of this page. {/* TODO: show what generators.yml looks like, link out to configuration.md */} {/* Initialize the fern folder using your AsyncAPI Specification. Run one of the following commands based on your spec's location. Fern can handle both JSON and YML formats for AsyncAPI specifications, and the --openapi flag accepts either format, so you can use whichever format your API spec is available in. `--organization ` configures your organization name in `fern.config.json`. This is required in order to successfully generate your SDK. ```bash fern init --asyncapi path/to/asyncapi.yml --organization ``` ```bash fern init --asyncapi https://api.example.com/asyncapi.yml --organization ``` This creates a `fern` folder in your current directory with the AsyncAPI Specification. The exact folder structure might look different depending on your initial input files. ```bash fern/ ├─ fern.config.json # root-level configuration └─ api/ # your API ├─ generators.yml # generators you're using └─ openapi/ ├─ openapi.yml # API-level configuration ``` */} ### Next: Set up your repository structure Now that you have your `fern` folder initialized, [learn how to organize your repositories for SDK generation](/sdks/overview/project-structure).