feat(cli): add named color themes and rich-formatted help

Render all click help through rich-click, themed by a new `theme` config key (9 palettes + aliases, previewable via `unshackle env theme`), and show service docstrings in local and remote `dl <TAG> -h`.
This commit is contained in:
imSp4rky
2026-08-13 16:25:14 -06:00
parent a248ae79bd
commit db9ec3e334
16 changed files with 439 additions and 40 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ from io import BytesIO
from typing import Any, Optional
# RenderableType is rich's union of "things that can be printed to a console".
from rich import box
from rich.console import Group, RenderableType
from rich.padding import Padding
from rich.panel import Panel
@@ -145,7 +146,7 @@ def render_track_panel(rows: list[TrackRow], total: int) -> Panel:
detail.append(" | ")
detail.append("Hi-Res", style="gold1")
node.add(detail, guide_style="bright_black")
return Panel(tree, title="Available Tracks")
return Panel(tree, title="Available Tracks", box=box.SQUARE, border_style="bright_black")
def render_album_header(
+3 -2
View File
@@ -3,6 +3,7 @@ from __future__ import annotations
import re
from typing import Any, Optional
from rich import box
from rich.console import Group, RenderableType
from rich.markup import escape
from rich.panel import Panel
@@ -112,7 +113,7 @@ class MusicRenderer:
suffix = "s" if hidden != 1 else ""
tree.add(f"[bright_black]... {hidden} more track{suffix}[/]", guide_style="bright_black")
return Panel(tree, title="Available Tracks")
return Panel(tree, title="Available Tracks", box=box.SQUARE, border_style="bright_black")
def render_plan_header(self, plan: MusicDownloadPlan) -> Optional[Table]:
title = plan.title
@@ -174,7 +175,7 @@ class MusicRenderer:
suffix = "s" if hidden != 1 else ""
tree.add(f"[bright_black]... {hidden} more track{suffix}[/]", guide_style="bright_black")
return Panel(tree, title="Available Tracks")
return Panel(tree, title="Available Tracks", box=box.SQUARE, border_style="bright_black")
@staticmethod
def _metadata_grid() -> Table: