New Tool: robotframework-libdocgen - Professional Documentation Generator for RF Libraries

:tada: Announcing robotframework-libdocgen v1.0.0

Hello Robot Framework community!

I’m excited to introduce robotframework-libdocgen - a powerful documentation generator that creates professional HTML and Markdown documentation for your Robot Framework libraries.

:sparkles: What is it?

robotframework-libdocgen automatically extracts keywords, arguments, and docstrings from your Python library files and generates beautiful, interactive documentation with:

  • Professional HTML output with search, navigation
  • Markdown export for GitHub/GitLab README files
  • Full Markdown support - tables, images, code blocks, and more
  • Advanced syntax highlighting - custom Robot Framework syntax with distinct colors for keywords, variables, comments, etc.
  • Type hints support - automatically displays argument types
  • Responsive design - works great on desktop, tablet, and mobile

:rocket: Quick Start

Installation:

pip install robotframework-libdocgen

Usage:

# Generate HTML documentation (default)
robotframework-libdocgen my_library.py -o docs.html -c config.json

# Generate Markdown documentation
robotframework-libdocgen my_library.py -f markdown -o README.md

# Or use the shorter alias
docgen my_library.py -c config.json

:bullseye: Key Features

Automatic Keyword Extraction

  • Automatically extracts keywords from @keyword decorated methods
  • Supports both @keyword and @keyword("Custom Name") syntax
  • Converts function names to title case automatically

Professional Syntax Highlighting

  • Robot Framework keywords (automatically detected)
  • Variables: ${variable}, @{list}, &{dict}
  • Keyword arguments: arg=value
  • Comments (inline and full-line)
  • Reserved control keywords: IF, FOR, TRY, WHILE, etc.
  • Settings keywords: Library, Resource, Documentation, etc.

Rich Documentation Features

  • Full Markdown support in docstrings
  • Tables with professional styling
  • Images support
  • Code blocks with syntax highlighting (Robot Framework, Python, JavaScript, and 100+ languages)
  • Type hints display
  • Example code blocks

Interactive HTML Documentation

  • Real-time keyword search
  • Responsive sidebar navigation
  • Light/dark theme toggle
  • Mobile-friendly hamburger menu
  • Dynamic metadata display

:open_book: Example

from robot.api.deco import keyword

class MyLibrary:
    @keyword("Process Data")
    def process_data(self, data: dict, options: list = None) -> dict:
        """
        Process data with optional configuration.
        
        **Arguments:**
        - `data`: Dictionary containing data to process
        - `options`: Optional list of processing options
        
        **Example:**
        ```robot
        *** Settings ***
        Library    MyLibrary
        
        *** Test Cases ***
        Process Example
            ${data}=    Create Dictionary    name=John    age=30
            ${result}=    Process Data    ${data}
        ```
        """
        # Implementation
        return {}

:books: Live Example

See the generated documentation in action:
View Sample Documentation

:link: Links

:light_bulb: Use Cases

  • Generate professional documentation for your Robot Framework libraries
  • Create interactive HTML documentation for sharing with teams
  • Export documentation to Markdown for GitHub/GitLab
  • Document custom keywords with type hints and examples
  • Create beautiful documentation sites for your libraries

:clipboard: Requirements

  • Python 3.8+
  • Robot Framework >= 5.0.1

All other dependencies (markdown, pygments, rich) are automatically installed.

:handshake: Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the GitHub repository.

:memo: License

Apache License 2.0


I hope this tool helps the Robot Framework community create better documentation for their libraries. Feedback and suggestions are always welcome!

Happy documenting! :rocket:

2 Likes

Both selenium & browserlibrary includes plugin mechanism to extend the underlying library with new keywords. Does this tool support those ?

Asking because:

Automatically extracts keywords from @keyword decorated methods

this might not be happening with all cases ? Specifically with BrowserLib cuz the plugin keywords could be written in js but can still expose the keyword metadata (docs) …

Anyway, design looks really nice in sample doc. GG

Good question :+1:

Internally, docgen relies on Robot Framework’s LibraryDocumentation API (same source Libdoc uses), so it can only extract whatever metadata Robot Framework itself exposes for a library.

That means:

  • If a library (including Browser) exposes its keywords through RF’s normal mechanisms, they will show up automatically.
  • If a plugin mechanism defines keywords in a way that Libdoc can see, they’ll work here as well.
  • If keywords live purely outside RF’s introspection layer (e.g. dynamically on the JS side without metadata exposed to RF), then they won’t be discoverable — same limitation as Libdoc.

So the tool doesn’t try to re-implement or guess plugin internals; it intentionally stays aligned with what Robot Framework exposes.

Appreciate the kind words on the design — glad you liked the demo! :raising_hands:
And dont forget to check the latest release New Release: robotframework-libdocgen - Professional Documentation Generator for RF Libraries