Skip to content
Merged
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
35 changes: 12 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,43 +51,32 @@ If Cortex helps your team, [star this repository](https://github.com/cortex-docs

## Try Cortex in 60 seconds

Create a sample project and inspect the generation plan:
Start a local demo:

```bash
mkdir petstore
cd petstore
npm install --global @cortex-docs/cli
cortex init petstore
cortex validate
cortex generate --dry-run
cortex docs serve
```

Cortex validates each source and shows every planned output:

```text
✓ Config is valid
✓ Parsed AsyncAPI: WebSocket API
✓ Parsed GraphQL: GraphQL
✓ Parsed OpenRPC: OpenRPC
✓ Parsed OpenAPI: REST API V1
Languages: typescript, python, go, java, kotlin, ruby, php, csharp, rust, cpp, c

typescript [REST + WS + GraphQL + OpenRPC] → generated/typescript/petstore-typescript-client-sdk
python [REST + WS + GraphQL + OpenRPC] → generated/python/petstore-python-sdk
...
mcp-server → generated/mcp-server
```
Open `http://localhost:3012`. Press `Ctrl+C` to stop the server.

The generated MCP server gives AI agents typed tools, specifications, SDK guides, and project documentation.
## We love open source

Generate the files. Then start the local documentation preview:
Keep your Markdown in Git. Add `cortex.config.yml` to the default branch of your public GitHub repository, then run:

```bash
cortex generate
cortex docs serve
npx -y @cortex-docs/cli deploy https://github.com/OWNER/REPO
npx -y @cortex-docs/cli mcp-serve https://github.com/OWNER/REPO
```

Open `http://localhost:3012`. Press `Ctrl+C` to stop the server.
The first command publishes a free documentation site at `PROJECT.cortexdocs.dev`. The second connects AI clients to current documentation through local MCP.

Deploy requires repository write access. MCP works with public read access and checks for changes before each request.

See the [open source hosting guide](packages/docs-site/docs/open-source-hosting.md) for configuration, custom domains, automatic updates, and limits.

## Features

Expand Down
11 changes: 11 additions & 0 deletions e2e/docs-ui-static.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ test.describe('Cloudflare Static Assets export', () => {
await expect(page.getByText('TypeScript').first()).toBeVisible();
});

test('follows Markdown fragments after static content loads', async ({ page }) => {
await page.setViewportSize({ width: 1000, height: 400 });
await page.goto('/docs/quickstart#mcp-server');
await expect(page.locator('article #user-content-mcp-server')).toBeInViewport({ ratio: 1 });

await page.goto('/docs/quickstart');
await page.getByRole('link', { name: 'next steps', exact: true }).click();
await expect(page).toHaveURL(/#next-steps$/);
await expect(page.locator('article #user-content-next-steps')).toBeInViewport({ ratio: 1 });
});

for (const width of [320, 390]) {
test(`keeps documentation readable and navigation usable at ${width}px`, async ({ page }) => {
await page.setViewportSize({ width, height: 844 });
Expand Down
Loading
Loading