Skip to main content
Version: main

tinct generate

Generate theme configurations from a colour source and apply them to output plugins.

Synopsis

tinct generate -i <input-plugin> [flags]

Description

The generate command is the primary way to create and apply themes. It:

  1. Extracts or loads colours using the specified input plugin
  2. Categorises colours into semantic roles
  3. Generates configuration files for each output plugin
  4. Optionally triggers reload hooks

Required flags

FlagDescription
-i, --inputInput plugin to use (e.g., image, file, remote-json)

Common flags

FlagDefaultDescription
-o, --outputallOutput plugins (comma-separated or all)
-p, --pathPath or URL for input (varies by plugin)
-t, --themeautoTheme type: auto, dark, or light
-v, --verbosefalseEnable verbose output
-q, --quietfalseSuppress non-error output
--previewfalsePreview palette without writing files
--dry-runfalseShow what would be written
--forcefalseOverwrite untracked files
--save-paletteSave palette to JSON file
--no-desaturationfalseDisable colour desaturation

Plugin-specific flags

Each plugin may register additional flags with the format --<plugin>.<flag>:

# Image plugin
--image.colors 16
--image.extractAmbience
--image.ambienceRegions 8

# Markdown output
--markdown.name "My Theme"
--markdown.include-thumbnail

See individual plugin documentation for available flags.

Examples

Basic usage

# Generate from image
tinct generate -i image -p ~/Pictures/wallpaper.jpg -o all

# Generate from remote JSON
tinct generate -i remote-json \
--remote-json.url "https://example.com/theme.json" \
-o all

Targeting specific plugins

# Only terminals
tinct generate -i image -p ~/wallpaper.jpg -o kitty,alacritty,ghostty

# Only Hyprland ecosystem
tinct generate -i image -p ~/wallpaper.jpg -o hyprland,hyprpaper,hyprlock

Preview and dry-run

# See the extracted palette
tinct generate -i image -p ~/wallpaper.jpg -o all --preview

# See what files would be written
tinct generate -i image -p ~/wallpaper.jpg -o all --dry-run

Force theme type

# Force dark theme
tinct generate -i image -p ~/wallpaper.jpg -o all -t dark

# Force light theme
tinct generate -i image -p ~/wallpaper.jpg -o all -t light

Save palette

# Save extracted palette to JSON
tinct generate -i image -p ~/wallpaper.jpg -o all --save-palette palette.json

AI generation

# Google Gemini
export GOOGLE_API_KEY="your-key"
tinct generate -i google-genai --prompt "sunset over mountains" -o all

# OpenRouter
export OPENROUTER_API_KEY="your-key"
tinct generate -i openrouter --prompt "cyberpunk city" -o all

Output

On success, tinct outputs:

  • List of generated files
  • Theme type detected/used
  • Any warnings or notes

With --verbose:

  • Detailed colour extraction information
  • Plugin processing details
  • File write confirmations

Exit codes

CodeMeaning
0Success
1General error
2Invalid arguments
3Plugin error

See also