Add dark mode support to components. Use when implementing dark theme.
Adding dark mode means updating every component with CSS variables or Tailwind dark: prefixes. This tool does it automatically for single files or entire directories.
One command. Zero config. Just works.
npx ai-dark-mode ./src/components/Card.tsx
# Single component
npx ai-dark-mode ./src/components/Card.tsx
# Entire directory
npx ai-dark-mode ./src/components/
# Preview before writing
npx ai-dark-mode ./src/components/Card.tsx --dry-run
This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.
Find more:
No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable.
npx ai-dark-mode --help
Reads your component files, identifies color definitions and styles, then adds appropriate dark mode variants. For Tailwind it adds dark: prefixes. For CSS it uses CSS variables with prefers-color-scheme.
MIT. Free forever. Use it however you want.