[](https://www.npmjs.com/package/fern-api)
[](https://www.ycombinator.com/companies/fern)

[](https://buildwithfern.com/learn/home?utm_source=fern-api/fern/readme-read-our-documentation)
[](https://buildwithfern.com/book-demo?utm_source=fern-github-readme)
[](https://dashboard.buildwithfern.com/sign-up?redirect_on_login=%2Fget-started&utm_source=fern-github-readme)
## 🌿 SDKs
The Fern platform is available via a command line interface (CLI) and requires Node 18+. To install it, run:
```bash
npm install -g fern-api
```
Initialize Fern with your OpenAPI spec:
```bash
fern init --openapi ./path/to/openapi.yml
# or
fern init --openapi https://link.buildwithfern.com/plantstore-openapi
```
Your directory should look like the following:
```yaml
fern/
├─ fern.config.json
├─ generators.yml # generators you're using
└─ openapi/
└─ openapi.json # your openapi document
```
Finally, to invoke the generator, run:
```bash
fern generate
```
🎉 Once the command completes, you'll see your SDK in `/generated/sdks/typescript`.
## 🌿 API Documentation
Fern can also build and host a documentation website with an auto-generated API reference. Write additional pages in markdown and have them versioned with git.
Search, SEO, dark mode, and popular components are provided out-of-the-box. Plus, you can customize the colors, font, logo, and domain name.
Check out docs built with Fern:
- [elevenlabs.io/docs](https://elevenlabs.io/docs)
- [launchdarkly.com/docs](https://launchdarkly.com/docs/home)
- [docs.hume.ai](https://docs.hume.ai/)
Get started [here](https://github.com/fern-api/docs-starter).
## 🌿 Generators
Generators are processes that take your API Definition as input and output artifacts (SDKs, Server boilerplate, etc.). To add a generator, run `fern add `.
### SDK Generators
| Generator ID | Latest Version | Changelog |
| ---------------------------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `fernapi/fern-typescript-sdk` |  | [Changelog](https://buildwithfern.com/learn/sdks/generators/typescript/changelog) |
| `fernapi/fern-python-sdk` |  | [Changelog](https://buildwithfern.com/learn/sdks/generators/python/changelog) |
| `fernapi/fern-java-sdk` |  | [Changelog](https://buildwithfern.com/learn/sdks/generators/java/changelog) |
| `fernapi/fern-ruby-sdk` |  | [Changelog](https://buildwithfern.com/learn/sdks/generators/ruby/changelog) |
| `fernapi/fern-go-sdk` |  | [Changelog](https://buildwithfern.com/learn/sdks/generators/go/changelog) |
| `fernapi/fern-csharp-sdk` |  | [Changelog](https://buildwithfern.com/learn/sdks/generators/csharp/changelog) |
| `fernapi/fern-php-sdk` |  | [Changelog](https://buildwithfern.com/learn/sdks/generators/php/changelog) |
| `fernapi/fern-swift-sdk` |  | [Changelog](https://buildwithfern.com/learn/sdks/generators/swift/changelog) |
| `fernapi/fern-rust-sdk` |  | [Changelog](https://buildwithfern.com/learn/sdks/generators/rust/changelog) |
### Spec Generators
Fern's spec generators can output an OpenAPI spec.
> **Note**: The OpenAPI spec generator is primarily intended for Fern Definition users. This prevents lock-in so that one can always export to OpenAPI.
| Generator ID | Latest Version | Changelog |
| ---------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------ |
| `fernapi/fern-openapi` |  | [versions.yml](./generators/openapi/versions.yml) |
## 🌿 CLI Commands
Here's a quick look at the most popular CLI commands. View the documentation for [all CLI commands](https://buildwithfern.com/learn/cli-api/cli-reference/commands).
`fern init`: adds a new starter API to your repository.
`fern check`: validate your API definition and Fern configuration.
`fern generate`: run the generators specified in `generators.yml` in the cloud.
`fern generate --local`: run the generators specified in `generators.yml` in docker locally.
`fern add `: include a new generator in your `generators.yml`. For example, `fern add fern-python-sdk`.
## Inspiration
Fern is inspired by internal tooling built to enhance the developer experience. We stand on the shoulders of giants. While teams were responsible for building the following tools, we want to give a shout out to Mark Elliot (creator of Conjure at Palantir), Michael Dowling (creator of Smithy at AWS), and Ian McCrystal (creator of Stripe Docs).
## Community
[Join our Slack!](https://buildwithfern.com/slack) We are here to answer questions and help you get the most out of Fern.
## Contributing
We welcome community contributions. For guidelines, refer to our [CONTRIBUTING.md](/CONTRIBUTING.md). To contribute to our documentation, refer to our [docs](https://github.com/fern-api/docs) repo.
### Development Environment
This repository uses [DevBox](https://www.jetify.com/devbox) for reproducible development environments. DevBox provides cross-platform support (Mac, Linux, Windows via WSL) with exact version pinning based on Nix.
To get started:
```bash
# Install DevBox (https://www.jetify.com/devbox/docs/installing_devbox/)
curl -fsSL https://get.jetify.com/devbox | bash
# Enter the development environment
devbox shell
```
DevBox automatically installs all required dependencies including Node.js, pnpm, Go, Python, Poetry, JDK, and buf with pinned versions matching CI.
