# Development & Testing
./scripts.sh build # Build the package
./scripts.sh test # Build + link + test in temp dir
# Version Management
./scripts.sh check # Check current version
# Publishing
./scripts.sh publish # Publish to npm (with checks)
./scripts.sh full # Interactive: version bump + publish
# Help
./scripts.sh help # Show all commandsYou can also use npm/bun scripts:
# Build
bun run build
npm run build
# Test locally
bun run test:local
npm run test:local
# Publish to npm
bun run publish:npm
npm run publish:npm
# Full release flow
bun run release
npm run release
# Link/unlink globally
bun run link
bun run unlinkBuilds the package:
- Cleans
dist/folder - Runs
bun buildto bundle TypeScript - Generates type declarations
Output: dist/index.js and .d.ts files
Full local testing:
- Builds the package
- Links globally (
bun link) - Creates temp directory
- Tests
cursorinstallation → verifies.cursor/commands/eai.md - Tests
antigravityinstallation → verifies.agent/workflows/eai.mdand.shared/eai-web/ - Cleans up temp directory
Safety: Tests in isolated temp directory, doesn't affect your projects
Shows current package version from package.json.
Reminder: Update version before publishing!
Safe publishing with checks:
- ✅ Verifies npm login
- ✅ Shows current version
- ✅ Asks for confirmation
- ✅ Builds package
- ✅ Runs tests
- ✅ Publishes to npm
Safety features:
- Won't publish if not logged in
- Won't publish without confirmation
- Runs full test suite before publishing
Interactive full release flow:
- Prompts for version bump type:
patch: 1.0.0 → 1.0.1 (bug fixes)minor: 1.0.0 → 1.1.0 (new features)major: 1.0.0 → 2.0.0 (breaking changes)skip: Don't bump version
- Updates version in
package.json - Runs publish flow (with all checks)
Recommended for releases
# Make changes to code
vim src/commands/init.ts
# Build and test
./scripts.sh test
# If tests pass, continue development
# If tests fail, fix and repeat# After fixing bugs and testing locally
./scripts.sh full
# Select: 1) patch
# Confirm publish
# ✨ Published!# After adding new features
./scripts.sh full
# Select: 2) minor
# Confirm publish
# ✨ Published!# Manually update version
npm version patch
# or
npm version minor
# or
npm version major
# Then publish
./scripts.sh publish- Verifies npm login
- Shows version for confirmation
- Requires user confirmation
- Runs full test suite
- Creates temporary directory
- Tests all AI assistant types
- Verifies file creation
- Cleans up after testing
- Exits on any error (
set -e) - Clear error messages
- Colored output for visibility
- 🔵 Blue (ℹ): Information
- 🟢 Green (✓): Success
- 🟡 Yellow (⚠): Warning
- 🔴 Red (✗): Error
- Bun: For building and linking
- Node.js: For npm operations
- npm account: For publishing
- tree (optional): For better test output
npm login
# Follow promptschmod +x ./scripts.sh# After running ./scripts.sh test, make sure to link:
bun link- Check if template files exist in
templates/latest/ - Verify file naming:
eai.cursor.md,eai.shared/, etc. - Review console output for specific errors
You can use these scripts in CI/CD pipelines:
name: Publish
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: ./scripts.sh build
- run: ./scripts.sh test
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}-
Always test locally before publishing
./scripts.sh test -
Use semantic versioning
- Patch: Bug fixes
- Minor: New features (backward compatible)
- Major: Breaking changes
-
Review changes before confirming publish
- Check
dist/output - Verify version number
- Review git changes
- Check
-
Keep changelog updated (optional but recommended)
- Document what changed
- Reference issues/PRs
- Help users understand updates
package.json- Package configuration and npm scriptsbunfig.toml- Bun configurationtsconfig.json- TypeScript configurationbin/cli.js- CLI entry point
Note: These scripts use Bun by default but work with npm as well. Adjust commands if using npm exclusively.