Skip to content

Commit 873fe78

Browse files
authored
Merge branch 'main' into bc/local-instance
2 parents 2bef006 + 34542a0 commit 873fe78

File tree

117 files changed

+36757
-11080
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+36757
-11080
lines changed

.cursorrules

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
You are the world's best documentation writer, renowned for your clarity, precision, and engaging style. Every piece of documentation you produce is:
2+
3+
1. Clear and precise - no ambiguity, jargon, marketing language or unnecessarily complex language.
4+
2. Concise—short, direct sentences and paragraphs.
5+
3. Scientifically structured—organized like a research paper or technical white paper, with a logical flow and strict attention to detail.
6+
4. Visually engaging—using line breaks, headings, and (rarely) components to enhance readability.
7+
5. Focused on user success — no marketing language or fluff; just the necessary information.
8+
9+
# Writing guidelines
10+
11+
- Titles must always start with an uppercase letter, followed by lowercase letters unless it is a name. Examples: Getting started, Text to speech, Conversational AI...
12+
- No emojis or icons unless absolutely necessary.
13+
- Scientific research tone—professional, factual, and straightforward.
14+
- Avoid long text blocks. Use short paragraphs and line breaks.
15+
- Do not use marketing/promotional language.
16+
- Be concise, direct, and avoid wordiness.
17+
- Ensure there are well-designed links (if applicable) to take the technical or non-technical reader to the relevant page.
18+
19+
# Page structure
20+
21+
## Components
22+
23+
Use the following components if possible, don't overuse them.
24+
25+
### Accordions
26+
27+
````
28+
<AccordionGroup>
29+
<Accordion title="Option 1">
30+
You can put other components inside Accordions.
31+
```ts
32+
export function generateRandomNumber() {
33+
return Math.random();
34+
}
35+
```
36+
</Accordion>
37+
<Accordion title="Option 2">
38+
This is a second option.
39+
</Accordion>
40+
41+
<Accordion title="Option 3">
42+
This is a third option.
43+
</Accordion>
44+
</AccordionGroup>
45+
````
46+
47+
### Callouts (Tips, Notes, Warnings, etc.)
48+
49+
```
50+
<Tip title="Example Callout" icon="leaf">
51+
This Callout uses a title and a custom icon.
52+
</Tip>
53+
<Note>This adds a note in the content</Note>
54+
<Warning>This raises a warning to watch out for</Warning>
55+
<Error>This indicates a potential error</Error>
56+
<Info>This draws attention to important information</Info>
57+
<Tip>This suggests a helpful tip</Tip>
58+
<Check>This brings us a checked status</Check>
59+
```
60+
61+
### Cards & Card Groups
62+
63+
```
64+
<Card
65+
title='Python'
66+
icon='brands python'
67+
href='https://github.com/fern-api/fern/tree/main/generators/python'
68+
>
69+
View Fern's Python SDK generator.
70+
</Card>
71+
<CardGroup cols={2}>
72+
<Card title="First Card" icon="circle-1">
73+
This is the first card.
74+
</Card>
75+
<Card title="Second Card" icon="circle-2">
76+
This is the second card.
77+
</Card>
78+
<Card title="Third Card" icon="circle-3">
79+
This is the third card.
80+
</Card>
81+
<Card title="Fourth Card" icon="circle-4">
82+
This is the fourth and final card.
83+
</Card>
84+
</CardGroup>
85+
```
86+
87+
### Code snippets
88+
89+
- Always use the focus attribute to highlight the code you want to highlight.
90+
- `maxLines` is optional if it's long.
91+
- `wordWrap` is optional if the full text should wrap and be visible.
92+
93+
```javascript focus={2-4} maxLines=10 wordWrap
94+
console.log('Line 1');
95+
console.log('Line 2');
96+
console.log('Line 3');
97+
console.log('Line 4');
98+
console.log('Line 5');
99+
```
100+
101+
### Code blocks
102+
103+
- Use code blocks for groups of code, especially if there are multiple languages or if it's a code example. Always start with Python as the default.
104+
105+
````
106+
<CodeBlocks>
107+
```javascript title="helloWorld.js"
108+
console.log("Hello World");
109+
````
110+
111+
```python title="hello_world.py"
112+
print('Hello World!')
113+
```
114+
115+
```java title="HelloWorld.java"
116+
class HelloWorld {
117+
public static void main(String[] args) {
118+
System.out.println("Hello, World!");
119+
}
120+
}
121+
```
122+
123+
</CodeBlocks>
124+
```
125+
126+
### Steps (for step-by-step guides)
127+
128+
```
129+
<Steps>
130+
### First Step
131+
Initial instructions.
132+
133+
### Second Step
134+
More instructions.
135+
136+
### Third Step
137+
Final Instructions
138+
</Steps>
139+
140+
```
141+
142+
### Frames
143+
144+
- You must wrap every single image in a frame.
145+
- Every frame must have `background="subtle"`
146+
- Use captions only if the image is not self-explanatory.
147+
- Use ![alt-title](image-url) as opposed to HTML `<img>` tags unless styling.
148+
149+
```
150+
<Frame
151+
caption="Beautiful mountains"
152+
background="subtle"
153+
>
154+
<img src="https://images.pexels.com/photos/1867601.jpeg" alt="Sample photo of mountains" />
155+
</Frame>
156+
157+
```
158+
159+
### Tabs (split up content into different sections)
160+
161+
```
162+
<Tabs>
163+
<Tab title="First Tab">
164+
☝️ Welcome to the content that you can only see inside the first Tab.
165+
</Tab>
166+
<Tab title="Second Tab">
167+
✌️ Here's content that's only inside the second Tab.
168+
</Tab>
169+
<Tab title="Third Tab">
170+
💪 Here's content that's only inside the third Tab.
171+
</Tab>
172+
</Tabs>
173+
174+
```

.devrev/repo.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deployable: true

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/changelog.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ jobs:
1111
steps:
1212
- name: Get current date
1313
id: date
14+
env:
15+
GH_TOKEN: ${{ github.token }}
16+
PR_NUMBER: ${{ github.event.number }}
1417
run: |
15-
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
18+
DATE=$(gh pr view --repo https://github.com/devrev/fern-api-docs ${{ env.PR_NUMBER }} --json createdAt --jq .[] | cut -d 'T' -f 1)
19+
echo "DATE=$DATE" >> $GITHUB_ENV
20+
echo "Date PR opened is ${{ env.DATE }}"
1621
- name: Check out repository content
1722
uses: actions/checkout@v2
1823
with:

.github/workflows/ekline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
permissions: write-all
99
jobs:
1010
test-pr-review:
11-
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'No EkLine') == false
11+
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'No EkLine') && !contains(github.event.pull_request.labels.*.name, 'stylecheck')
1212
name: runner / EkLine Reviewer (github-pr-review)
1313
runs-on: ubuntu-latest
1414
steps:

.github/workflows/fern-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
registry-url: https://npm.pkg.github.com/
2121
env:
2222
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
23+
2324

2425
- name: Build Navigation
2526
run: |

.github/workflows/preview-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
registry-url: https://npm.pkg.github.com/
2323
env:
2424
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
25+
2526

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

.github/workflows/publish-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
registry-url: https://npm.pkg.github.com/
2222
env:
2323
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
24+
2425

2526
- name: Download Fern
2627
run: npm install -g fern-api

.github/workflows/publish-typescript.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
registry-url: https://npm.pkg.github.com/
2929
env:
3030
NODE_AUTH_TOKEN: ${{secrets.AUTH_TOKEN}}
31+
3132

3233
- name: Build Navigation
3334
run: |

.github/workflows/stylecheck.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: PR Review Suggestions
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, labeled, unlabeled]
6+
paths:
7+
- '**.md'
8+
- '**.mdx'
9+
10+
jobs:
11+
suggest:
12+
if: contains(github.event.pull_request.labels.*.name, 'stylecheck') && !contains(github.event.pull_request.labels.*.name, 'stylecheck-complete')
13+
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: write
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: '3.x'
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install requests
31+
32+
- name: Run stylecheck on changed files
33+
id: stylecheck
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.STYLECHECK }}
36+
LLM_JWT: ${{ secrets.LLM_JWT }}
37+
REPO_OWNER: ${{ github.repository_owner }}
38+
REPO_NAME: ${{ github.event.repository.name }}
39+
PR_NUMBER: ${{ github.event.pull_request.number }}
40+
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
41+
run: |
42+
echo "DATE=$(date +'%Y-%m-%d-%H%M%S')" >> $GITHUB_ENV
43+
mkdir -p temp
44+
for file in $(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -E '\.mdx?$'); do
45+
python stylecheck.py --style=style/developer.md "$file"
46+
done
47+
- name: Add success label
48+
if: success() && steps.stylecheck.outcome == 'success'
49+
run: |
50+
gh pr edit ${{ github.event.pull_request.number }} --add-label "stylecheck-complete"
51+
env:
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
- name: Archive temp files
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: stylecheck-${{ env.DATE }}
57+
path: temp/**

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ fern/dist
33
fern/*/definition/
44
.DS_Store
55
.idea
6-
temp
6+
temp
7+
__pycache__

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,18 @@ fern docs dev
4242
### Troubleshooting
4343

4444
If you run into errors, you can add the ` --log-level debug` flag to get more information.
45+
46+
## Stylecheck (Beta)
47+
48+
The `stylecheck.py` script sends a markdown file to Claude Sonnet for revision according to defined style, structure, and terminology rules.
49+
50+
### GitHub action
51+
If a PR has the label `stylecheck` and not the label `stylecheck-complete`, the `stylecheck.py` script runs on any `.md(x)` files changed in the PR. A summary of changes is posted as a comment on the timeline. Suggestions for the diff context are added. If there are any proposed revisions outside the diff context, the full text of the revision is included in the summary comment.
52+
53+
When the action completes, it adds the `stylecheck-complete` tag. If you want stylecheck to run on new changes on a PR where it has already run, remove the `stylecheck-complete` label before pushing the new changes.
54+
55+
### Local execution
56+
To run the script locally and not as part of a PR, set your environment variable `LLM_TOKEN` to your PAT from [OpenWebUI](https://openwebui.dev.devrev-eng.ai/) > **Settings** > **Account** > API Keys. Include the supplemental developer style rules with the `--style` option.
57+
```
58+
python stylecheck.py --style=style/developer.md <path/to/file.mdx>
59+
```

0 commit comments

Comments
 (0)