Skip to content

Introduction to BeDoc

Bespoke Documentation

BeDoc is designed to bridge the gap for languages and formats that lack strong support for documentation generation. Whether you’re working with a niche language like LPC or Lua or targeting unconventional outputs like Wikitext, BeDoc empowers you to transform your code into polished documentation. With unparalleled flexibility and extensibility, BeDoc adapts to your needs—even if existing tools don’t.


  • Support for Niche Use Cases: Generate documentation for lesser-supported languages and formats, from LPC to Markdown or JavaScript to Wikitext.
  • Customizable Output: Tailor documentation to fit any format, including those not commonly addressed by traditional tools.
  • Seamless Integration: Use BeDoc via the command line, Visual Studio Code, or GitHub Actions.
  • Powerful Hook System: Extend every part of the pipeline with async hooks, enabling network requests, API integrations, or any custom logic.
  • Priority-Based Configuration: Layered, cascading configuration supports JSON files, environment variables, CLI options, and package.json entries.

Terminal window
# Install globally
npm i -g bedoc
# Or add to your project
npm i --save-dev bedoc
Terminal window
# Example: Generate Markdown docs for JavaScript files
bedoc -l javascript -f markdown -i src/**/*.js -o docs

Simplify your workflow with a configuration file:

{
"language": "javascript",
"format": "markdown",
"input": ["src/**/*.js"],
"output": "docs"
}

Run with:

Terminal window
bedoc -c bedoc.config.json

Documenting APIs

Generate clear and structured API documentation for languages and frameworks that lack built-in tools.

Supporting Niche Formats

Convert code comments to Markdown, Wikitext, or other less common formats seamlessly.

Automating Workflows

Integrate BeDoc into CI/CD pipelines with GitHub Actions or similar tools to keep documentation up-to-date.


BeDoc’s parsers analyze your code and extract meaningful documentation, even for niche languages. Create custom parsers to support any syntax or annotations. Learn More About Parsers

Printers transform parsed data into your desired format, from Markdown to less common formats like Wikitext. Async support enables powerful integrations like fetching additional data during formatting. Learn More About Printers

Hooks allow you to extend and modify the documentation process at any point. Use them to add metadata, validate content, or integrate with APIs—all with async capabilities. Learn More About Hooks

BeDoc’s configuration system is layered and cascading, supporting priorities across JSON files, environment variables, CLI options, and package.json entries.


{
"language": "lpc",
"format": "markdown",
"input": ["src/**/*.c"],
"output": "docs/simul_efun"
}
{
"language": "lua",
"format": "wikitext",
"input": ["src/**/*.lua"],
"output": "docs/wiki"
}

  • Parsers: Create custom parsers for your language or framework.
  • Printers: Build printers for your preferred output format.
  • Hooks: Modify and enhance the documentation pipeline.

Ready to elevate your documentation game? Install BeDoc and start building documentation that works for you!