Expand description
Output formatting for beads_rust.
Supports human-readable text output, machine-parseable JSON, and CSV export. Robot mode sends clean JSON to stdout with diagnostics to stderr.
§Output Types
These types match the classic bd JSON schemas for CLI compatibility:
IssueWithCounts- Issue with dependency/dependent counts (list/search)IssueDetails- Issue with full relations (show)BlockedIssue- Issue with blocking info (blocked)TreeNode- Issue in dependency tree (dep tree)Statistics- Aggregate stats (stats/status)
§CSV Output
The csv module provides CSV formatting with:
- Configurable field selection via
--fields - Proper escaping of commas, quotes, and newlines
§Rich Output
The rich module provides enhanced terminal output using rich_rust:
- Tables with styled columns for issue lists
- Panels for detailed issue views
- Trees for dependency visualization
- Consistent theming via
Theme
Output mode is determined by OutputContext:
- Rich: TTY with colors enabled
- Plain: TTY with
--no-coloror not a TTY - JSON:
--jsonflag - Quiet:
--quietflag
Re-exports§
pub use crate::output::OutputContext;pub use crate::output::OutputMode;pub use theme::Theme;pub use syntax::available_themes;pub use syntax::detect_language_from_filename;pub use syntax::highlight_code;pub use syntax::parse_code_fence;pub use syntax::supported_languages;pub use markdown::contains_markdown;pub use markdown::escape_markdown;pub use markdown::render_markdown;
Modules§
- csv
- CSV formatting for
beads_rust. - markdown
- Markdown rendering for descriptions and comments.
- rich
- Rich terminal output components using rich_rust.
- syntax
- Syntax highlighting for code blocks.
- theme
- Theme and color definitions for rich output.
Structs§
- Blocked
Issue - Blocked issue for blocked view.
- Blocked
Issue Output - Minimal issue output for blocked command (bd parity).
- Breakdown
- Breakdown statistics by a dimension.
- Breakdown
Entry - A single entry in a breakdown.
- Issue
Details - Issue details with full relations for show view.
- Issue
With Counts - Issue with counts for list/search views.
- Issue
With Dependency Metadata - List
Page - Paginated list response envelope for
br list --json. - Ready
Issue - Minimal issue output for ready command (bd parity).
- Recent
Activity - Recent activity statistics from git history.
- Stale
Issue - Minimal issue output for stale command (bd parity). Contains only the fields that bd’s stale command outputs.
- Statistics
- Aggregate statistics output.
- Stats
Summary - Summary statistics for the project.
- Text
Format Options - Formatting options for text output.
- Tree
Node - Tree node for dependency tree view.
Functions§
- format_
issue_ line - Format a single-line issue summary.
- format_
issue_ line_ with - Format a single-line issue summary with options.
- format_
issue_ long_ with - Format an issue as a multi-line long text block.
- format_
issue_ pretty_ with - Format an issue as a tree-style pretty text block.
- format_
priority - Format priority as “P0”, “P1”, etc.
- format_
priority_ badge - Format priority badge with optional color.
- format_
priority_ label - Format priority label with optional color.
- format_
status_ icon - Return the icon character for a status.
- format_
status_ icon_ colored - Format status icon with optional color.
- format_
status_ label - Format status label with optional color.
- format_
type_ badge - Format issue type as a bracketed badge.
- format_
type_ badge_ colored - Format issue type badge with optional color.
- sanitize_
terminal_ inline - Escape terminal control characters before rendering untrusted text.
- sanitize_
terminal_ text - Escape terminal control characters before rendering trusted line structure.
- terminal_
width - Determine terminal width from environment (falls back to 80).
- truncate_
title - Truncate a title to fit within
max_lenvisible columns.