# Set up local SDK previews > Learn how to set up local SDK previews with Fern's --preview flag. Test generated SDK code locally before publishing to iterate quickly. Once you configure your SDK, you can use the `--preview` flag to test generated SDK code locally before publishing. This allows quick iteration on your SDK as you develop: ```bash # Preview all SDKs fern generate --preview # Preview SDK for a specific language fern generate --group -sdk --preview ``` `--preview` generates your SDK code into a local `.preview/` folder within your `fern` folder. No changes are published to package managers or GitHub. `--preview` preserves any custom code you added to your SDK. ## Example usage Here's an example of how you can preview a Python SDK. ### Generator configuration ```yaml title="generators.yml" {4} api: path: ./path/to/openapi.yml groups: python-sdk: generators: - name: fernapi/fern-python-sdk version: 4.48.1 output: location: pypi package-name: imdb token: ${PYPI_TOKEN} github: repository: imdb/imdb-python config: client_class_name: imdb ``` ### Invoke the Fern CLI ```shell fern generate --group python-sdk --preview ``` ### Preview your SDK The resulting folder structure will look like this: