---
title: Bengal 0.2.1
description: Autodoc CLI lazy-loading fix, pipeline inputs, DX hints
type: changelog
date: 2026-02-14
draft: false
lang: en
tags: [release, changelog, autodoc, cli, pipeline, dx]
keywords: [release, 0.2.1, autodoc, lazy-loading, CLI, pipeline inputs]
category: changelog
---

# Bengal 0.2.1

**Key fix:** Autodoc CLI extractor now correctly discovers subcommands for lazy-loaded Click groups (e.g. Bengal CLI). Previously, `group.commands` was empty for such groups; the extractor now uses `list_commands(ctx)` and `get_command(ctx, name)` as required by Click's lazy-loading contract.

---

## Fixes

### Autodoc CLI Lazy-Loading Bug

The CLI documentation extractor failed to discover subcommands when documenting Click groups that use lazy loading (commands registered via `@group.command()` or `add_command()` at runtime rather than at definition time). Bengal's own CLI uses this pattern.

- **Root cause**: `group.commands` is empty for lazy-loaded groups; subcommands are only exposed via `list_commands(ctx)` and `get_command(ctx, name)`.
- **Fix**: CLIExtractor now uses `click.Context(group)`, `group.list_commands(ctx)`, and `group.get_command(ctx, cmd_name)` instead of iterating `group.commands.items()`.
- **Contract**: Documented in `_extract_click_group` docstring for future maintainers.

---

## Other Changes

- **Pipeline inputs**: Build orchestration now tracks and validates pipeline inputs for incremental builds.
- **DX hints**: Developer experience hints for common configuration and usage patterns.
- **Code quality**: Ruff/ty fixes, import ordering, minor refactors across autodoc, rendering, and orchestration modules.

---

## Breaking Changes

None. Fully backward-compatible patch release.

---

## Upgrading

```bash
uv pip install --upgrade bengal
# or
pip install --upgrade bengal
# or use the self-update command
bengal upgrade
```
