Instructions for AI agents working on this repo.
src/— TypeScript source (CLI, SDK, lib)dist/— Compiled output (fromnpm run build)website/— Astro docs site, deployed to Cloudflare Workersscripts/— Build/release scriptsinstall.sh— Curl-based installer (users run this)
npm run build # tsc + copy assets (fonts, default-templates)
npm test # run SDK testsUpdate version in package.json.
bash scripts/build-tarball.shThis produces loopwind-<os>-<arch>.tar.gz in the repo root. The tarball contains dist/, package.json, and prod-only node_modules/. Currently only builds for the current platform (e.g. darwin-arm64).
git add -A && git commit -m "v<version>"
git push origin main
gh release create v<version> ./loopwind-<os>-<arch>.tar.gz \
--title "v<version>" \
--notes "Release notes here"The tarball must be attached to the release — install.sh downloads from https://github.com/tomtev/loopwind/releases/latest/download/.
cd website && npm run deployThis runs astro build && wrangler deploy to Cloudflare Workers. Always deploy after updating any page in website/src/.
Users install with:
curl -fsSL https://loopwind.dev/install.sh | bashThis:
- Downloads the tarball for their OS/arch from the latest GitHub release
- Extracts to
~/.loopwind/ - Creates a wrapper script at
~/.loopwind/bin/loopwind - Adds
~/.loopwind/binto PATH via shell profile - Requires Node.js 18+ (no npm needed)
- Source:
website/src/pages/*.mdxandwebsite/src/components/*.astro - Layout/sidebar:
website/src/layouts/DocsLayout.astro - Deploy:
cd website && npm run deploy - URL: https://loopwind-docs.tommyvedvik.workers.dev
src/lib/resvg-init.ts— WASM loader. Path resolves fromdist/lib/up two levels to package rootnode_modules/.src/cli.ts— CLI entry pointinstall.sh— Curl installerscripts/build-tarball.sh— Tarball builder