Wytch::CLI

Command-line interface for Wytch.

Description

Command-line interface for Wytch.

Provides commands for creating, developing, and building Wytch sites.

Methods

def source_root

Returns the path to template files used by the generator.

Returns:
(String) — path to templates directory

def new(name)

Creates a new Wytch site with the given name.

Generates a complete site structure including: - Configuration files (Gemfile, config.rb, package.json, etc.) - Content directory with sample pages - Source directory with views and layouts - Asset pipeline setup (Vite, ReScript, Tailwind)

Parameters:
name (String) — the name/directory for the new site
Returns:
(void)

def server

Starts the development server with hot reloading.

Returns:
(void)

def build

Builds the site for production.

First runs npm run build to compile assets with Vite, then renders all pages to static HTML in the build/ directory.

Returns:
(void)