#!/bin/bash # Rebuild library and copy to CLI assets # Used by Air for hot reloading when library changes set -e echo "🔄 Library changed, rebuilding..." # Build the library cd ../lib npm run build --silent # Copy to CLI assets echo "📁 Copying updated library to CLI assets..." cp dist/* ../insertr-cli/pkg/content/assets/ # Get library version for confirmation VERSION=$(node -e "console.log(require('./package.json').version)") echo "✅ Library v$VERSION ready for CLI embedding"