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
2 changes: 1 addition & 1 deletion .github/workflows/api-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: API Changelog Automation
on:
pull_request:
paths:
- 'fern/definition/**/*.yml'
- 'fern/apis/api/definition/**/*.yml'
workflow_dispatch:

jobs:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/regenerate-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Regenerate CLI

# Regenerates the CLI from the Fern Definition: exports the OpenAPI spec,
# refreshes fern/apis/cli/openapi.yml, then runs the fern-cli generator.
#
# NOTE: today the `cli` group outputs to the local file system, so a CI run
# regenerates into the runner and the artifacts are discarded — this workflow
# is intentionally a no-op end-to-end for now. Once the `cli` group's output is
# switched to a GitHub repo target (like the SDK release workflows), this will
# publish the CLI. Manual-only until then.
on:
workflow_dispatch:

jobs:
regenerate-cli:
# `fern generate --local` runs the generators in Docker. GitHub-hosted
# ubuntu runners ship Docker pre-installed with the daemon running, so no
# explicit Docker setup is needed (same pattern as fern's own
# python-generator CI and anduril/fern-mock-andurilapis generate-sdks).
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Fern
run: npm install -g fern-api

- name: Export OpenAPI spec from the Fern Definition
working-directory: fern
run: fern generate --api api --group openapi --local
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}

- name: Refresh the CLI input spec
run: cp openapi/openapi.yml fern/apis/cli/openapi.yml

- name: Generate the CLI
working-directory: fern
run: fern generate --api cli --group cli --local
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
7 changes: 3 additions & 4 deletions .github/workflows/sync-stainless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ on:
branches:
- main
paths:
- "fern/definition/**"
- "fern/generators.yml"
- "fern/api.yml"
- "fern/apis/api/definition/**"
- "fern/apis/api/generators.yml"

jobs:
sync:
Expand All @@ -22,7 +21,7 @@ jobs:

- name: Generate OpenAPI spec
working-directory: fern
run: fern generate --group openapi --local
run: fern generate --api api --group openapi --local
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}

Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ node_modules/
**/generated/
.DS_Store
*-openapi.json

# Generated CLI build artifacts
/cli/target/

# Transient OpenAPI export (regenerated in CI, pushed to Stainless)
/openapi/
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Instructions for creating changelog entries (e.g. when asked in #github-prs with

## When you're invoked

- **API changes:** A PR that touches `fern/definition/**` triggers a GitHub Action. It posts an oasdiff (technical diff) on the PR and uploads it as the `api-changelog-diff` artifact. Someone may tag you with that PR or paste the diff.
- **API changes:** A PR that touches `fern/apis/api/definition/**` triggers a GitHub Action. It posts an oasdiff (technical diff) on the PR and uploads it as the `api-changelog-diff` artifact. Someone may tag you with that PR or paste the diff.
- **Manual:** For non-API changes, create `fern/changelog/YYYY-MM-DD.mdx` and follow the structure below. Use `fern/changelog/TEMPLATE.mdx` as reference.
- **Output:** Create or edit files in `fern/changelog/`. File name: `YYYY-MM-DD.mdx` (same day = add suffix e.g. `2026-01-30-metrics.mdx`).

Expand Down Expand Up @@ -79,14 +79,14 @@ slug: knowledge-base/article-slug
Match Resend KB quality. Articles should include:

- **Tables** for DNS record fields, comparison matrices, etc.
- **Code examples** using the actual AgentMail SDK (Python primary, verify API signatures against `fern/definition/` or existing docs)
- **Code examples** using the actual AgentMail SDK (Python primary, verify API signatures against `fern/apis/api/definition/` or existing docs)
- **Warnings/Notes** using `<Warning>` and `<Note>` Fern components for provider-specific gotchas
- **Troubleshooting section** ("Common Issues") for DNS guides and similar
- **Verification section** for setup guides (propagation times, how to confirm success)

## Code accuracy

- Always verify SDK method signatures against `fern/pages/core-concepts/` docs or `fern/definition/` YAML
- Always verify SDK method signatures against `fern/pages/core-concepts/` docs or `fern/apis/api/definition/` YAML
- `to`, `cc`, `bcc` are `list<string>` on messages
- Webhook payloads use `payload["message"]` for `message.received` events (not `payload["data"]`)
- WebSocket SDK uses `client.websockets.connect()` with typed events (`Subscribe`, `Subscribed`, `MessageReceivedEvent`)
Expand Down
Loading
Loading