Skip to content

Local Setup

Prerequisites

  • Node.js 18+
  • npm 9+ (ships with Node 18)
  • Git
  • AWS CLI v2 — for infrastructure deployment (infra/ stack)
  • Claude Code CLI — for template testing and worker development
  • qmd — for search testing (brew install tobi/tap/qmd)

Clone & Install

Terminal window
git clone https://github.com/indigoai-us/hq.git
cd hq
npm ci

npm ci installs all workspaces automatically via the root package.json workspaces config.

Build All Packages

Terminal window
npm run build

This runs npm run build --workspaces --if-present — builds create-hq, hq-cli, hq-cloud, web, and docs.

Build order matters: hq-cloud must build before hq-cli (dependency). npm workspaces handles this automatically.

Typecheck

Terminal window
npm run typecheck

Run Individual Packages

create-hq (test installer)

Terminal window
cd packages/create-hq
npm run build
node dist/index.js ~/test-hq

hq-cli (test CLI)

Terminal window
cd packages/hq-cli
npm run build
node dist/index.js modules list

hq-cloud (library — no standalone run)

Build only. Consumed by hq-cli.

PWA (dev server)

Terminal window
npm run dev --workspace apps/web
# Opens at http://localhost:5173

Requires API backend running (or use mock). Set environment variables:

  • VITE_API_URL — API Gateway endpoint
  • VITE_USER_POOL_ID — Cognito user pool ID
  • VITE_USER_POOL_CLIENT_ID — Cognito client ID

Docs (dev server)

Terminal window
npm run dev --workspace apps/docs
# Opens at http://localhost:4321

Environment Variables

VariablePackageDescription
VITE_API_URLapps/webAPI Gateway endpoint URL
VITE_USER_POOL_IDapps/webCognito User Pool ID
VITE_USER_POOL_CLIENT_IDapps/webCognito Client ID
AWS_PROFILEinfraAWS credentials profile
AWS_REGIONinfraAWS region (default: us-east-1)

Create .env files locally (they are gitignored).

Project Structure Reference

WorkspacePathPurposeDev CommandBuild Output
create-hqpackages/create-hqProject scaffolder / installerdist/
hq-clipackages/hq-cliCLI for modules, sync, clouddist/
hq-cloudpackages/hq-cloudCloud SDK (library)dist/
webapps/webPWA dashboardnpm run dev --workspace apps/webdist/
docsapps/docsDocumentation site (Starlight)npm run dev --workspace apps/docsdist/
infrainfra/AWS CDK infrastructurecdk.out/