← Catalog

pi-pretty-codeblocks

Hide Markdown code fences in the Pi coding-agent TUI while preserving syntax highlighting.

Package

Install

Install with PiG

pig install npm:pi-pretty-codeblocks

Install with Pi

pi install npm:pi-pretty-codeblocks
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "extensions"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.

pi-pretty-codeblocks

Hide Markdown code fences in the Pi coding-agent TUI using a Claude Code-like terminal presentation: syntax-highlighted code remains, while fence and language rows are hidden by default.

This extension changes display-only rendering. It does not modify the assistant message stored in the session or sent back to the model.

Features

  • Hides visible opening and closing triple-backtick or tilde fence lines.
  • Preserves OMP/Pi's existing syntax highlighting and code-block styling.
  • Handles streamed and finalized assistant messages through the Markdown component's rendered lines.
  • Language labels are hidden by default, matching Claude Code's ordinary response output.
  • Set PI_PRETTY_CODEBLOCKS_LANG=1 to show language labels.
  • Other Markdown lines are passed through unchanged.

Install

pi install npm:pi-pretty-codeblocks

Or install directly from GitHub:

pi install git:github.com/Thyguad/pi-pretty-codeblocks

Restart Pi after installation, or run /reload in an existing session.

OMP

OMP users can install the same package with:

omp install npm:pi-pretty-codeblocks

The extension is also compatible with a direct local load:

omp --extension ./extensions/pretty-codeblocks.ts

Configuration

Language labels are hidden by default. To show them:

PI_PRETTY_CODEBLOCKS_LANG=1 pi

The environment variable must be present when Pi starts. To retain Pi's default two-column code indentation:

PI_PRETTY_CODEBLOCKS_INDENT=0 pi

Compatibility

The extension targets the current Pi/OMP TUI Markdown API and uses the @oh-my-pi/* package names. It relies on a small renderer patch because Pi does not currently expose a public hook for replacing ordinary assistant Markdown rendering.

License

MIT