Skills

Dev

Local development guide for the Happy monorepo.

Install

npx skills add slopus/happy --skill dev -g -a claude-code -y
Repository
slopus/happy24.4k
Category
Testing
Updated
3d ago
License
MIT
Context cost
Mediumabout 1,772 tokens
Runs scripts
No, instructions only

What it does

Local development guide for the Happy monorepo. How to build, install, test, and run the CLI, server, mobile app, and desktop (Tauri) locally. Use when the user types /dev, asks how to "build", "start dev", "install locally", or "run the ___ package".

/dev - Local Development

Happy is a pnpm monorepo. Everything uses pnpm workspaces, do not use npm or yarn directly.

First-time setup

pnpm install                       # installs deps for every package
pnpm --filter happy cli:install    # builds happy-cli + links it as the global `happy` binary

cli:install replaces whatever happy is on your PATH (npm-installed or not) with a symlink to packages/happy-cli/. Daemon is restarted as part of the script. Uses ~/.happy/, same as production.

To undo: npm unlink -g happy && npm i -g happy@latest.

Packages

packages/happy-cli     # the `happy` CLI and daemon, published to npm
packages/happy-server  # Node + Prisma server, deployed via TeamCity
packages/happy-app     # Expo app: iOS, Android, web, Tauri desktop
packages/happy-agent   # agent runtime
packages/happy-wire    # shared Zod schemas + wire types

happy-cli

packages/happy-cli
scripts in package.json:
  typecheck      # tsc --noEmit
  build          # rm -rf dist && tsc --noEmit && pkgroll
  test           # build + vitest run
  cli:install    # build + stop daemon + npm link + start daemon
  prepublishOnly # pnpm test (runs build inside test)
  postinstall    # unpacks difft + rg binaries into tools/unpacked/

Work loop:

pnpm --filter happy cli:install   # rebuild + relink + restart daemon
happy daemon status               # confirm your build is running
happy doctor                      # list all happy processes
tail -f ~/.happy/logs/$(ls -t ~/.happy/logs/ | head -1)

Run a single test file quickly:

pnpm --filter happy exec vitest run src/path/to/file.test.ts

Unit-only (fast, ~1 min):

pnpm --filter happy exec vitest run --project unit

Integration tests hit real APIs and are flaky, run on demand, never in the release gate.

Dev data sandbox (optional)

Read the whole SKILL.md on GitHub

More in Testing