<!-- markdownlint-disable MD013 MD033 -->
<!-- This file is generated by Paradox. Do not edit manually. -->

# @ankhorage/paradox

![license: MIT](./paradox/badges/license.svg) ![npm: v0.1.19](./paradox/badges/npm.svg) ![runtime: bun](./paradox/badges/runtime.svg) ![typescript: strict](./paradox/badges/typescript.svg) ![eslint: checked](./paradox/badges/eslint.svg) ![prettier: checked](./paradox/badges/prettier.svg) ![build: checked](./paradox/badges/build.svg) ![tests: checked](./paradox/badges/tests.svg) ![docs: paradox](./paradox/badges/docs.svg)

Deterministic documentation generator for TypeScript packages.

## CLI

Generates deterministic documentation for a package through the Paradox CLI.

```bash
bunx @ankhorage/paradox
```

<details>
<summary>paradox</summary>

Runs the Paradox CLI.

The command discovers the nearest Paradox config, resolves the package and output roots,
analyzes the package, builds the documentation model, renders all documentation artifacts,
and writes them to the configured output directory.

Diagram: [paradox sequence](./paradox/diagrams/sequences/paradox.mmd)

```mermaid
sequenceDiagram
  participant participant_analyze as analyze
  participant participant_buildModel as buildModel
  participant participant_dirname as dirname
  participant participant_findParadoxConfigFile as findParadoxConfigFile
  participant participant_loadParadoxConfig as loadParadoxConfig
  participant participant_main as main
  participant participant_render as render
  participant participant_resolveOutputRoot as resolveOutputRoot
  participant participant_resolvePackageRoot as resolvePackageRoot
  participant participant_write as write
  participant_main->>participant_findParadoxConfigFile: findParadoxConfigFile()
  participant_findParadoxConfigFile-->>participant_main: return
  participant_main->>participant_dirname: dirname()
  participant_dirname-->>participant_main: return
  participant_main->>participant_loadParadoxConfig: loadParadoxConfig()
  participant_loadParadoxConfig-->>participant_main: return
  participant_main->>participant_resolvePackageRoot: resolvePackageRoot()
  participant_resolvePackageRoot-->>participant_main: return
  participant_main->>participant_resolveOutputRoot: resolveOutputRoot()
  participant_resolveOutputRoot-->>participant_main: return
  participant_main->>participant_analyze: analyze()
  participant_analyze-->>participant_main: return
  participant_main->>participant_buildModel: buildModel()
  participant_buildModel-->>participant_main: return
  participant_main->>participant_render: render()
  participant_render-->>participant_main: return
  participant_main->>participant_write: write()
  participant_write-->>participant_main: return
```

</details>

## Configuration

Canonical Paradox configuration for this package.

```ts
import { defineParadoxConfig } from './src/config/defineParadoxConfig.js';

export default defineParadoxConfig({
  mode: 'write',

  docs: {
    title: '@ankhorage/paradox',
    description: 'Deterministic documentation generator for TypeScript packages.',
  },

  package: {
    entrypoints: ['src/index.ts'],
  },

  output: {
    dir: 'paradox',
  },
});
```

<details>
<summary>Configuration options</summary>

| Field   | Type                                                                                                                | Required | Default | Description |
| ------- | ------------------------------------------------------------------------------------------------------------------- | -------- | ------- | ----------- |
| mode    | `'safe' \| 'write' \| undefined`                                                                                    | no       | —       |             |
| docs    | `{ title?: string; description?: string; usage?: { description?: string; entrypoints?: string[]; }; } \| undefined` | no       | —       |             |
| package | `{ root?: string; entrypoints?: string[]; } \| undefined`                                                           | no       | —       |             |
| output  | `{ dir?: string; } \| undefined`                                                                                    | no       | —       |             |

</details>

## Generated documentation

- [Interactive documentation app](./paradox/index.html)
- [Public API reference](./paradox/exports.md)
- [Component registry](./paradox/components.md)
- [Architecture overview](./paradox/diagrams/architecture-overview.mmd)
- [Module relationships](./paradox/diagrams/module-relationships.mmd)
- [Export graph](./paradox/diagrams/export-graph.mmd)
- [isParadoxDocTagName sequence](./paradox/diagrams/sequences/is-paradox-doc-tag-name.mmd)
- [paradox sequence](./paradox/diagrams/sequences/paradox.mmd)

## Public API

### Config

<details>
<summary>defineParadoxConfig</summary>

```ts
defineParadoxConfig(config: ParadoxConfig) => ParadoxConfig
```

Defines a Paradox configuration object without changing its shape.

Module: `src/config/defineParadoxConfig.ts`
Source: `src/config/defineParadoxConfig.ts:8:1`
Related symbols: `ParadoxConfig`

</details>

<details>
<summary>ParadoxConfig</summary>

Configuration for running Paradox.

Module: `src/config/types.ts`
Source: `src/config/types.ts:7:1`

</details>
