0.6.0
fp init — one command, fresh clone to ready-to-design
git clone git@github.com:<your-org>/<your-site>.git
cd <your-site>
fp initThat's it. Designer is in the WP admin a couple of minutes later, with the previous designer's snapshot already applied — assets, templates, options, the lot.
Re-running fp init after docker compose down -v is the canonical recovery flow: same command, brings volumes back from empty to the state captured by the latest snapshot, MinIO assets and all.
What it does
Six idempotent steps:
- Scaffold
.envfrom.env.exampleif missing - Run
composer installvia docker (no PHP needed on host) - Write
FP_S3_DISABLED=0to.envso uploads land in MinIO (designer mental model matches prod) — unless operator already setFP_S3_DISABLEDexplicitly, in which case their choice wins docker compose up -d --wait— gates on healthcheckswp core installif WP isn't installed yet (defaultsadmin / admin / admin@example.test, override via[init]infrankenpress.toml)- Apply the latest snapshot by
manifest.created— same logic the chart's install Job uses on cluster deploy, so local + in-cluster apply target the same source of truth
Every step is independently idempotent: .env scaffold no-ops if .env exists, composer install no-ops if vendor/ exists, the FP_S3_DISABLED line is appended only if absent, wp core install no-ops if WP is already installed, apply hits the mu-plugin's idempotency markers. Re-running is safe and cheap.
Flags
| Flag | Effect |
|---|---|
--slug <s> |
Override the most-recent-snapshot pick. |
--skip-setup |
Skip ALL env-mutating steps (.env scaffold + composer + FP_S3_DISABLED line). For CI / scripted setups. |
--no-apply |
Bring stack up + install WP, skip apply. |
--reinstall-wp |
Drop existing WP install (default off). |
--service / --project |
Standard compose overrides. |
Config
New [init] section in frankenpress.toml (all optional):
[init]
site_title = "FrankenPress site"
admin_user = "admin"
admin_password = "admin"
admin_email = "admin@example.test"
disable_s3 = false # true to keep FP_S3_DISABLED=1 locallyTradeoff
Designer-mode S3 (FP_S3_DISABLED=0) means wp-admin's "Install plugin / theme from zip" buttons don't work — the s3:// stream wrapper doesn't support every ZipArchive op. Designers rarely need that path; if you do, set FP_S3_DISABLED=1 in .env and re-run fp init (operator-choice preservation makes this stick), or use composer require wpackagist-plugin/<slug> (the FrankenPress canonical install path).
Under the hood
docker.Runnergrows three methods:ComposeUp,ComposeBuild,ComposerInstall. Each has a recorded-call Fake for unit tests.apply.PickLatest()(shipped in v0.5.0) is reused for the snapshot pick —fp initandfp apply(no arg) share semantics so they can't drift.- New
internal/setup/package: pure file-IO helpers (ScaffoldEnvFromExample,EnsureEnvKey,ReadEnvKey) + the orchestrator. - 91 unit tests across 17 packages; vet + lint clean.
Upgrading
brew upgrade fp
fp version # → v0.6.0
fp init --helpDocs PR: frankenpress/docs#45. Full design rationale: workspace .aidocs/fp-init.md.