Installation
Prerequisites and the commands that take a fresh clone to a running local app
Get Init running locally in a few minutes.
Prerequisites
- Node.js v24+ - Download Node.js
- pnpm v12 - Fast, disk space efficient package manager
- Git
- macOS on Apple silicon, or Linux - Local Postgres runs natively through the Supabase CLI (installed by
pnpm install). It needs macOS 14+ or glibc 2.35+; Intel Macs and Windows aren't supported - Rust - Only for the desktop app: install with rustup, which picks up the version
apps/desktop/rust-toolchain.tomlpins. Linux also needs WebKitGTK and the other Tauri prerequisites; macOS needs only the Xcode command line tools
Install pnpm
npm install -g pnpmOr the official installer:
curl -fsSL https://get.pnpm.io/install.sh | sh -Verify
node --version # v24+
pnpm --version # v12
git --version
cargo --version # desktop app only: rustup fetches the pinned version on first buildQuick Start
1. Clone the Repository
git clone https://github.com/kyh/init.git
cd init2. Install Dependencies
pnpm install3. Environment Setup
One .env file at the repo root drives everything:
cp .env.example .envFill in as needed:
POSTGRES_URL- leave it out for local dev:pnpm db:startwrites it into.env.local, which wins over.envBETTER_AUTH_SECRET- generate withopenssl rand -base64 32GITHUB_CLIENT_ID/GITHUB_CLIENT_SECRET- only for GitHub loginBLOB_READ_WRITE_TOKEN- only for avatar uploads (Vercel Blob). There's no local emulator, so leave it unset offline: the avatar route returns 501 with a pointer and the rest of the app is unaffected.
4. Database Setup
Start local Postgres and push the schema:
pnpm db:start # local Supabase; writes this checkout's POSTGRES_URL into .env.local
pnpm db:push # drizzle-kit pushThe first start downloads Postgres (~400 MB, cached after that). Every git branch gets its own database on its own port, so a new branch starts empty: run pnpm db:start && pnpm db:push there.
Using a hosted database instead? Create a Supabase project (or use any Postgres host), point POSTGRES_URL at it, and run pnpm db:push.
5. Trim the Starter (Optional)
pnpm bootstrap is the one-command alternative to steps 3–4: it writes .env, starts Postgres, pushes the schema, and seeds a dev user (dev@init.local / password), then ends with an interactive checklist — deselect mobile, extension, or desktop and it deletes them cleanly. Pass --yes to keep all apps and run unattended (how a coding agent provisions).
pnpm bootstrap # interactive
pnpm bootstrap --yes # headless: keep all apps, no prompts6. Start Development
pnpm dev # All apps
pnpm dev:web # Web only- Web app: http://localhost:3000
- Drizzle Studio:
pnpm -F db studio- browse the database
Project Structure Overview
init/
├── apps/
│ ├── web/ # Next.js web app (these docs live here)
│ ├── mobile/ # Expo mobile app
│ ├── extension/ # Chrome extension (WXT)
│ └── desktop/ # Tauri desktop app
├── packages/
│ ├── permissions/ # Client-safe auth helpers: role permissions, slugify
│ ├── contract/ # oRPC contract shared by server and clients
│ ├── service/ # oRPC implementation + better-auth
│ ├── db/ # Drizzle schema + local Supabase config
│ └── ui/ # Shared UI components
└── package.json # Root workspace scriptsAvailable Scripts
Development
pnpm dev- All appspnpm dev:web/pnpm dev:mobile/pnpm dev:extension- One apppnpm dev:desktop- The desktop shell, with the web app it opens
Database
pnpm db:start/pnpm db:stop- Local Postgres (Supabase CLI)pnpm db:push- Push schema to local databasepnpm db:seed- Seed a dev user + sample datapnpm db:push-remote- Push schema to productionpnpm db:reset- Reset local database, re-push, and re-seed
Code Quality
pnpm lint/pnpm lint:fix- oxlintpnpm format/pnpm format:fix- oxfmt, andcargo fmtfor the desktop apppnpm typecheck- TypeScript, and clippy for the desktop apppnpm test- node:test, andcargo testfor the desktop apppnpm verify- typecheck · lint · format · test (the CI gate)
Build
pnpm build- Build all packages (the desktop app's release binary included)pnpm -F @repo/desktop package- Bundle the desktop app (.appand.dmgon macOS)
Troubleshooting
Port already in use - Free port 3000. Postgres never clashes: the Supabase CLI gives each checkout and branch its own port and pnpm db:start writes it into .env.local.
pnpm install fails
pnpm store prune
pnpm installDatabase connection issues - Start this branch's database, which also points .env.local at it:
pnpm db:start
pnpm -F db status # what the CLI is running for this checkoutType errors
pnpm buildNext Steps
- Agent-Driven Development - provision, seed, and verify with a coding agent
- Local Development - the day-to-day human workflow