text-code

Generate React/TSX page code from scratch; supports reference assets and prompt expansion assistance.

meitu text-code

Usage Examples

# Scenario 1: Basic code generation (required parameters only)
meitu text-code \
  --prompt "create a dark-themed landing page Hero: title + CTA + three feature columns" \
  --json

# Scenario 2: Reference screenshot for layout guidance
meitu text-code \
  --prompt "generate a product showcase page based on the reference screenshot layout" \
  --image_list ./layout_ref.jpg \
  --json

# Scenario 3: Specify model + download results
meitu text-code \
  --prompt "e-commerce product listing page with filtering and pagination" \
  --image_list ./ui_ref.jpg \
  --model pretzel_pro \
  --prompt_name default \
  --json \
  --download-dir ./output

Parameters

ParameterRequiredDescription
--promptYesType: string; page description
--image_listNoType: string[]; optional reference image(s)
--video_listNoType: string[]; optional reference video(s)
--modelNoType: string; default: pretzel_pro; options: auto / pretzel_pro / pretzel_lite
--prompt_nameNoType: string; template name
--download-dirNoType: string; download result files to the specified local directory
--outputNoType: string[]; specify output file paths, mapped in order to data.result.urls
--jsonNoOutput results in JSON format for scripting or agent parsing