typedoc-ai-actions
v0.0.1
Published
TypeDoc plugin that adds GitHub, Markdown, and AI actions to generated docs.
Maintainers
Readme
typedoc-ai-actions
TypeDoc plugin that adds GitHub, Markdown, and AI action links to generated docs.
Injects an actions UI next to breadcrumbs in generated TypeDoc pages, letting readers open the current page in GitHub, view its raw markdown, or send it directly to an AI provider.
Requires: TypeDoc ≥ 0.28.19 · Node ≥ 24
Installation
npm install -D typedoc-ai-actions typedocSetup
Add to your typedoc.json:
{
"plugin": ["typedoc-ai-actions"]
}Screenshots
| Source | Markdown | | ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | | |
Configuration
All options are nested under aiActions:
{
"plugin": ["typedoc-ai-actions"],
"aiActions": {
"githubUrl": "https://github.com/your-org/your-repo"
}
}General
| Option | Type | Default | Description |
| ----------- | -------- | -------------------------- | ------------------------------------------------------ |
| githubUrl | string | $GITHUB_REPO_URL env var | Base GitHub repository URL used to build source links. |
Actions
| Option | Type | Default | Description |
| --------------------- | --------- | ------- | -------------------------------- |
| excludeViewMarkdown | boolean | false | Hide the "View Markdown" action. |
| excludeGithubSource | boolean | false | Hide the "GitHub Source" action. |
AI providers
| Option | Type | Default | Provider |
| ---------------- | --------- | ------- | ------------------------------------------------- |
| excludeChatGPT | boolean | false | ChatGPT (OpenAI) |
| excludeClaude | boolean | false | Claude (Anthropic) |
| excludeGemini | boolean | false | Gemini (Google) |
| excludeZ | boolean | false | Z.ai |
| excludeLeChat | boolean | false | Le Chat (Mistral) |
| excludeCursor | boolean | false | Cursor |
Page contexts
| Option | Type | Default | Description |
| ---------------------------- | --------- | ------- | ------------------------------------------------ |
| excludeOnReadmeDocument | boolean | false | Hide all actions on the README.md document page. |
| excludeOnCode | boolean | false | Hide all actions on code declaration pages. |
| excludeOnMarkdownDocuments | boolean | false | Hide all actions on Markdown document pages. |
GitHub Actions integration
githubUrl defaults to the GITHUB_REPO_URL environment variable. Set it in your workflow to avoid hardcoding a URL in typedoc.json:
- name: Build docs
run: npx typedoc
env:
GITHUB_REPO_URL: ${{ github.server_url }}/${{ github.repository }}Example
- Demo: https://whatyoubendoing.github.io/typedoc-plugins/ai-actions-example/Overview.html
- Local config:
packages/typedoc-ai-actions/example/typedoc.config.ts
Related packages
typedoc-ai-md-link— emits companion.mdfiles and alternate link tagstypedoc-color-chip— renders inline color literals as color chips
Development
See DEVELOPMENT.md at the monorepo root.
License
MIT
