open-index/open-npm huggingface dataset:
npm package: @opensyntaxhq/autodocs
Description: CLI for Autodocs documentation generator
Author: OpenSyntaxHQ
Latest version: 2.1.1

# @opensyntaxhq/autodocs

Engineer-first documentation generator for TypeScript.

## Install

```bash
npm install -D @opensyntaxhq/autodocs
```

Run via local binary:

```bash
npx autodocs build
# or
npm exec autodocs build
```

If you want `autodocs` available globally in your shell:

```bash
npm install -g @opensyntaxhq/autodocs
```

## Quick start

```bash
npx autodocs init
npx autodocs build
npx autodocs serve
```

## Commands

- `autodocs init` - create `autodocs.config.*`
- `autodocs build` - generate docs and UI in `docs-dist`
- `autodocs watch` - incremental rebuilds with cache
- `autodocs serve` - serve the generated site
- `autodocs check` - validate configuration and inputs

## Config

```ts
import { defineConfig } from '@opensyntaxhq/autodocs';

export default defineConfig({
  input: 'src',
  output: 'docs-dist',
  plugins: [
    { name: '@opensyntaxhq/autodocs-plugin-markdown', options: { sourceDir: 'docs' } },
    {
      name: '@opensyntaxhq/autodocs-plugin-examples',
      options: { validate: true, outputDir: 'examples' },
    },
  ],
});
```

## Notes

Set `SITE_URL` (env or config) to generate `sitemap.xml` and `robots.txt`.

From `2.0.1+`, the React UI assets are bundled with the CLI package, so `autodocs build` static output does not require installing a separate UI package.
npm package: @opensyntaxhq/autodocs-core
Description: Core parsing and extraction engine for Autodocs
Latest version: 2.1.1

# @opensyntaxhq/autodocs-core

Core parsing, extraction, and generation engine for Autodocs.

## Install

```bash
npm install @opensyntaxhq/autodocs-core
```

## Usage

```ts
import path from 'path';
import { createProgram, extractDocs, generateJson } from '@opensyntaxhq/autodocs-core';

const entryFile = path.join(process.cwd(), 'src/index.ts');
const { program, rootDir } = createProgram([entryFile]);
const docs = extractDocs(program, { rootDir });

await generateJson(docs, path.join(process.cwd(), 'docs-dist'), {
  pretty: true,
  rootDir,
});
```

## API Surface

- `createProgram` / `extractDocs`
- `generateJson`, `generateMarkdown`, `generateHtml`
- `PluginManager`
- `FileCache` and `incrementalBuild`
npm package: @opensyntaxhq/autodocs-plugin-examples
Description: Code example validation and extraction plugin for Autodocs
Latest version: 2.1.1

# @opensyntaxhq/autodocs-plugin-examples

Code example validation and extraction plugin for Autodocs.

## Install

```bash
npm install -D @opensyntaxhq/autodocs-plugin-examples
```

## Usage

```ts
import { defineConfig } from '@opensyntaxhq/autodocs';

export default defineConfig({
  plugins: [
    {
      name: '@opensyntaxhq/autodocs-plugin-examples',
      options: {
        validate: true,
        outputDir: 'examples',
      },
    },
  ],
});
```

## Options

- `validate` (boolean, optional): type-check examples (default `false`).
- `outputDir` (string, optional): directory (relative to output) for extracted examples.

## Output

When `outputDir` is set, the plugin writes `examples.json` plus individual example files.
npm package: @opensyntaxhq/autodocs-plugin-markdown
Description: Markdown guide plugin for Autodocs
Latest version: 2.1.1

# @opensyntaxhq/autodocs-plugin-markdown

Markdown guide plugin for Autodocs. It ingests `.md` files and exposes them as `guide` entries in `docs.json`.

## Install

```bash
npm install -D @opensyntaxhq/autodocs-plugin-markdown
```

## Usage

```ts
import { defineConfig } from '@opensyntaxhq/autodocs';

export default defineConfig({
  plugins: [
    {
      name: '@opensyntaxhq/autodocs-plugin-markdown',
      options: {
        sourceDir: 'docs',
        patterns: ['**/*.md'],
        frontMatter: true,
      },
    },
  ],
});
```

## Options

- `sourceDir` (string, required): directory to scan for markdown files.
- `patterns` (string[], optional): glob patterns (default `['**/*.md']`).
- `frontMatter` (boolean, optional): parse front matter (default `true`).

## Output

Each markdown file becomes a `guide` entry with rendered HTML and raw markdown stored in `metadata`.