# Fern Writer

> A Slack-based technical writing agent that updates your documentation via GitHub pull requests

Fern Writer is a Slack-based technical writing agent that keeps your docs aligned as your product evolves. It's powered by [Devin from Cognition](https://cognition.ai/blog/introducing-devin). Fern Writer understands Fern components and your writing style, and can be customized via an `AGENTS.md` file in your docs repository.

## How it works

In Slack channels where you've added Fern Writer, tag `@Fern Writer` and describe the change you need. Fern Writer only responds when directly tagged. It will react to your message to confirm receipt, then create a pull request and reply with a link.

Fern Writer supports image and file attachments for additional context. When tagged in an existing thread, it reads the full conversation to understand context before responding.

| Use case                                   | Sample request                                                                                             |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
| Document a new feature from a pull request | `@Fern Writer document the new rate limiting feature added in PR #123`                                     |
| Add new content to existing pages          | `@Fern Writer add a section about webhook retry behavior to the webhooks guide`                            |
| Reorganize and consolidate content         | `@Fern Writer merge the authentication and authorization pages, and add a redirect from the old auth page` |
| Fix errors and improve clarity             | `@Fern Writer fix the broken code example in the quickstart and update the package version to v2.1.0`      |

Request changes by commenting in the Slack thread or directly on the PR. Fern Writer responds to feedback from both humans and automated review tools. Once the PR meets your requirements, merge it like any other pull request.

<Note>
  **Coming soon**: Automatic documentation updates based on code changes and releases.
</Note>

<Accordion title="Video example">
  <video src="https://files.buildwithfern.com/fern.docs.buildwithfern.com/learn/e2a4ce182833ebea8991916f8e28c0fea463fc1b95049d5b972993d7e80a222a/products/docs/pages/ai/fern-writer.mp4" autoPlay loop controls playsInline muted />
</Accordion>

## Setup

To start using Fern Writer, add it to your Slack workspace (you must be a Slack admin) and invite it to channels where your team discusses documentation.

<Steps>
  <Step title="Get your unique install link">
    [Get a unique Slack installation link](/learn/docs/scribe-api/fern-writer-api/get-fern-writer-install-link) for your organization. Provide:

    * Your [Fern token](/learn/cli-api-reference/cli-reference/commands#fern-token)
    * The GitHub repository containing your documentation in `owner/repo` format (e.g., `acme/docs`). The [Fern GitHub App](https://github.com/apps/fern-api) must be installed in the repository.

    You can alternatively use this cURL request:

    ```bash
    curl -G https://fai.buildwithfern.com/scribe/slack/get-install \
         -H "Authorization: Bearer <YOUR_FERN_TOKEN>" \
         --data-urlencode github_repo=<OWNER/REPO>
    ```

    Follow the URL returned in the response.
  </Step>

  <Step title="Add to your workspace">
    You'll be redirected to Slack to authorize Fern Writer. Select the workspace where you want to add Fern Writer and click **Allow**.
  </Step>

  <Step title="Add to channels">
    Once installed, add Fern Writer to Slack channels where your team discusses documentation.
  </Step>
</Steps>