forge-ts

forge-ts is a TypeScript documentation toolkit that performs a single AST traversal of your project and produces API docs, OpenAPI specs, executable doctests, and AI context files in one pass.

Features

  • 6 packages with full TypeScript support
  • Auto-generated API reference from source code
  • Executable @example blocks as doctests
  • AI-ready context files from a single build pass

Installation

npm install -D forge-ts

Quick Example

import { loadConfig } from "@forge-ts/core";
import { generateApi } from "@forge-ts/api";

const config = await loadConfig();
const result = await generateApi(config);
console.log(result.success); // true if the spec was written successfully

Packages

PackageDescription
coreFoundation package for the forge-ts toolchain — shared types, config loader,...
apiOpenAPI 3.2 spec generator and structured API reference builder for forge-ts....
cliUnified command-line interface for the forge-ts toolchain. Provides the...
genSSG adapter registry for documentation generation. Provides pluggable adapte...
enforcerTSDoc enforcement engine for TypeScript projects. Walks all exported symbols...
doctestTSDoc `@example` block extractor and test runner for forge-ts projects. Extr...

Next Steps

On this page