Running twins locally
The first step before wiring your app: get a single twin running on your machine and confirm it’s reachable.
Pre-reqs
Section titled “Pre-reqs”wtCLI installed (see the wondertwin repo for install instructions)- You know which vendor you want to twin (e.g. Stripe, Plaid, PostHog)
- The vendor is in the twin catalog (or queued via Wishlist)
Spin one up
Section titled “Spin one up”# Initialize a new twin (downloads the vendor's twin package locally)npx wondertwin init stripe
# Start itwt up stripe
# Verify it's running and on what portwt statusExpected output:
1 twin running✓ Stripe twin v3.2 ready on localhost:4111 · drift-aligned · 0 errorsThe default port assignment is deterministic per vendor (Stripe → :4111, Plaid → :4112, etc.); wt status prints the actual port. Override with wt up stripe --port 5000 if you need a non-default.
Talk to it
Section titled “Talk to it”The twin speaks the real vendor’s API surface on the assigned port. Use the vendor’s SDK or curl exactly as you would against the real service — just change the base URL.
# Real Stripecurl https://api.stripe.com/v1/charges -u "$STRIPE_KEY:"
# Local Stripe twincurl http://localhost:4111/v1/charges -u "$STRIPE_KEY:"The next section (app-against-local-twins) covers the canonical pattern for doing this substitution in application code instead of curl.
Stop it
Section titled “Stop it”wt down stripe # one twinwt down --all # everything currently runningMultiple twins at once
Section titled “Multiple twins at once”wt up stripe plaid posthogwt statusEach twin runs in its own process; wt up is idempotent (calling it on an already-running twin is a no-op).
Where this fits in the diagram
Section titled “Where this fits in the diagram”This step covers the bottom-left of the substitution model: you’ve started a local twin (red layer) but your application is not yet talking to it. Step 2 wires that up.
TODO / coming later
Section titled “TODO / coming later”- Troubleshooting common startup failures (port conflicts, license-check errors, missing reference data)
wt logs <vendor>for tailing twin output- Persistence between
wt down/wt upcycles - Snapshotting / replay flags