- Node.js >= 20
- git
- tmux
git clone https://github.com/2witstudios/ppg-cli.git
cd ppg-cli
npm installnpm run dev # Run CLI via tsx (unbundled, fast iteration)
npm run build # Build with tsup → dist/cli.js
npm test # Run tests with Vitest
npm run typecheck # Type-check with tsc --noEmit- TypeScript strict mode — ES2022, NodeNext module resolution, ESM-only
.jsextensions in imports — Required by NodeNext (e.g.,import { foo } from './bar.js')- Functional style — Pure functions, composition,
const, destructuring, no classes exceptPpgError - Dual output — Every command supports
--json. Useoutput()andoutputError()fromlib/output.ts - Manifest locking — Always use
updateManifest()for read-modify-write, never read + write separately - Colocated tests — Test files live next to source (e.g.,
src/core/manifest.test.ts) - Test naming —
describe('unitName')→test('given X, should Y')
src/
├── cli.ts # Entry point — registers commands
├── commands/ # Command implementations
├── core/ # Domain logic
├── lib/ # Utilities
└── types/ # Type definitions
Flow: cli.ts → commands/ → core/ → lib/ → types/
- Fork the repo and create a branch from
main - Make your changes
- Add/update tests for any new behavior
- Ensure
npm testandnpm run typecheckpass - Open a PR with a clear description of the change
By contributing, you agree that your contributions will be licensed under the MIT License.