RepositoryJavaScriptUSHoa Kỳ
sherwinvishesh

sherwinvishesh/OpenGSO

Make any website readable by AI agents. Score a site 0-100, generate a Markdown twin of every page plus robots.txt, llms.txt and sitemap.xml, and serve the twin at the same URL. Framework-agnostic, on npm.

383sao
2fork
0issue
1lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: markdown

#1 Repository của ngày

1
TINIX TRENDING·Chủ đề: aeo

#1 Repository của ngày

1
TINIX TRENDING·Chủ đề: ai-crawlers

#1 Repository của ngày

Open Generative Search Optimization (OpenGSO)

Early release. Until 1.0, a minor release may change a command, a flag, a config field or an export.

Make your website readable by AI agents: score it, write a markdown twin of every page, and serve the twin at the same URL whenever an agent asks for it. Any framework or static host. No headless browser, no account, no telemetry.

npm Checks node license

opengso test, generate and test again on the bundled Next.js demo. The first test scores 65 of 100 with no robots.txt, no sitemap.xml and no markdown twin. Generate writes three twins and the three root files in 126 milliseconds. The second test scores 100 of 100 with 14 of 15 suggestions adopted.

That is the whole loop, as the CLI printed it against the bundled demo: a Next.js site with no robots.txt, no sitemap.xml and no twins scores 65, opengso generate writes six files in 126 ms, and the same URL scores 100 with 14 of 15 suggestions adopted. Every character is captured output; scripts/render-recording.mjs turns the captures into the animation.

ChatGPT, Claude, Perplexity and the crawlers behind them fetch pages the way curl does: no JavaScript runs, and every byte of markup costs tokens. OpenGSO is three commands. test scores what an agent receives, 0 to 100, with the reason for every point. generate writes a markdown twin of every page, plus robots.txt, llms.txt and sitemap.xml. prod is a zero-dependency middleware that serves the twin to agents and the page to people, at the same URL, without a redirect.

Ten seconds: what an agent gets

GET /resume on the bundled demo, as ChatGPT or Claude receives it today. 13,671 bytes, of which 10,333 sit inside ten `

… three more script tags, the title, the description and the JSON-LD …

Engagement record

Every engagement Aurora Fieldwork has run since 2022, newest first, with its dates, its fee and what came of it. …

Svalbard permafrost array

Commissioned on 3 March 2024 for a fixed fee of $12,500. … … the rest of the article, the footer … , no redirect. 1,886 bytes, and headers an agent can use.

HTTP/1.1 200 OK
content-type: text/markdown; charset=utf-8
Vary: Accept, Accept-Encoding
x-aeo-version: opengso/1.0
x-markdown-tokens: 432
x-markdown-source-hash: 9e7819e716242848
x-robots-tag: noindex

# Engagement record

Every engagement Aurora Fieldwork has run since 2022, newest first, with its dates, its fee and what came of it. …

## Svalbard permafrost array

Commissioned on **3 March 2024** for a fixed fee of **$12,500**. Fourteen boreholes, instrumented to 6 metres, logging every 15 minutes. …

| Engagement | Start | Fee | Outcome |
| --- | --- | --- | --- |
| Svalbard permafrost array | 3 March 2024 | $12,500 | 42% below data-return target |
…

A person in a browser still gets the page, with one header added: Link: </resume.md>; rel="alternate"; type="text/markdown".

Across the demo's three pages, measured with curl (the HTML with a browser's Accept header, the twin with Accept: text/markdown; the token count is the X-Markdown-Tokens header the twin carries):

PageHTML the agent gets todayMarkdown twinTokens in the twin
/10,191 bytes982 bytes188
/about10,408 bytes883 bytes205
/resume13,671 bytes1,886 bytes432

Sixty seconds: the quickstart

Needs Node.js 22 or later.

npm install --save-dev opengso
npx opengso test https://your-site.com        # 1. score the site as it is today
npx opengso generate https://your-site.com    # 2. write public/md/*.md, robots.txt, llms.txt, sitemap.xml

Then serve the twins. On Next.js 16 that is one file, proxy.ts, copied here from the demo (Next 15 calls it middleware.ts, exports middleware, and adds runtime: 'nodejs' to config). Every other framework is a few lines in opengso-prod's README, and the table below says which ones have been run.

import { NextResponse } from 'next/server';
import { applyPassthroughHeaders, createNextMiddleware } from 'opengso-prod/next';

const opengso = createNextMiddleware({ root: process.cwd() });

export function proxy(request: Request) {
  const { response, headers } = opengso(request);
  if (response) return response;
  const next = NextResponse.next();
  applyPassthroughHeaders(next, headers);
  return next;
}

export const config = { matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'] };
npx opengso prod test https://your-site.com   # 3. prove the deployment serves them
npx opengso test https://your-site.com        # 4. score it again

None of this needs an API key, a browser or an account. npx opengso on its own opens a home screen with your project's last score and a menu of everything there is to do, and npx opengso start opens the same thing as a local dashboard. Generate's free tier, every structural check and all of opengso-prod run offline; a key only buys generate's AI polish tier and opengso test --content, and it stays in .env on your machine. There is no telemetry.

What the test says

The second test in the recording, as printed. The +35 is the delta against the run before it, read from the project's own run history:

$ opengso test http://localhost:3000/resume

OpenGSO test  http://localhost:3000/resume
Detected: Next.js

  100/100  ████████████████████████  6 of 6 scored checks passed, 1 n/a
    ideas  ██████████████████████░░  14 of 15 suggestions adopted
  +35 since just now


Suggestions (1)
---------------
      Conventions for AI agents this page has adopted in part. They are outside
      the score: the best-read sites have not adopted them either, so these are
      what would set this one apart.

  TIP  B7 Vary includes Accept, so CDNs cache the two formats separately  ████░░░░ 2 of 4
      Vary does not include Accept on the HTML response. A CDN can cache that
      side's response and serve it to a visitor asking for the other format.
      HTML Vary: "rsc, next-router-state-tree, next-router-prefetch,
      next-router-segment-prefetch, Accept-Encoding"; markdown Vary: "Accept,
      Accept-Encoding".
      → Add `Vary: Accept` to the HTML response. Some frameworks will not let
        middleware set it on a response they created; a CDN or reverse-proxy
        rule in front of the app is the way through.

Passed (6)
----------
  A1 A3 A5 A6 A7 B13
  Re-run with --verbose to see why each one passed.

Adopted (14)
------------
  A2 A4 B1 B2 B3 B4 B5 B6 B8 B9 B10 B11 B12 B14
  Re-run with --verbose to see why each one passed.

Not applicable (1)
------------------
   n/a A8 Served over HTTPS with HSTS
      Local development target - HTTPS and HSTS are not meaningful here.

  Nothing to fix. Every scored check passed.

  Worth adopting next (suggestions, outside the score)

   tip  B7   Add `Vary: Accept` to the HTML response. Some frameworks will not
             let middleware set it on a response they created; a CDN or
             reverse-proxy rule in front of the app is the way through.

Add --copy to copy a fix prompt for Claude Code, or --prompt to print it.

Seven of the 22 checks make the 0 to 100 (crawler access, sitemap, server-rendered content, speed, no opt-out tag, HTTPS, a working HTML page), so a well-built site scores 100 before installing anything. The other fifteen are suggestions, counted as "N of 15 adopted" and never in the number: llms.txt, JSON-LD and the markdown layer OpenGSO serves. Every row names the check, what it verifies and the value actually observed, never a generic string. --strict makes an open suggestion fail CI too, --content has a model read the markdown you serve and rate it in a separate section that never touches the number, and --copy puts a fix prompt for Claude Code on your clipboard. opengso-testing's README has the first run of the recording in full, the two passes and the prompt.

The dashboard runs the same test, and keeps the copy button next to every failing check:

The OpenGSO dashboard after a test of the demo: a score dial at 100, 6 of 6 scored checks passed, 14 of 15 suggestions adopted, a 'Fix it with Claude Code' card, and B7 listed as the one open suggestion at 2 of 4.

What one URL answers

Every row was run with curl against the demo's /resume after step 3. This is the contract, and docs/spec.md writes it down so you could implement it without OpenGSO.

The requestWhat opengso-prod answers
A browser (Accept: text/html)200, the HTML page, plus Link: </resume.md>; rel="alternate"; type="text/markdown", X-AEO-Version: opengso/1.0 and Vary: Accept (on Next's App Router the last one is replaced, which is the B7 partial above)
Accept: text/markdown200, the twin at /resume, as text/markdown, with Vary: Accept, an ETag, X-Markdown-Tokens: 432, X-Markdown-Source-Hash and X-Robots-Tag: noindex
ClaudeBot or GPTBot sending Accept: */*200, the twin, plus Cache-Control: private, so a shared cache keyed on Accept never hands a crawler's markdown to the next browser
Googlebot, Bingbot, any search crawler200, the HTML. Markdown is noindex, so no preset routes a search engine to it
A crawler nobody has heard of200, the HTML, the same as a visitor. Never blocked
GET /resume.md200, the twin, whatever Accept says
Accept: application/pdf406, with a plain-text body naming the two formats on offer, rather than a 200 of the wrong type
If-None-Match with the twin's ETag304, no body
HEADthe same headers as the GET, no body
POST, /_next/…, /api/…, any URL with no twinuntouched, passed to the application

Why it is built this way:

  • Agents do not run JavaScript. A page that is empty until a script runs is empty to them, which is what check A5 measures. Generate extracts the content server-side with jsdom as a parser, never a runtime: page scripts are not executed, anywhere.
  • Same URL, rewritten and never redirected. A redirect changes the URL the agent records, breaks the link it cites and costs a round trip. Serving different bytes at one URL is exactly what Vary exists to describe.
  • The headers are the contract. Vary: Accept so a CDN caches both formats, Link on the HTML so an agent that got the page can find the twin, an ETag that answers If-None-Match, X-Markdown-Tokens so an agent knows the cost before reading, and X-Markdown-Source-Hash so opengso test can tell when the twin no longer matches the live page (check B14, the one only the tool that wrote the twin can run).
  • No search engine is ever routed to markdown. The default routes the 18 non-search AI crawlers; the 8 search crawlers get HTML, and the config refuses a list that routes one.
  • Format and blocking are two levers, kept apart. Routing never blocks. Blocking is opt-in, exists only in the robots.txt generate writes, and opengso-prod has no blocking code path. Unknown bots are never blocked.
  • A production request is a map lookup. opengso-prod has zero dependencies, reads the files generate wrote once at boot, and never calls a model or the network.
The dashboard's bot settings: a preset row with 'Every AI agent (18)', 'Assistants only (7)' and 'Nobody', and a table of crawlers with a markdown checkbox and a block checkbox per row.

Every framework, one adapter per server shape

opengso-prod has five entries, one per kind of server, and no per-framework adapters. Every framework in the third column was run on the version named: an AI agent, a browser, Accept: text/markdown, the .md URL, a HEAD, a 406 and a page with no twin, in development and in a production build. The snippet for each is in opengso-prod's README.

EntryShapeRun on
opengso-prod/nextproxy.ts on Next 16, middleware.ts on Next 15Next.js 16.3.4 and 16.3.8
opengso-prod/node(req, res, next)Express 5.3, Connect 3.7, Polka 0.5, Fastify 5.12 with @fastify/middie 9.3, Koa 3.2, Nest 12.2, Nuxt 4.6 on h3 1.15, Angular 20.3 with @angular/ssr, Qwik City 1.20
opengso-prod/fetch(request, next) => ResponseHono 4.13, SvelteKit 3.1 with adapter-node 6, Astro 6.4 with @astrojs/node 10, React Router 8.5
opengso-prod/vitea Vite plugin, for vite and vite previewVite 8.3 and 7.3
opengso-prod/edge(request, next) => Response, the twins bundled as a data module because the edge has no diskCloudflare Workers under wrangler 4.151
nonea folder of HTML files: each twin is written beside its page and the host serves itVitePress 1.6, GitHub Pages

SolidStart, Remix, Bun, Deno, and Vercel and Netlify edge functions take the same three shapes and are documented by the shape they share, not as verified.

Which package do I install

Install the narrowest one that does what you need. They all expose the same opengso command, and if you ask one for something it does not ship, it tells you which package to install instead. Two of them in one project is fine, opengso-cli for you and opengso-prod for the server, say: npm links the bin of whichever it installed last, and that one hands any command it does not ship to the other.

PackageShipsInstall it whennpm
opengsoeverything, plus the local dashboardyou want the whole thing, or you want a UInpmjs.com/package/opengso
opengso-clitest, generate, prod test, prod data, settingsyou want the whole toolchain, terminal onlynpmjs.com/package/opengso-cli
opengso-testingtestyou only want to score a sitenpmjs.com/package/opengso-testing
opengso-generategenerateyou only want the markdown twins and root filesnpmjs.com/package/opengso-generate
opengso-prodthe middleware, plus prod test and prod datathis is the one that runs on your servernpmjs.com/package/opengso-prod

opengso-prod is the package that ends up in a production dependency, so it has zero dependencies, and its library, the part your server imports, has no jsdom and no AI provider code. npm run check:bundles asserts that on every build.

A site that is a folder of HTML files needs no server at all: opengso generate site --origin https://your-site.com writes each twin beside its page, and any static host serves them. See From a folder of HTML files.

Bring any AI provider

Only the optional parts take a model. Twenty-five of them out of the box, and the twenty-fifth is "something else":

anthropic  openai  gemini  xai  mistral  deepseek  qwen  kimi  zai  minimax  cohere
perplexity  openrouter  groq  together  fireworks  cerebras  sambanova  deepinfra
huggingface  nvidia  novita  ollama  lmstudio (both on your machine, no key)  custom

Type the name you know and it works it out: --provider claude, kwen or grok asks whether you meant anthropic, qwen or xai. A key you already exported for another tool is picked up as it is. Anything speaking the OpenAI, Anthropic or Gemini request shape works, including a company gateway or a self-hosted server, and adding one is three lines of config: docs/providers.md.

Docs

Working on it

The source is plain JavaScript with JSDoc types, so there is no compile step: after npm install, npm run opengso -- --help runs the CLI straight from the source tree.

npm install
npm run typecheck
npm test
npm run build            # packaging only; nothing needs it to run or test the code
npm run check:bundles
npm run check:packages

To drive the CLI against the bundled demo, install it globally from its own tarball and use it the way a user would:

npm run install:global    # then: opengso --help
npm run example:dev       # serves the demo on localhost:3000

The recording at the top is rebuilt from the captures in docs/images/recording/ by node scripts/render-recording.mjs docs/images/recording docs/images/demo.svg; capturing a fresh run is in CONTRIBUTING.md, with the rest, including the one place Changesets cannot follow a change and what to do about it.

Known limitations

  • Client-rendered pages. HTML is parsed with jsdom and page scripts are never executed, so a page that is empty until JavaScript runs extracts as empty. Generate still writes its twin, and warns with the word count so a near-empty one is never mistaken for the page; on a dev server that renders in the browser it says to generate from the production build instead. See TODO-csr-jsdom.md.
  • SSR output without semantic landmarks. Frameworks that ship no <main> or <article> fall back to the whole body. See TODO-ssr-extraction.md.
  • Vary: Accept on Next.js App Router. Next does not let middleware add Vary to a response it did not create, so an HTML response from an App Router page can lack it. Check B7 scores this as a partial, 2 of 4, rather than papering over it. It is the one open suggestion in the report above.
  • CDN behaviour is documented, not claimed. Vary: Accept is set on every markdown response; how a given CDN honours it across hosts has not been tested.

License

Licensed under the Apache License 2.0.

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryJavaScript
affaan-m/ECC

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

315.7k
Dec 1, 2026
RepositoryJavaScript
DietrichGebert/ponytail

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

204.1k
Nov 22, 2026
RepositoryTypeScript
firecrawl/firecrawl

Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

216.1k
Dec 3, 2026
RepositoryPython
unclecode/crawl4ai

Official Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it.

88.2k
Nov 30, 2026
RepositoryPython
NousResearch/hermes-agent

The agent that grows with you

268.0k
Dec 3, 2026
RepositoryJavaScript
Hainrixz/claude-seo-ai

The SEO + AI-search (GEO/AEO) optimization toolkit for Claude Code — two-score audit + opt-in fixer. Built for 2026-2027.

87
Oct 25, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

488.2k
Dec 3, 2026
RepositoryPython
microsoft/markitdown

Python tool for converting files and office documents to Markdown.

199.6k
Dec 3, 2026
RepositoryPython
Auriti-Labs/geo-optimizer-skill

Open-source GEO engine by Auriti Labs, behind GeoReady (geoready.dev): audits how ready a site is for AI answer engines (crawler access, structured data, content, discovery) and samples citations. CLI, Python, MCP.

1.4k
Dec 2, 2026