Skip to content

tiniscule/bolden-agents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bolden

A transparent PTY wrapper that applies bold-prefix formatting to terminal program output, improving readability and scan speed.

bolden intercepts a child process's output and bolds the first ~40% of each word, giving your eyes natural anchor points to guide faster reading. All existing ANSI escape sequences (colors, cursor movement, window titles, etc.) are preserved.

demo

┌──────────┐    PTY     ┌────────────┐   stdout   ┌──────────┐
│  child   │──────────▶│   bolden   │───────────▶│ terminal │
│ process  │◀──────────│            │◀───────────│  (user)  │
└──────────┘   stdin    └────────────┘   stdin    └──────────┘

Installation

From source

cargo install --path .

From releases

Download a prebuilt binary from the Github releases page. Builds are available for:

  • x86_64 Linux
  • aarch64 Linux
  • x86_64 macOS
  • aarch64 macOS

Usage

bolden <command> [args...]

Examples

bolden claude
bolden cat README.md

Debug logging

RUST_LOG=bolden=debug bolden claude 2>/tmp/bolden.log
RUST_LOG=bolden=trace bolden claude 2>/tmp/bolden.log  # per-word detail

How it works

bolden spawns the target command inside a PTY and runs three concurrent threads:

  1. Output thread — reads child output, parses ANSI escape sequences with a state machine, applies bold-prefix formatting to visible words, and writes to stdout.
  2. Input thread — forwards user keystrokes to the child process with no buffering.
  3. Resize thread — listens for SIGWINCH signals and propagates terminal dimension changes to the PTY.

Bold formatting rules

  • Words shorter than 3 characters are left unchanged.
  • For longer words, the first ceil(len × 0.4) characters are bolded.
  • UTF-8 boundaries are respected — multi-byte characters are never split.
  • If the child process already emitted bold sequences, bolden skips redundant formatting.

Building

cargo build --release

Testing

cargo test

License

MIT

About

Add bold-prefix formatting for easier reading with your coding agent

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages