Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion fern/products/home/home.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
navigation:
- page: Home
path: ./pages/welcome.mdx
path: ./pages/welcome.mdx
- page: Get started with a coding agent
path: ./pages/agent-onboarding.mdx
hidden: true
45 changes: 45 additions & 0 deletions fern/products/home/pages/agent-onboarding.mdx
Original file line number Diff line number Diff line change
@@ -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.
---

<llms-ignore>
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).
</llms-ignore>

<llms-only>
You are a coding agent that a user has asked to set up Fern. Follow these steps in order.

<Steps>
<Step title="Ask which product to set up">

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.
</Step>
<Step title="Set up Docs">

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.
</Step>
<Step title="Set up SDKs">

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.
</Step>
<Step title="Confirm the result">

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).
</Step>
</Steps>
</llms-only>
Loading