Broken code examples in documentation are the #1 cause of developer frustration and support tickets. DocsCI executes every snippet on every PR — so you ship docs that actually work.
< 30s
Typical run time
6+
Languages tested
100%
Snippet coverage
0
Config changes to docs
The first thing a developer does with your docs is copy a code example. If it doesn't work, they open a support ticket, file a GitHub issue, or just leave. Broken examples are silent churn.
DocsCI extracts every fenced code block from your documentation and runs it in an isolated, hermetic sandbox. JavaScript runs in a V8 isolate. Python runs in Pyodide WASM. Bash is validated. HTTP examples run against your configured staging endpoint. If any snippet fails, DocsCI blocks the PR and posts a comment on the exact line — with an AI-generated fix.
DocsCI finds every fenced code block in Markdown, MDX, RST, and AsciiDoc files. Each one is extracted, run in an isolated sandbox, and verified.
JavaScript and TypeScript run in V8 isolates (via isolated-vm). Python runs in Pyodide WebAssembly. No shared state, no host contamination, no side effects.
DocsCI runs analyzers in parallel with concurrency tuned for Vercel's compute limits. A 100-snippet doc set typically runs in under 30 seconds.
Every broken snippet gets a PR comment with: the file path, line number, the error message, and an AI-generated corrected code snippet.
40+ regex patterns scan snippets for API keys, tokens, private keys, and connection strings before execution. No credentials leak through execution.
Snippets cannot make outbound network calls unless you add domains to the docsci.yml allowlist. RFC-1918 private ranges are always blocked.
One GitHub Action, one API call. DocsCI reads your docs from the repository — no git hooks or doc build step needed.
- name: Run DocsCI
run: |
tar czf docs.tar.gz docs/
curl -sf -X POST https://snippetci.com/api/runs/queue \
-H "Authorization: Bearer ${{ secrets.DOCSCI_TOKEN }}" \
-F "docs_archive=@docs.tar.gz" \
-o result.json
jq -e '.status == "passed"' result.jsonJS, TS, Python, Go, Ruby, Bash, cURL — every snippet runs in the right sandbox. Failures are collected with error messages and stack traces.
If any snippet fails, the CI check fails. DocsCI posts an inline comment on the broken snippet with the error and a patch diff. Merge only verified code.
Does DocsCI catch all broken code examples?
DocsCI executes all fenced code blocks in supported languages. Examples that require external services not in the allowlist will be flagged as skipped rather than failed. Configure your staging endpoint allowlist to test HTTP examples end-to-end.
What languages does DocsCI execute?
JavaScript, TypeScript, Python (via Pyodide WASM), Bash (simulated validation), Go (static check), Ruby (sandboxed), and cURL (executed against allowlisted endpoints). Unsupported languages are skipped.
Can DocsCI handle code examples with external dependencies?
Yes. DocsCI's sandbox supports npm packages (JS/TS) and PyPI packages (Python) via a curated allowlist. Configure additional packages in docsci.yml under snippets.packages.
How do I exclude code examples that are intentionally invalid (e.g., showing error states)?
Add a docsci-skip comment above the fenced block: <!-- docsci-skip --> in Markdown, or configure skip_patterns in docsci.yml to match blocks containing 'ERROR' or 'expected output' markers.
Join API and platform teams who use DocsCI to ship verified documentation.