A CLI tool to automatically compile Stardew Valley Content Patcher portrait mods without writing JSON.
Project description
svpbuild
Build Stardew Valley Content Patcher portrait packs without hand-writing content.json.
svpbuild scans a source folder, discovers portrait PNGs, parses variants and conditions from
filenames, and writes a ready-to-install Content Patcher content pack.
This project is not affiliated with, endorsed by, or maintained by ConcernedApe, SMAPI, or Content Patcher.
Usage
Run without installing permanently:
uvx svpbuild --help
uvx svpbuild ./my-portrait-pack -o ./build
Install as a persistent CLI tool:
uv tool install svpbuild
svpbuild --help
Other install options:
pipx install svpbuild
pip install svpbuild
Source Layout
Your source directory must contain a SMAPI manifest.json and an assets/ directory.
my-portrait-pack/
manifest.json
assets/
Abigail.png
Abigail-Summer.png
Abigail-Beach_Outfit-Rain.png
Sebastian-Goth-LocationName-Saloon.png
Folders inside assets/ are optional. svpbuild recursively discovers every .png file and uses
the exact relative path in the generated content.json.
assets/
seasonal/Abigail-Summer.png
custom/Sebastian-Goth-LocationName-Saloon.png
Filename Schema
Use dashes to separate structural filename segments:
CharacterName-[VariantSegment]-[Condition]-[ConditionValue].png
Examples:
Abigail.png -> Abigail, Standard
Abigail-Summer.png -> Abigail, Standard, Season = Summer
Abigail-Beach_Outfit.png -> Abigail, Beach Outfit
Abigail-Beach_Outfit-Summer.png -> Abigail, Beach Outfit, Season = Summer
Sebastian-Goth-LocationName-Saloon.png -> Sebastian, Goth, LocationName = Saloon
Reserved condition values are detected automatically:
- Seasons:
Spring,Summer,Fall,Winter - Weather:
Sun,Rain,Storm,Snow,Wind,GreenRain - Days:
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday - Outdoors:
Indoor,Outdoor
Known Content Patcher tokens consume the next segment as their value, for example
LocationName-Saloon or Day-14.
Unrecognized segments become the variant name. Underscores inside variants are converted to spaces.
Output
By default, svpbuild writes a built content pack into build/:
build/<UniqueID>-<Version>/
manifest.json
content.json
config.json
assets/
Use -o or --output to choose a different output directory.
svpbuild ./my-portrait-pack --output ./dist
svpbuild ./my-portrait-pack --verbose
svpbuild --version
Development
uv run svpbuild --help
uv run --group dev ruff check .
uv run --group dev ruff format --check .
uv run --group dev pytest
uv build
Release
Releases are published from GitHub Actions with trusted publishing.
Before running the release workflow, manually bump version in pyproject.toml, run uv lock,
update CHANGELOG.md, and commit those changes. The release workflow publishes exactly the version
already committed to pyproject.toml; it does not bump versions automatically.
The workflow fails if the version already exists as a git tag, GitHub Release, TestPyPI release, or PyPI release.
Configure these GitHub environments before the first release:
testpypipypi
Configure trusted publishers for .github/workflows/release.yml on both TestPyPI and PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file svpbuild-0.2.2.tar.gz.
File metadata
- Download URL: svpbuild-0.2.2.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c228861fb3e011f6624ee394a1bca6d930e47c43e4618de6d2b1f9089c23e303
|
|
| MD5 |
de7bebcb4dab3c011c72da28609b694b
|
|
| BLAKE2b-256 |
b032ab333562775e092a832a6cd88e87401603c7a4fed7db1678badb6f0c489e
|
File details
Details for the file svpbuild-0.2.2-py3-none-any.whl.
File metadata
- Download URL: svpbuild-0.2.2-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4441c2116112ce56b05e54bbb15bc9755582fdb39584c46ca119274164c034bf
|
|
| MD5 |
2a524a175f01f4f5817cc4729deced9c
|
|
| BLAKE2b-256 |
c67ae1d0c193028c431b204c0d4bb4383b2392fbc9218461c2135ef34162a238
|