ReadyNative

How setup works

What `bun run setup` copies, generates, patches, strips and finalizes - and the tree you end up with.

bun run setup runs once on a Starter or Pro tree. Here's what it does, step by step, and the tree it leaves behind. To run it, see Quickstart; for the flags, see Scripts.

The steps

For the selected option of every category, setup:

  1. Copies the module's files/** to the repo root byte-for-byte and deletes files owned only by non-selected modules (a file listed by several modules survives while one owner is selected).
  2. Generates src/ui/index.ts (re-exports the active UI adapter), src/providers.tsx (providers nested by order), src/lib/env.ts (zod-validated EXPO_PUBLIC_* keys), .env.example and .readynative.json (the applied selection plus the merged app patch, post-setup steps and doctor checks).
  3. Patches package.json (adds module dependencies, removes those that belong only to non-selected modules, merges scripts / overrides) and tsconfig.json (include entries), then runs your package manager's install and expo install for the packages that need SDK-matched versions.
  4. Strips the demo content so you start from a clean app: the weather demo (the Cities tab in src/app/(tabs)/cities/, src/screens/weather/, src/lib/weather/, src/stores/weather.ts and the useForecast hook), the example screens (src/app/examples/, src/screens/examples/ and the hook/store behind them), the UI catalog route and its Settings row, and the placeholder assets. The home screen becomes a plain welcome and the Weather tab turns back into Home. Pass --with-examples to keep all of it. What stays is everything the demo was built on - @/lib/location, @/lib/widgets, the offline cache in @/lib/cache, every locale and the native tab bar. bun run clean removes it later, but only while modules/ exists (--keep-modules); in a finalized tree, delete those files by hand.
  5. Removes the no-restricted-imports block from eslint.config.js (unless --keep-modules). It exists only so the shipped screens work on every UI stack; once your stack is fixed, you can import View / StyleSheet straight from react-native.
  6. Reconciles the tree with your package manager: the other package managers' lockfiles go (see Package managers).
  7. Finalizes the tree (unless --keep-modules): src/ui/<stack>/* moves to src/components/ui/*, every @/ui import becomes @/components/ui (and @/ui/contract → @/components/ui/types), the UiKit contract is dropped, and the product tooling leaves: modules/ is deleted, scripts/ keeps doctor, gen (the screen scaffolder), gen:theme, gen:links, gen:privacy, gen:assets, gen:graph and e2e, plus any script a module added; README.md / AGENTS.md are rewritten for your app. docs/ (the architecture graph) stays, and so does examples/ in the Pro repo - the example apps are standalone projects you keep or delete.
  8. Prints the post-setup steps of every selected module (dashboards to create, keys to paste) and a https://readynative.app/docs/?stack=… link that pre-filters these docs to your tree.

The tree you end up with

After a finalizing run:

src/
  app/            routes (expo-router)
  screens/        screen bodies
  components/
    ui/           the kit: box.tsx, button.tsx, list.tsx, …, index.ts, types.ts
  lib/            env, storage, i18n, auth/analytics/payments shims
  stores/  theme/  locales/
scripts/          doctor.ts, gen.ts, gen-*.ts, e2e.ts (+ lib/)
docs/             ARCHITECTURE.md, graph.json
examples/         Pro only: two standalone example apps
readynative.config.ts  app.config.ts  eas.json  .env.example  .readynative.json

No modules/, no src/ui, no contract to satisfy - a normal Expo Router app you edit like any other.

Finalizing is one-way

After a finalizing run, bun run setup is a one-line stub that prints "Already applied" and changes nothing. Switching an option then means a fresh clone of your tier repo - Can I change a module after setup? has the steps. To keep the tree switchable, run bun run setup --keep-modules instead.

With --keep-modules

Steps 1-4 and 8 run as above, step 6 only removes the other lockfiles, and steps 5 and 7 are skipped. modules/ stays, the kit stays in src/ui/<stack> behind @/ui and the UI contract, and scripts/ keeps setup, clean and gen module. Running setup again with a different selection re-resolves the plan, copies the new modules, removes the old ones' files and regenerates providers and env. The same selection twice produces no diff.

On this page

Get ReadyNative