text-code-edit
Edit existing React/TSX/JSX source code; supports multi-round iteration and chained editing. When --source_code_url is omitted, the most recent code_url is automatically retrieved from context.
meitu text-code-edit
Usage Examples
# Scenario 1: Basic code editing (required parameters only)
meitu text-code-edit \
--prompt "increase the Hero title font size and add a product image placeholder on the right" \
--source_code_url https://example.com/page.tsx \
--json
# Scenario 2: Reference image for assisted editing
meitu text-code-edit \
--prompt "apply the color scheme from the reference image" \
--source_code_url https://example.com/page.tsx \
--image_list ./design_ref.jpg \
--json
# Scenario 3: Specify model + download results
meitu text-code-edit \
--prompt "optimize responsive layout with mobile adaptation" \
--source_code_url https://example.com/page.tsx \
--model pretzel_pro \
--prompt_name default \
--json \
--download-dir ./outputParameters
| Parameter | Required | Description |
|---|---|---|
--prompt | Yes | Type: string; description of the desired edit |
--source_code_url | Yes | Type: string; source code URL (when omitted, the most recent code_url is automatically retrieved from context) |
--image_list | No | Type: string[]; optional reference image(s) |
--video_list | No | Type: string[]; optional reference video(s) |
--model | No | Type: string; default: pretzel_pro; options: auto / pretzel_pro / pretzel_lite |
--prompt_name | No | Type: string; template name |
--download-dir | No | Type: string; download result files to the specified local directory |
--output | No | Type: string[]; specify output file paths, mapped in order to data.result.urls |
--json | No | Output results in JSON format for scripting or agent parsing |