Skip to Content
Development

Development

Requirements

  • macOS (Apple Silicon recommended)
  • Node.js 24
  • pnpm 10
  • Rust toolchain for crates/brewwery-core
  • Homebrew for live package data (app runs without it in demo mode)

Quick Start

# Install dependencies pnpm install # Start development mode pnpm dev # Build for production pnpm build

Build Commands

CommandDescription
pnpm devStart the Electron app in dev mode
pnpm buildBuild shared-types, Rust core, and desktop
pnpm build:coreBuild only the Rust native core
pnpm typecheckRun TypeScript checks across all packages
pnpm lintRun linting across all packages

Packaging Commands

CommandDescription
pnpm package:macBuild unsigned arm64 DMG + ZIP
pnpm package:mac:dirBuild .app without DMG
pnpm package:mac:zipBuild ZIP without DMG
pnpm package:mac:x64Build for Intel (requires x86_64 target)
pnpm package:mac:universalBuild universal binary
pnpm package:cleanClean packaging artifacts

Verification Commands

CommandDescription
pnpm release:verifyFull verification: typecheck, lint, Rust tests, build, package
pnpm beta:clean-installClean old app data for fresh testing

Building the Rust Core

pnpm --filter @brewwery/brewwery-core build

The Rust crate at crates/brewwery-core compiles to a Node.js native addon via napi-rs. It handles Homebrew detection, command execution, JSON parsing, and validation.

Workspace Structure

Brewwery uses pnpm workspaces:

packages: - "desktop" # Electron desktop app - "packages/*" # shared-types - "crates/*" # Rust napi-rs core

Package Names

PackageName
Desktop app@brewwery/desktop
Shared types@brewwery/shared-types
Rust core@brewwery/brewwery-core

Packaging & Distribution

Brewwery uses electron-builder with:

  • App name: Brewwery
  • Bundle identifier: com.brewwery.app
  • macOS category: public.app-category.utilities
  • Primary target: Apple Silicon arm64
  • Artifacts: unsigned .dmg and .zip

Local DMG Issues

Local DMG creation may fail with hdiutil create ... -fs APFS on some machines. Workarounds:

  1. Use pnpm package:mac:dir or pnpm package:mac:zip for local testing
  2. Let GitHub Actions build the DMG on a clean macOS runner

Development Notes

  • The desktop app runs without Homebrew and shows Homebrew-not-found states
  • Mutating Homebrew actions must remain allowlisted with explicit confirmation
  • Add shared data shapes to packages/shared-types before wiring new IPC
  • Keep UI changes consistent with the dark macOS utility aesthetic
  • Do not add telemetry, authentication, cloud sync, or monetization

Signing & Notarization

Current builds are unsigned and not notarized. Signed and notarized Apple Silicon builds are planned for v1.0. Until then, macOS Gatekeeper may warn when opening a downloaded build — right-click the app and choose Open to launch it.

Last updated on