Logo: Dev

Dev

OrganisatiounBeléift
slopus
dev

Guide fir déi lokal Entwécklung vum Happy-Monorepo. Erkläert, wéi Dir de CLI, Server, déi mobil App an d'Desktop-App (Tauri) lokal baut, installéiert, test a start. Benotzt dëse Skill, wann de Benotzer /dev tippt oder freet, wéi een eppes „baut“, „d'Entwécklung start“, „lokal installéiert“ oder „de ___-Package ausféiert“.

Iwwersiicht

Editeurslopus
Repositoryhappy
Skill-Nummdev
Stären
24.1K
Forks
2.1K
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    slopus huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Dev an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/slopus/happy/tree/main/.agents/skills/dev
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/slopus/happy.git /tmp/happy
mkdir -p .claude/skills
cp -r /tmp/happy/.agents/skills/dev .claude/skills/dev
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Dev an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Dev automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Dev net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

/dev - Local Development

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

First-time setup

bash
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:

bash
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:

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

Unit-only (fast, ~1 min):

bash
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)

happy reads HAPPY_HOME_DIR to override ~/.happy/. To run two versions side-by-side without touching your prod auth:

bash
HAPPY_HOME_DIR=~/.happy-dev happy daemon start
HAPPY_HOME_DIR=~/.happy-dev happy auth

Point at a local server the same way:

bash
HAPPY_SERVER_URL=http://localhost:3005 happy daemon start

happy-server

bash
pnpm --filter happy-server standalone:dev   # localhost:3005, embedded PGlite, no Docker

App auto-reloads on source changes. Point the CLI or the Expo app at it with HAPPY_SERVER_URL=http://localhost:3005 / EXPO_PUBLIC_HAPPY_SERVER_URL=....

happy-app (Expo)

bash
pnpm --filter happy-app start           # expo start (Metro bundler)
pnpm --filter happy-app ios:dev         # iOS simulator, development variant
pnpm --filter happy-app android:dev
pnpm --filter happy-app web             # web build, served locally
pnpm --filter happy-app tauri:dev       # macOS desktop app

Variants:

development    com.slopus.happy.dev       # hot reload, internal
preview        com.slopus.happy.preview   # OTA / beta testing
production     com.ex3ndr.happy           # App Store

Rebuild and reinstall the desktop .app

When the user asks to "rebuild the desktop app", "kill the running one and reinstall", or anything in that shape — do all four steps in order, do not stop after building.

Variants → product name → build script:

production    Happy.app           pnpm --filter happy-app tauri:build:production
preview       Happy (preview).app pnpm --filter happy-app tauri:build:preview
dev           Happy (dev).app     pnpm --filter happy-app tauri:build:dev

Build output for all variants:

packages/happy-app/src-tauri/target/release/bundle/macos/<ProductName>.app

If the variant is ambiguous, check what's running with ps aux | grep "/Applications/.*Happy" | grep -v grep and match. Production is the default.

Steps (substitute $NAME with the product name, e.g. Happy or Happy (dev)):

bash
# 1. build (slow: ~3–10 min, expo web export then cargo release build)
pnpm --filter happy-app tauri:build:production

# 2. quit the running app gracefully (no-op if not running)
osascript -e 'tell application "$NAME" to quit' || true

# 3. replace the installed bundle
rm -rf "/Applications/$NAME.app"
cp -R "packages/happy-app/src-tauri/target/release/bundle/macos/$NAME.app" /Applications/

# 4. relaunch
open -a "$NAME"

Notes:

  • Run the build in the background (run_in_background: true on Bash) and poll the output file. It prints Finished \release` profile` near the end.
  • osascript ... to quit is graceful — it gives the app a chance to flush state. Only fall back to pkill -f "/Applications/$NAME.app/Contents/MacOS/app" if the quit hangs.
  • Do NOT skip the rm -rf before cp — cp -R over an existing .app merges directories and leaves stale files.
  • If macOS Gatekeeper complains on relaunch, xattr -dr com.apple.quarantine "/Applications/$NAME.app" clears it. Local builds are unsigned.

happy-app-logs (remote log receiver)

bash
pnpm --filter happy-app-logs dev       # starts on http://0.0.0.0:8787

Receives POST requests to /logs from the mobile app's patched console (see consoleLogging.ts). Logs to stdout and ~/.happy/app-logs/<timestamp>.log.

To connect: set the log server URL in the app's dev settings to http://<LAN_IP>:8787. The app's consoleLogging.ts sends all console.log/warn/error to this endpoint when configured.

Console output must be enabled in the app (dev/preview variants default on, production defaults off, togglable from the dev settings screen).

Cross-cutting

  • Hoisted deps: pnpm hoists node_modules to the repo root. packages/*/node_modules/ is mostly empty. Node's resolution walks up, so imports work transparently.
  • Workspace deps: "@slopus/happy-wire": "workspace:*" resolves to packages/happy-wire/ — edits are picked up live.
  • $npm_execpath: legacy; happy-cli uses pnpm literally. Windows cmd.exe doesn't expand $VAR.
  • Build before tests: tests spawn the built CLI binary (for daemon integration), so pnpm test runs build first. Do not remove.

Releasing

Do not publish by hand. Use /release — it handles npm publish, git tags, GitHub releases, and the smoke check.

Troubleshooting

happy: command not found     → pnpm --filter happy cli:install
daemon won't start           → happy daemon stop; rm ~/.happy/daemon.state.json.lock; happy daemon start
wrong `happy` version        → which happy && ls -la $(which happy) — confirms where it resolves to
tools/unpacked missing       → pnpm install (postinstall re-extracts)
stale deps after branch swap → pnpm install (pnpm is picky about lockfile drift)

Rules

  • Never use npm install or yarn install — only pnpm.
  • Never add a dev / cli tsx-based script back to happy-cli. The build step is not optional — daemon spawns the built binary and would desync.
  • Never bring back release-it. Releases go through /release.
  • Never introduce ~/.happy-dev as a default. It exists as an opt-in via HAPPY_HOME_DIR, nothing more.

Heefeg gestallte Froen

Wat mécht de KI-Skill Dev?

Guide fir déi lokal Entwécklung vum Happy-Monorepo. Erkläert, wéi Dir de CLI, Server, déi mobil App an d'Desktop-App (Tauri) lokal baut, installéiert, test a start. Benotzt dëse Skill, wann de Benotzer /dev tippt oder freet, wéi een eppes „baut“, „d'Entwécklung start“, „lokal installéiert“ oder „de ___-Package ausféiert“.

Firwat Dev op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Dev besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Dev an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/slopus/happy/tree/main/.agents/skills/dev an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Dev benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Dev benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Dev domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Dev gratis?

Jo. slopus huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇