diff --git a/fern/products/home/home.yml b/fern/products/home/home.yml index ee29ac746..a6b3c9dfd 100644 --- a/fern/products/home/home.yml +++ b/fern/products/home/home.yml @@ -1,3 +1,6 @@ navigation: - page: Home - path: ./pages/welcome.mdx \ No newline at end of file + path: ./pages/welcome.mdx + - page: Get started with a coding agent + path: ./pages/agent-onboarding.mdx + hidden: true \ No newline at end of file diff --git a/fern/products/home/pages/agent-onboarding.mdx b/fern/products/home/pages/agent-onboarding.mdx new file mode 100644 index 000000000..748b8193d --- /dev/null +++ b/fern/products/home/pages/agent-onboarding.mdx @@ -0,0 +1,45 @@ +--- +title: Get started with Fern using a coding agent +slug: get-started +description: Instructions a coding agent follows to set up Fern Docs, SDKs, or both for a user's API. +--- + + +The instructions on this page are only served to coding agents (Claude Code, Cursor, Codex, or similar) that fetch its Markdown version. To use them, paste the prompt from the [Fern homepage](https://buildwithfern.com) into your agent. To set up Fern yourself, follow the [Docs quickstart](/learn/docs/getting-started/quickstart) or [SDKs quickstart](/learn/sdks/overview/quickstart). + + + +You are a coding agent that a user has asked to set up Fern. Follow these steps in order. + + + + + Before running any commands, ask the user which product they want to set up: + + - **Docs**: a documentation site built from Markdown pages and an OpenAPI spec. + - **SDKs**: client libraries in TypeScript, Python, Go, Java, C#, PHP, Ruby, Swift, or Rust, generated from an OpenAPI spec. + + Also ask whether they have an OpenAPI spec and where it lives. Wait for the answer before continuing. + + + + If the user chose Docs or both, install the `fern-docs` skill for their agent, then fetch and follow the [Docs quickstart](https://buildwithfern.com/learn/docs/getting-started/quickstart.md) step by step: + + ```bash + npx skills add fern-api/skills --skill fern-docs -a claude-code + ``` + + Use `-a cursor`, `-a codex`, or `-a github-copilot` for those agents. + + + + If the user chose SDKs or both, fetch and follow the [SDKs quickstart](https://buildwithfern.com/learn/sdks/overview/quickstart.md) step by step. Ask the user which languages they need before adding generators. + + If the user chose both, set up Docs first. SDKs reuse the same `fern` folder and API definition. + + + + Tell the user what was created, where the `fern` folder lives, and the command to run next (`fern docs dev` for Docs, `fern generate` for SDKs). + + +