@dualmark/cli
v0.5.2
Published
Conformance test runner for the AEO spec. `dualmark verify <url>` scores any site against the AEO Specification.
Maintainers
Readme
@dualmark/cli
dualmark verify <url> — conformance test runner for the AEO Specification.
Install
bun add -d @dualmark/cli
# or run directly:
bunx @dualmark/cli verify https://example.com/blog/helloUsage
dualmark verify https://example.com/blog/hello
dualmark verify https://example.com/blog/hello.md --skip-negotiation
dualmark verify https://example.com --json
dualmark verify https://example.com --timeout 5000Flags
| Flag | Effect |
|---|---|
| --json | Emit machine-readable JSON instead of human-readable text |
| --skip-negotiation | Skip Accept-header / Link-header / 406 checks. Use against sites that serve markdown only at .md URLs without runtime content negotiation (e.g. static-only deploys) |
| --timeout <ms> | Per-request timeout (default 10000) |
Exit codes
0— pass (score ≥ 80% of max)1— fail (below threshold)2— CLI usage error
Programmatic usage
import { verifyUrl } from "@dualmark/cli";
const report = await verifyUrl("https://example.com/blog/hello");
console.log(report.score, "/", report.maxScore);What's checked
md.fetch— markdown twin URL is reachable (2xx)md.contentType—text/markdown; charset=utf-8md.tokensHeader—X-Markdown-Tokensis a positive integermd.noindex—X-Robots-Tagincludesnoindexmd.vary—VaryincludesAcceptmd.body— body is non-emptymd.aeoVersion—X-AEO-Versionadvertised (recommended)md.nosniff—X-Content-Type-Options: nosniff(recommended)
When negotiation is enabled (default):
html.reachable— HTML URL is 2xxhtml.linkAlternate— HTML response advertises markdown twin viaLink rel="alternate"html.vary— HTML responseVary: Accept(recommended)negotiation.botUa— GPTBot UA receives markdownnegotiation.acceptHeader—Accept: text/markdownreceives markdownnegotiation.notAcceptable— Accept that excludes html+markdown returns406(recommended)
License
Apache 2.0
