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 { 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 successfullyPackages
| Package | Description |
|---|---|
core | Foundation package for the forge-ts toolchain — shared types, config loader,... |
api | OpenAPI 3.2 spec generator and structured API reference builder for forge-ts.... |
cli | Unified command-line interface for the forge-ts toolchain. Provides the... |
gen | SSG adapter registry for documentation generation. Provides pluggable adapte... |
enforcer | TSDoc enforcement engine for TypeScript projects. Walks all exported symbols... |
doctest | TSDoc `@example` block extractor and test runner for forge-ts projects. Extr... |
Next Steps
- Getting Started — Step-by-step guide
- API Reference — Full API documentation
- Concepts — How it works