VS Code Theme Generator

An interactive CLI tool that converts Ghostty terminal color schemes into VS Code theme extensions. Built with TypeScript, React (Ink), and Vite for a seamless terminal-based experience.

โœจ Features

  • Interactive Workflow - Step-by-step guided process for creating VS Code themes
  • Ghostty Compatibility - Supports multiple Ghostty color scheme formats (palette and key-value)
  • Professional Output - Generates complete VS Code extension packages ready for publishing
  • Validation & Error Handling - Comprehensive input validation with helpful error messages
  • Customizable Options - Configure theme metadata, descriptions, and advanced settings
  • Zero Configuration - Works out of the box with sensible defaults

๐Ÿš€ Quick Start

The easiest way to use the VS Code Theme Generator is with bunx (no installation required):

bunx vscode-theme-gen

This will start the interactive CLI that guides you through:

  1. Theme File Selection - Choose your Ghostty color scheme file
  2. Theme Configuration - Set name, description, and metadata
  3. Options Selection - Configure advanced settings and preferences
  4. Generation - Create your complete VS Code extension

๐Ÿ“– Usage

Basic Usage

bunx vscode-theme-gen

The interactive interface will guide you through each step:

โ”Œโ”€ VS Code Theme Generator โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                               โ”‚
โ”‚  Convert Ghostty color schemes to VS Code themes              โ”‚
โ”‚                                                               โ”‚
โ”‚  Select theme file: /path/to/your/ghostty-theme.conf          โ”‚
โ”‚  Theme name: My Custom Theme                                  โ”‚
โ”‚  Description: A beautiful theme based on my terminal          โ”‚
โ”‚  Author: Your Name                                            โ”‚
โ”‚                                                               โ”‚
โ”‚  Generating extension...                                      โ”‚
โ”‚                                                               โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Command Line Options

# Show help
bunx vscode-theme-gen --help

# Show version
bunx vscode-theme-gen --version

Generated Extension Structure

The tool creates a complete VS Code extension with:

my-custom-theme/
โ”œโ”€โ”€ package.json           # Extension metadata and configuration
โ”œโ”€โ”€ README.md             # Documentation with preview images
โ”œโ”€โ”€ CHANGELOG.md          # Version history
โ”œโ”€โ”€ icon.png              # Extension icon
โ”œโ”€โ”€ themes/
โ”‚   โ””โ”€โ”€ my-custom-theme.json    # Your VS Code theme
โ””โ”€โ”€ vsc-extension-quickstart.md # VS Code extension guide

๐Ÿ› ๏ธ Development

Prerequisites

  • Bun or Node.js 18+
  • Git

Setup

# Clone the repository
git clone https://github.com/corismix/vscode-theme-gen.git
cd vscode-theme-gen

# Install dependencies
bun install

# Run in development mode
bun run dev

Available Scripts

CommandDescription
bun startBuild production version and run CLI
bun run devBuild development version and run CLI
bun run buildProduction build (creates executable with shebang)
bun run build:devDevelopment build with debugging
bun run build:watchWatch mode for development
bun run type-checkTypeScript type checking (no emit)
bun run lintESLint with zero warnings policy
bun run lint:fixAuto-fix linting issues
bun run formatFormat code with Prettier
bun run format:checkCheck formatting without changes
bun run testRun all tests with verbose output
bun run test:watchRun tests in watch mode
bun run test:coverageGenerate coverage reports
bun run test:uiVisual test interface
bun run cleanRemove build artifacts and cache
bun run analyze:bundleAnalyze bundle size and content

Project Structure

src/
โ”œโ”€โ”€ components/           # React components for the CLI interface
โ”‚   โ”œโ”€โ”€ steps/           # Step-by-step workflow components
โ”‚   โ””โ”€โ”€ ui/              # Reusable UI components
โ”œโ”€โ”€ lib/                 # Core business logic
โ”‚   โ”œโ”€โ”€ theme-generator.ts    # Ghostty โ†’ VS Code conversion
โ”‚   โ”œโ”€โ”€ file-generators.ts    # Extension file generation
โ”‚   โ””โ”€โ”€ utils-simple.ts       # Utilities and validation
โ”œโ”€โ”€ types/               # TypeScript type definitions
โ”œโ”€โ”€ config/              # Configuration and limits
โ””โ”€โ”€ test/                # Test files and utilities

Key Technologies

  • TypeScript - Type-safe development
  • React + Ink - Terminal UI components
  • Vite - Fast build system with custom plugins
  • Meow - CLI argument parsing
  • Vitest - Testing framework

๐Ÿงช Testing

# Run all tests
bun run test

# Run tests in watch mode
bun run test:watch

# Generate coverage report
bun run test:coverage

# Open visual test interface
bun run test:ui

Test Categories

  • Unit Tests - Core business logic (theme generation, file operations)
  • Integration Tests - CLI workflows and file system interactions
  • Coverage Reports - Focus on critical paths and error handling

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes following the existing code style
  4. Run tests (bun run test) and linting (bun run lint)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Guidelines

  • Zero-warning ESLint policy - All warnings must be resolved
  • Strict TypeScript - No implicit any, all types must be defined
  • Test coverage - Add tests for new features and bug fixes
  • Documentation - Update README and comments for significant changes

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Ghostty - The excellent terminal emulator that inspired this tool
  • Ink - For making beautiful terminal interfaces with React
  • VS Code - The editor that makes development a joy

Made with โค๏ธ using Claude Code