Skip to content

Latest commit

 

History

History
81 lines (56 loc) · 2.22 KB

File metadata and controls

81 lines (56 loc) · 2.22 KB

AGENTS.md

Instructions for AI agents working on this repo.

Project structure

  • src/ — TypeScript source (CLI, SDK, lib)
  • dist/ — Compiled output (from npm run build)
  • website/ — Astro docs site, deployed to Cloudflare Workers
  • scripts/ — Build/release scripts
  • install.sh — Curl-based installer (users run this)

Building

npm run build        # tsc + copy assets (fonts, default-templates)
npm test             # run SDK tests

Releasing a new version

1. Bump version

Update version in package.json.

2. Build the tarball

bash scripts/build-tarball.sh

This 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).

3. Commit, push, and create a GitHub release

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/.

4. Deploy the website

cd website && npm run deploy

This runs astro build && wrangler deploy to Cloudflare Workers. Always deploy after updating any page in website/src/.

Install flow (for users)

Users install with:

curl -fsSL https://loopwind.dev/install.sh | bash

This:

  • 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/bin to PATH via shell profile
  • Requires Node.js 18+ (no npm needed)

Website

Key files

  • src/lib/resvg-init.ts — WASM loader. Path resolves from dist/lib/ up two levels to package root node_modules/.
  • src/cli.ts — CLI entry point
  • install.sh — Curl installer
  • scripts/build-tarball.sh — Tarball builder