feat: add 'glow style init' command with 11 preset themes and live preview - #975
Open
12britz wants to merge 5 commits into
Open
feat: add 'glow style init' command with 11 preset themes and live preview#97512britz wants to merge 5 commits into
12britz wants to merge 5 commits into
Conversation
…r styles Add an interactive CLI command 'glow style init' that walks users through creating a custom glamour JSON stylesheet. Users are prompted for colors for key markdown elements (document text, headings, code, links, etc.) and the command generates a valid stylesheet that can be used with 'glow -s path/to/style.json'. Fixes are included for the generated JSON: ANSI color codes and hex colors are supported, and the output matches the glamour JSON format exactly.
…eview Replace individual per-element prompts with a simple theme picker: - 10 curated color themes (Catppuccin, Nord, Gruvbox, Solarized, etc.) - 1 Random option for auto-generated color palettes - Live markdown preview rendered with glamour showing h1, code, links, etc. - Save/Re-randomize/Quit workflow - No new dependencies needed
…cancel Replace numbered input with a Bubble Tea TUI: - Arrow keys (↑/↓ or j/k) to browse 11 themes - Color swatches show actual theme colors below the list - Enter to save, Esc/q to cancel, r for random palette - Live preview with color blocks for Text, H1, H1 Bg, H2, Code, Link
Show a rendered markdown snippet using glamour with the selected theme's colors. Preview updates in real-time as user navigates themes with arrow keys. Removes redundant color swatches in favor of actual rendered output.
Replace glamour-rendered markdown preview with direct lipgloss-rendered color palette blocks and sample text that always set both foreground and background colors. This ensures visibility regardless of terminal theme. Palette shows colored blocks with ANSI codes for Text, H1, Code, Link, HR, H1Bg. Sample section shows styled heading, subtitle, code, and link.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Add an interactive command
glow style initfor creating custom color stylesheets without writing JSON.Pick from 11 preset color themes, see a live rendered preview, and save with one keypress.
Usage
Then:
Flow
Files
style_cmd.gomain.gostyleCmdglow_test.gobuildStyle()