For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
预约演示登录免费开始
  • 使用 SDK
    • SDK 概述
    • SDK 如何工作
    • Quickstart
    • Customer showcase
  • 使用 SDK
    • 项目结构
    • 添加自定义代码
    • Migrating to Replay
    • 功能特性
  • 参考
  • 资源
    • generators.yml
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
预约演示登录免费开始
在本页
  • 下一步
使用 SDK

快速开始

||以 Markdown 格式查看|
此页面是否有帮助?
在仪表板中编辑
上一个

SDK 如何工作

下一个

项目结构

在 5 分钟内快速开始使用 Fern。本快速开始指南将引导您完成 CLI 安装、项目初始化和本地生成第一个 SDK。

1

Install the Fern CLI

$npm install -g fern-api
2

Initialize the fern folder

Initialize the fern folder with your existing OpenAPI specification. Specify your organization name using the --organization flag.

$fern init --openapi path/to/openapi.yml \
>--organization <YourOrganization>

OpenAPI accepts both JSON and YAML formats.

This creates a fern folder in your current directory.

fern
fern.config.json# root-level configuration
api# your API
generators.yml# generators you're using
openapi
openapi.yml# API-level configuration
3

Validate your API definition

Check that your API definition is valid, and fix errors before proceeding:

$fern check
4

生成

fern init 默认包含一个 TypeScript SDK 生成器。运行 fern generate 来看看它的实际效果:

$fern generate

这将创建一个包含生成的 SDK 的 sdks/typescript 文件夹:

fern# 由 fern init 创建
sdks# 由 fern generate 创建
typescript
Client.ts
index.ts
core
api

下一步

现在您已经有了一个工作的 SDK,可以设置 GitHub 仓库并配置发布,生成其他语言的 SDK,或了解更多关于 Fern SDK 的信息。

TypeScript

设置 GitHub,发布到 npm 等。

所有语言

查看所有支持的语言,包括 Python、Go 和 Java。

工作原理

了解 Fern SDK 生成管道。

项目结构

了解 Fern 的多仓库文件结构和 GitHub 设置。