Skip to content

Releases: ksokolowski/StyledConsole

v0.10.5 - Internal Cleanup

24 Mar 18:55

Choose a tag to compare

Internal Cleanup

This release addresses code review findings with internal improvements. No public API changes.

Fixed

  • Thread safety: Render target (visual_width() mode) is now scoped per render call via ContextVar instead of being set globally in Console.__init__. Multiple Console instances no longer interfere with each other's width calculations.

Internal

  • Extracted exception classes to dedicated exceptions.py module
  • Adopted library-level NullHandler logging pattern (per Python best practices)
  • Added debug-level logging to bare except Exception blocks for better diagnosability
  • Simplified EffectSpec.with_*() methods using dataclasses.replace()
  • Renamed internal Renderer protocol to ObjectRenderer to avoid confusion with public Renderer
  • Moved benchmark and utility scripts out of tests/ directory
  • Added docs/THREAD_SAFETY.md documenting concurrency guarantees

Install

pip install styledconsole==0.10.5

v0.10.4

23 Jan 20:55

Choose a tag to compare

CLI Preview Tool & JSON Schema

This release adds a command-line interface for exploring StyledConsole features and a JSON Schema for IDE autocomplete.

Added

  • CLI Tool: New styledconsole command with 6 subcommands:
    • styledconsole demo — Interactive feature showcase
    • styledconsole palette [name] — List or preview 90 color palettes
    • styledconsole effects [name] — List or preview 47 effect presets
    • styledconsole icons [search] — List or search 200+ icons
    • styledconsole render <file> — Render YAML/JSON config files
    • styledconsole schema — Get JSON Schema path for IDE configuration
  • JSON Schema: Full schema for declarative configs at styledconsole/schemas/styledconsole.schema.json
    • Enables IDE autocomplete and validation for YAML/JSON config files
    • Supports VS Code, JetBrains, and other schema-aware editors
    • Covers all 11 object types: text, frame, banner, table, layout, vertical, horizontal, grid, group, spacer, rule
    • Includes shorthand syntax definitions (frame:, banner:, row:, column:, grid:)
    • Documents all 32+ effect presets and 9 border styles
  • Schema API: New styledconsole.schemas module with get_schema_path() and get_schema() functions
  • 20 new CLI tests covering all CLI functionality

Changed

  • Production/Stable status (was Beta)
  • Clean README style (reverted emoji-heavy headers)
  • PyPI installation (removed TestPyPI references)

Metrics

  • 1328 tests passing
  • 79% coverage
  • Python 3.10 – 3.14 supported

Full Changelog: v0.10.3...v0.10.4

v0.10.3

21 Jan 17:43

Choose a tag to compare

📚 Golden Path Documentation & Visual Upgrades

This release focuses on improving the onboarding experience with comprehensive "Golden Path" documentation, new complex examples, and a visual overhaul of the gallery.

Added

  • Golden Path Guide (docs/GETTING_STARTED.md): A comprehensive 30-second to 5-minute guide covering:
    • First frame creation
    • Emojis, colors, and gradients
    • Background effects and progress bars
    • Building complete dashboards
  • New Complex Examples:
    • enum_showcase.py: Demonstrates all v0.10.2 Enums (Border, Effect, Align, etc.)
    • background_combinations.py: Large dashboards with background gradients and alerts
    • grid_dashboard.py: 2x2/3-column grids, complete dashboard layouts, cyberpunk themes
  • Gallery Updates:
    • Added Background Layer Effects section
    • Added 90 Curated Color Palettes section

Changed

  • README Overhaul:
    • Added positioning statement: "StyledConsole is to Rich what Tailwind is to CSS"
    • Highlighted "Getting Started" link
    • Updated Key Features table with Background Effects and Enums
  • Documentation:
    • docs/README.md now features a prominent "Start Here" section

v0.10.2

19 Jan 19:08

Choose a tag to compare

What's New in v0.10.2

✨ New Features

StrEnum Types for IDE Autocomplete

New enum types provide IDE autocomplete and type safety while maintaining backward compatibility:

  • Border: SOLID, ROUNDED, DOUBLE, HEAVY, THICK, ROUNDED_THICK, ASCII, MINIMAL, DOTS
  • Effect: 47 preset effects including FIRE, OCEAN, RAINBOW, CYBERPUNK
  • Align: LEFT, CENTER, RIGHT
  • Direction: VERTICAL, HORIZONTAL, DIAGONAL
  • Target: CONTENT, BORDER, BOTH
  • LayoutMode: VERTICAL, HORIZONTAL, GRID
  • ExportFormat: HTML, TEXT, PNG, WEBP, GIF
from styledconsole import Console, Border, Effect, Align
console = Console()
console.frame("Hello", border=Border.ROUNDED, effect=Effect.OCEAN, align=Align.CENTER)

Background Layer Support for Effects

Gradient effects can now be applied to background colors:

from styledconsole import EffectSpec

# Background gradient
effect = EffectSpec.gradient("red", "blue", layer="background")
console.frame("Colored background!", effect=effect)

Intelligent Error Messages with Suggestions

Error messages now include "Did you mean?" suggestions using fuzzy matching:

  • "rounde" → Did you mean 'rounded'?
  • "rainbo" → Did you mean 'rainbow'?
  • "middle" → Did you mean 'center'?

📊 Stats

  • Tests: 1406 passed
  • Coverage: 82.63%

Full Changelog: v0.10.1...v0.10.2

v0.10.1 - Test Coverage Improvements

13 Jan 22:08

Choose a tag to compare

What's New

Added

  • Unit tests for presets/layouts.py (15 new tests)
  • Unit tests for presets/tables.py (19 new tests)

Changed

Improved

  • Test coverage improved from 79% to 81%

Installation

pip install styledconsole==0.10.1

v0.10.0 - Four-Layer Architecture API

12 Jan 18:00

Choose a tag to compare

🎉 Major API Overhaul

This release introduces a complete architectural redesign with four composable API layers, giving developers full control over how they build terminal UIs.

New Architecture Layers

Layer Purpose Key Classes
Builder Fluent API FrameBuilder, BannerBuilder, TableBuilder, LayoutBuilder
Model Immutable objects Frame, Banner, Table, Layout, Text, Style
Renderer Output targets TerminalRenderer, HTMLRenderer, RenderContext
Declarative Config-driven load_dict, load_yaml, load_json, from_template

✨ Key Features

  • Fluent Builder API - Method chaining for intuitive UI construction
  • Immutable Model Objects - Type-safe, serializable console components
  • Multi-target Rendering - Terminal and HTML output from same model
  • Declarative Configuration - Define UIs in YAML/JSON files
  • Jinja2 Templates - Dynamic UI generation with template system
  • Built-in Templates - Common patterns like info_box, error_box, status_card

📚 Documentation

✅ Quality

  • 1219 tests passing
  • 79% code coverage
  • Full backward compatibility with v0.9.x Console API

Installation

pip install styledconsole==0.10.0

Or with optional dependencies:

pip install styledconsole[all]==0.10.0  # Includes yaml, jinja, image export

See CHANGELOG.md for complete details.

v0.9.9.6 - Rich Integration & Quality Improvements

10 Jan 22:36

Choose a tag to compare

Rich Integration & Quality Improvements

This release focuses on cleaner integration with the underlying Rich library, fixing duplication and improving visual stability.

Changed

  • Internal Core Refactoring:
    • Theme Integration: StyledConsole themes now natively power Rich markup (e.g., [success]Text[/]).
    • Color Blending: Replaced custom RGB interpolation with rich.color.blend_rgb for more accurate gradients.
    • Text Styling: Refactored utils/color.py to use rich.text.Text objects, improving nested style and multiline support.
  • Emoji Support:
    • VS16 Fix: Added utils/rich_compat.py with patched_cell_len() to correctly measure emojis in modern terminals (fixing alignment issues).
    • Sanitization: Standardized emoji fallback logic in utils/sanitize.py.

Fixed

  • StyledColumns Bug: Fixed an issue where StyledColumns would strip color from ASCII fallback icons when emoji support was disabled.
  • Layout Issues: Fixed "Safey Analysis" frame layout in emoji_integration_demo.py.

v0.9.9.5 - Palettes, Animations, and Horizontal Layouts

09 Jan 17:12

Choose a tag to compare

Feature Expansion

This release expands the effects system with palettes, phase animations, horizontal/grid layouts, and the StyledColumns component.

Added

  • Horizontal & Grid Layouts for frame_group(): Arrange frames side-by-side or in grids

    • layout="horizontal" and layout="grid" options
    • columns= parameter: Number of columns or "auto" for terminal-width calculation
    • item_width= parameter: Width of each item frame
  • Palette System (data/palettes.py): 90 curated color palettes with category filtering

    • get_palette(), list_palettes(), get_palette_categories() functions
    • Categories: warm, cool, vibrant, muted, pastel, dark, bright, monochrome, rainbow
    • EffectSpec.from_palette() to create multi-stop gradients from named palettes
  • Extended Color Registry (data/colors.py): 949+ named colors

    • CSS4 colors (148), Rich colors (251), Extended colors (944 filtered)
  • Phase Animation System: Smooth gradient animations with phase cycling

    • phase= parameter on EffectSpec.gradient(), .multi_stop(), .rainbow()
    • cycle_phase() helper for smooth animation loops
    • PHASE_FULL_CYCLE and PHASE_INCREMENT_DEFAULT constants
  • Neon Rainbow Palette: Cyberpunk-style vivid colors

    • EffectSpec.rainbow(neon=True)
  • StyledColumns (columns.py): Policy-aware Rich Columns wrapper

    • Automatic emoji-to-ASCII sanitization when policy.emoji=False
    • VS16 emoji width fix for proper column alignment in modern terminals
    • Console API: console.columns(items, equal=True)

Installation

pip install -i https://test.pypi.org/simple/ styledconsole

Full changelog: CHANGELOG.md

v0.9.9.4 - Console API Integration

05 Jan 22:58

Choose a tag to compare

Console API Integration

Effects system is now fully integrated into the Console API with effect= parameter.

Added

  • effect= parameter for Console.frame(): Apply effects directly in frame calls
    console.frame("Hello", effect="fire")
    console.frame("World", effect=EFFECTS.ocean)
    console.frame("Custom", effect=EffectSpec.gradient("red", "blue"))
  • effect= parameter for Console.banner(): Apply effects to ASCII art banners
    console.banner("SUCCESS", effect="rainbow_neon")
    console.banner("ALERT", effect=EFFECTS.fire)
  • Public exports: EFFECTS and EffectSpec now exported from main styledconsole module
  • StyleContext.effect field: New field to hold resolved effect specification

Deprecated

  • start_color/end_color in frame(): Use effect=EffectSpec.gradient(start, end) instead
  • border_gradient_start/border_gradient_end in frame(): Use effect=EffectSpec.gradient(..., target='border') instead
  • rainbow=True in banner(): Use effect="rainbow" instead
  • start_color/end_color in banner(): Use effect=EffectSpec.gradient(start, end) instead

All deprecated parameters continue to work with deprecation warnings. They will be removed in v1.0.0.

Fixed

  • Kitty Terminal ZWJ Emoji Alignment: Fixed frame alignment issues when using ZWJ emoji sequences like 👨‍💻 or 🏳️‍🌈 in Kitty terminal
  • Wide Symbol Character Width: Fixed width calculation for wide non-emoji symbols like trigram (☰) in modern terminals
  • PyPI Publishing: Version bump to resolve TestPyPI filename reuse issue

Full Changelog: https://github.com/ksokolowski/StyledConsole/blob/main/CHANGELOG.md

Install from TestPyPI:

pip install -i https://test.pypi.org/simple/ styledconsole==0.9.9.4

v0.9.9.1 - First Public Release

03 Jan 11:49

Choose a tag to compare

StyledConsole v0.9.9.1 — First Public Release

A modern Python library for elegant terminal output — rich formatting, colors, emojis, gradients, and export capabilities built on top of Rich.

This is the first version ready for initial public use!

Installation

pip install -i https://test.pypi.org/simple/ styledconsole

Highlights

Core Features

  • Gradient Engine — Smooth rainbows and linear gradients on borders, text, and banners
  • Smart Icons — 224 icons with automatic ASCII fallback for CI/legacy terminals
  • StyledTables — Beautiful tables with gradient borders and config-driven creation
  • Frame Engine — 8 border styles, nested frames, width alignment
  • Export System — Export to HTML, PNG, WebP, GIF with full emoji support
  • Environment Detection — Auto-adapts for NO_COLOR, CI, TERM=dumb

What's New in 0.9.9.1

Documentation & PyPI Compatibility

  • README.md: Simplified, text-focused README that renders properly on PyPI
  • docs/GALLERY.md: New auto-generated visual showcase with all example images
  • GitHub Sponsors: Added GitHub Sponsors support

Image Export System (from 0.9.9)

  • Full-featured image export with emoji rendering and font styles
  • export_image() method supporting PNG, WebP, and GIF formats
  • Smart emoji renderer with fallback font support

Table System (from 0.9.9)

  • StyledTable class with Rich-based rendering
  • GradientTable for automatic border gradient effects
  • Layout presets for common use cases

Quick Start

from styledconsole import Console, icons

console = Console()

# Simple frame with gradient border
console.frame(
    "Build successful!",
    title="Status",
    border="rounded",
    border_gradient_start="green",
    border_gradient_end="cyan",
)

# Smart icons (auto-fallback in CI)
print(f"{icons.ROCKET} Deploying...")
print(f"{icons.CHECK_MARK_BUTTON} Done!")

# ASCII art banner with rainbow
console.banner("HELLO", font="slant", rainbow=True)

Quality Metrics

  • 869 tests passing
  • 80% code coverage
  • Python 3.10 - 3.14 compatible

Documentation

Support


Full Changelog: https://github.com/ksokolowski/StyledConsole/blob/main/CHANGELOG.md