Type-check TypeScript and JavaScript code fences in Markdown and MDX docs against your real project API, in editor, CLI, and CI.
What it does
Kiira type-checks TypeScript and JavaScript code fences in Markdown and MDX docs against your real project API, reporting errors on the exact source line. It runs in your editor via a VS Code extension, on the CLI, and in CI via a GitHub Action.
Kiira type-checks code fences in Markdown and MDX against your real project API, closing a gap that no standard TypeScript toolchain addresses out of the box. Docs rot silently as APIs evolve, and AI agents that write or update documentation hallucinate function names, option keys, and package subpaths with total confidence. Kiira runs the same TypeScript compiler your source code uses, so an invalid import or a misspelled prop name in a README fails the check immediately, before any reader copies it.
Three packages share one engine. The core lives in kiira-core: extraction, virtual files, type-checking, and diagnostics. The CLI package (kiira) exposes kiira check for local runs and CI. The VS Code extension (kiira-vscode) adds live squiggles inside Markdown fences as you type, and a GitHub composite action (AlemTuzlak/kiira@v1) posts error annotations directly on pull requests. All three surfaces run exactly the same check, so "passes locally" is a genuine guarantee.
Install with pnpm add -D kiira, run kiira init to scaffold a tsconfig.docs.json and an optional kiira.config.ts, then run kiira check. Kiira reads your include globs, extracts every code fence tagged ts, tsx, js, or jsx, builds virtual TypeScript files, and resolves imports against your real project packages. Errors map back to the original Markdown line number, not to any generated file. The --fix flag auto-rewrites mistagged ts fences to tsx, adds group= tags to continuation snippets, and writes per-framework jsxImportSource overrides.
Fence metadata gives per-snippet control. Tag a fence ignore to skip it, validate=none to silence type errors, fixture=react to prepend a named wrapper, or group=quickstart to chain multiple fences so a later snippet can reference symbols declared in an earlier one. For literate docs where almost every fence builds on the previous one, set defaultGroup: "file" in config to implicitly group all fences in a file without tagging each one individually.
Relative imports (./x, ../x) and unused locals are both ignored by default, because doc snippets routinely reference imaginary sibling files and declare symbols they never use. These checks are opt-in via checkRelativeImports: true and checkUnusedSymbols: true in config. Runtime validation (validate=runtime) is a metadata option, but type validation is the default and primary mode.
If your team uses AI agents to write or update docs, Kiira is not optional. It is the only tool that closes the loop between what an agent writes in a Markdown file and what TypeScript actually compiles. Unlike remark-validate-links, which checks URLs only, Kiira validates full TypeScript types against your real project API, catching hallucinated function names and wrong option keys before any reader runs the example. The MIT-licensed package is on npm and the VS Code extension is on the Marketplace; setup takes one kiira init.
Features
Field notes
Reviewed Jun 26, 2026
Best for
Builder outcomes
Watch out
Tested with
Kiira is an MIT-licensed tool that extracts TypeScript and JavaScript code fences from Markdown and MDX files and type-checks them against your real project API using the TypeScript compiler. It reports errors on the exact source line in three places: a VS Code extension for live editor diagnostics, a CLI (`kiira check`) for local runs, and a GitHub composite action (`AlemTuzlak/kiira@v1`) for CI annotations. The core engine lives in the `kiira-core` package, which handles extraction, virtual file construction, type-checking, and diagnostics.
Install the CLI with `pnpm add -D kiira` (npm and yarn also work). Run `kiira init` to scaffold a `tsconfig.docs.json` and an optional `kiira.config.ts`, then run `kiira check` to validate all files matching your include globs. For the VS Code extension, install `CodeForge.kiira-vscode` from the Marketplace or Open VSX with `ext install CodeForge.kiira-vscode`. For CI, add `AlemTuzlak/kiira@v1` as a step in your GitHub Actions workflow.
Kiira is free and open source under the MIT license. The source is on GitHub at AlemTuzlak/kiira. All packages (`kiira`, `kiira-core`, `kiira-vscode`) are published to npm, and the VS Code extension is also available on Open VSX for editors other than VS Code.
Kiira is best for teams that use AI agents to write or update documentation, because per the README, agents hallucinate APIs with total confidence, inventing wrong function names, missing exports, and bad package subpaths. It is also well suited to open-source library maintainers who ship code examples in READMEs and want CI to catch examples that break when the API changes. Monorepo projects get particular value from workspace mode, which resolves `@your-scope/*` and third-party imports without hand-written `tsconfig` paths.
remark-validate-links checks that hyperlinks in Markdown resolve to real files or anchors; it does not validate TypeScript types or JavaScript semantics inside code fences. Kiira validates full TypeScript types against your real project API, catching hallucinated function names, wrong option keys, invalid imports, and non-copy-pasteable examples. There is no overlap between the two tools: remark-validate-links handles URL integrity, Kiira handles code correctness, and they can be used together.
Relative imports (`./x`, `../x`) and unused locals are both ignored by default, because doc snippets commonly reference imaginary sibling files and declare symbols they never use; both checks require explicit opt-in via `checkRelativeImports: true` and `checkUnusedSymbols: true` in the config. Runtime validation (`validate=runtime`) exists as a metadata option per fence but type-checking is the primary and fully supported mode. Kiira also requires a `tsconfig.docs.json` or an existing `tsconfig.json` to source compiler options; without one, you must create it manually or via `kiira init`.
Anatomia, CLI harness that gives AI coding agents a verifiable pipeline and proof chain, not just prompts. MIT-licensed, works with Claude Code, Codex, and more.
jscpd is an open-source copy/paste detector for 223+ languages, with a Rust-powered v5 engine that is 24-37x faster and AI-ready out of the box.
Best for Teams wanting fast, language-agnostic duplicate code detection across large monorepos or mixed-format codebasesOpen-source toolkit for Spec-Driven Development with AI coding agents, structured specs, plans, and tasks instead of vibe coding.
Best for Teams using AI coding agents on projects where correctness and reliability matter more than speed of first outputOpen-source AI code reviewer with bring-your-own-model, custom rule enforcement, and zero LLM markup for engineering teams.
Best for Teams with custom coding standards, domain rules, or naming conventions that generic AI reviewers missNVIDIA's open-source security scanner for AI agent skills, detects prompt injection, supply chain attacks, and 66 other vulnerability patterns before you install.
Best for Teams auditing AI agent skills before installation in Claude Code, Codex CLI, or Gemini CLI environmentsOpenAI's open-source agent orchestrator that converts project tasks into autonomous, isolated coding runs, so teams manage work, not coding agents.
Best for Engineering teams with mature test and lint harnesses who want autonomous task-to-PR pipelines