Skip to content

feat(cli): add theme customization flags to create command - #3

Merged
CarlosZiegler merged 2 commits into
mainfrom
worktree-cli-theme-integration
Feb 22, 2026
Merged

feat(cli): add theme customization flags to create command#3
CarlosZiegler merged 2 commits into
mainfrom
worktree-cli-theme-integration

Conversation

@CarlosZiegler

@CarlosZiegler CarlosZiegler commented Feb 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add --theme, --base-color, --radius, --font flags to the create command so scaffolded projects get the chosen theme applied to app.css
  • Port theme generation code (types, registry, utils) from the web app into packages/cli/src/theme/
  • 21 built-in color themes, 4 base colors, 5 radius presets, 3 font options
  • Invalid flag values warn gracefully and fall back to defaults — no crashes
  • Backwards compatible: no flags = unchanged default app.css

Test plan

  • bunx tsc --noEmit — no type errors in theme files
  • bun run build — builds successfully (64.82 kB bundle)
  • bun test — 24/24 tests passing
  • Manual: bunx create-start-kit-dev create my-app --theme blue --base-color zinc produces themed app.css
  • Manual: bunx create-start-kit-dev create my-app produces default app.css (unchanged behavior)
  • Manual: bunx create-start-kit-dev create --theme nonexistent warns and uses default

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added theme customization to the create command with new options: --theme, --base-color, --radius, and --font
    • Included 21 built-in color themes with 4 base color options, 5 radius presets, and 3 font choices
    • Graceful fallback to defaults with warnings when invalid options are provided
  • Documentation

    • Updated help text to document new theme customization options
  • Tests

    • Added comprehensive test coverage for theme parsing and styling

…e command

Scaffolded projects can now be themed at creation time. The CLI generates
a complete app.css with OKLCH color variables, font imports, and marquee
utilities based on the selected theme configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 22, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Introduces a complete theme customization system for the CLI, enabling users to customize application appearance via command-line flags (--theme, --base-color, --radius, --font). Adds 21 built-in color themes, theme utilities for CSS generation and color conversion, argument parsing with validation, and comprehensive test coverage for theme-related functionality.

Changes

Cohort / File(s) Summary
Version & Documentation
CHANGELOG.md, package.json
Version bump to 0.1.8 and changelog entry documenting theme customization flags, 21 color themes, CSS generation, and test coverage.
Theme Type System
src/theme/theme-types.ts, src/theme/theme-registry.ts
Type definitions for theme configuration (ThemeConfig, ThemeName, RadiusPreset, FontOption) and theme registry containing 21 predefined themes, base colors, radius presets, font options, and default configuration.
Theme Implementation
src/theme/theme-utils.ts, src/theme/theme-apply.ts
Core theme utilities for building CSS variables, hex-to-OKLCH color conversion, and full CSS generation; theme application logic with argument parsing, validation with fallbacks, and CSS file writing.
CLI Integration
src/index.ts
Extended usage documentation with theme options, modified project name extraction to allow option-only invocation, and integration of theme parsing and application into the create command workflow.
Test Coverage
src/theme/__tests__/theme-apply.test.ts, src/theme/__tests__/theme-utils.test.ts
Comprehensive test suites covering parseThemeArgs (null/default/invalid handling), buildTheme (base and accent merging), hexToOklch (color conversion), and generateFullAppCss (CSS structure validation).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰✨ With themes now woven into our CLI thread,
Colors dance and CSS variables spread,
Twenty-one palettes for every taste,
From neutral grays to vibrant haste,
The CLI hops into customization's glow! 🎨

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch worktree-cli-theme-integration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CarlosZiegler CarlosZiegler self-assigned this Feb 22, 2026
@CarlosZiegler
CarlosZiegler merged commit 259445b into main Feb 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant