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
@exampleblocks as doctests - AI-ready context files from a single build pass
Installation
npm install -D forge-tsQuick Example
import { generateApi } from "@forge-ts/api";
const result = await generateApi(config);
console.log(result.success); // true if spec was written successfullyPackages
| Package | Description |
|---|---|
core | forge-ts/core — Shared types, interfaces, config loader, and AST walker. Thi... |
api | forge-ts/api — OpenAPI spec and API reference generator. Extracts public SDK... |
cli | forge-ts/cli — Command-line interface for the forge-ts toolchain. Usage: f... |
gen | SSG adapter registry for documentation generation. Provides pluggable adapte... |
enforcer | forge-ts/enforcer — TSDoc enforcement linter. Walks all exported symbols and... |
doctest | forge-ts/doctest — TSDoc `@example` block extractor and test runner. Extract... |
Next Steps
- Getting Started — Step-by-step guide
- API Reference — Full API documentation
- Concepts — How it works