ZHENYU Rebrand
Overview
Turn any open-source project into a ZHENYU-branded product with one pass:
rename the product to zhenyu and swap every branding icon for the bundled
阵雨 (rain shower) icon. This is the "secondary commercial development"
step used right after cloning / deploying an open-source app, before it ships.
The skill ships a deterministic scripts/rebrand.py plus the master icon assets,
so rebranding is reproducible rather than a manual find-and-replace each time.
When to use
- A user asks to deploy, fork, self-host, or package an open-source app and
wants it rebranded (namezhenyu, 阵雨 icon). - Phrases like "white-label this", "换名字和图标", "商业化二次开发", "改成 zhenyu 品牌".
- After
git clone/npx create-*/ scaffolding, beforebuild/deploy.
Workflow
Step 1 — Clone / scaffold the target project
Obtain the open-source code in a local directory. Do not run its build yet;
rebrand first so compiled output picks up the new assets.
Step 2 — Detect and report
Run the rebrand script in dry-run to see what it will change:
python scripts/rebrand.py --project <path/to/project> --dry-run
The script auto-detects the upstream product name from package.json,
manifest.webmanifest, the README title, pyproject.toml, Cargo.toml,
or go.mod. Review the proposed name/icon changes.
Step 3 — Apply the rebrand
python scripts/rebrand.py --project <path/to/project>
What it does:
1. Name — replaces the detected product name (case-insensitive, word-boundary
safe) with zhenyu across source/text files. Skips node_modules, .git,
dist, build-output, and dependency dirs.
2. Icon — finds branding images (favicon*, *logo*, *icon*,
apple-touch*, banner*, og-image*, brand*, thumbnail*) and replaces
them with the 阵雨 icon (.ico→ICO, .svg→SVG, raster→resized PNG).
Electron/Tauri build/ and resources/ icons are included.
Optional flags: --name <brand> (override target name), --old-name <x> (skip
auto-detect), --no-name, --no-icons, --icon <svg> (custom source icon).
Step 4 — Verify & rebuild
- Load the app / open
index.htmland confirm the title showszhenyuand the
favicon/logo is the 阵雨 icon. - If the upstream used inline
data:URI favicons or hard-coded brand
strings in minifieddist/, fix those by hand (see references). - Run the project's normal
build/packagestep so compiled output embeds the
new assets.
Step 5 — Respect the license (mandatory)
Rebranding is allowed by most permissive licenses (MIT, Apache-2.0, BSD) but
attribution is required. The script never touches LICENSE / NOTICE /
copyright headers. Before distributing:
- Keep the original license and NOTICE file intact.
- Add your own copyright/branding notice; do not remove the upstream one.
- For copyleft licenses (GPL/AGPL), consult the license — rebranding does not
remove share-alike obligations.
Bundled resources
assets/ (icon master + raster)
zhenyu-rain.svg— vector master of the 阵雨 (rain shower) icon (source of truth).zhenyu-rain.png(512),zhenyu-rain-192.png,zhenyu-rain-32.png,
zhenyu-rain.ico— raster equivalents for Electron / PWA / favicon.- Regenerate raster assets anytime with
python scripts/render_icon.py
(requires Pillow).
scripts/
rebrand.py— the automation (detect name, swap name + icons). See--help.render_icon.py— rebuilds the raster icon assets from the SVG design.
references/
branding-locations.md— per-stack map of where name/icon branding lives
(web, PWA, Electron/Tauri, mobile, CLI, docs) and what the script misses.
Notes
- The script targets display-name / branding strings, not arbitrary code
identifiers. When in doubt, use--dry-runand eyeball the diff. - Always re-verify inside the running app, not just the file tree.