Contributing
Setup
bash
# Clone the repo
git clone https://github.com/shrijayan/itwillsync
cd itwillsync
# Use Node 22 (required for node-pty)
nvm use
# Install dependencies
pnpm install
# Run tests
pnpm test
# Build everything
pnpm build
# Test it
node packages/cli/dist/index.js -- bashBuild Order
The packages must build in this order:
bash
pnpm build
# Runs: web-client → hub → cliEach package embeds the previous one's output:
- CLI embeds web-client dist at
dist/web-client/ - CLI embeds hub dist at
dist/hub/
Testing
Tests use Vitest with global mode.
bash
pnpm test # All packages
pnpm --filter itwillsync test # CLI tests only
pnpm --filter @itwillsync/hub test # Hub tests onlyTest structure
packages/cli/src/__tests__/— CLI argument parsing, config, networking, Tailscalepackages/hub/src/__tests__/— Registry, auth, rate limiting, internal API, session management, preview collectorpackages/web-client/src/__tests__/— Notification system
Development Workflow
bash
# Start dev mode (watch all packages)
pnpm dev
# Start docs dev server
pnpm docs:dev
# Quick test after build
node packages/cli/dist/index.js -- bash
node packages/cli/dist/index.js hub infoKey Technical Notes
- node-pty: The
spawn-helperbinary needs execute permissions. This is handled automatically at PTY init time. - tsup config:
node-ptyandqrcode-terminalare external (native/legacy modules).wsis bundled. - Config location:
~/.itwillsync/config.json. Override withITWILLSYNC_CONFIG_DIRenv var.
Pull Request Process
- Fork the repo
- Create a feature branch
- Make your changes
- Run
pnpm test && pnpm buildto verify - Open a PR against
main