Scripts Package
The @repo/scripts package provides TypeScript-based utilities for CI/CD automation, local testing, and development workflows.
Package Overview
Section titled “Package Overview”Location: packages/scripts/
Language: TypeScript (migrated from JavaScript)
Execution: Runs with bun for better performance
CI Integration: Removed from ci-ignores.json and fully integrated into CI workflows
Available Scripts
Section titled “Available Scripts”CI/CD Scripts
Section titled “CI/CD Scripts”ci-validation
Section titled “ci-validation”Validates packages across the monorepo with comprehensive checks.
bun run ci-validation [options]Features:
- TypeScript type checking
- ESLint linting
- Prettier formatting validation
- Build verification
- Respects
ci-ignores.jsonconfiguration - Generates TODO lists for failed checks
pre-push-validation
Section titled “pre-push-validation”Runs validation checks on changed files before push.
bun run pre-push-validationFeatures:
- Change detection based on git diff
- Filtered validation of only changed workspaces
- Prettier format checking
- Quick feedback before pushing
update-dependencies
Section titled “update-dependencies”Automates dependency updates across the workspace.
bun run update-dependencies [options]Local Testing Scripts
Section titled “Local Testing Scripts”act-test
Section titled “act-test”Helper script for running GitHub Actions locally using act.
bun run act-test <command>Commands:
list- List available workflowsci- Run the main CI workflowjob <workflow> <job>- Run specific jobdry-run <workflow>- Perform dry runsetup- Setup secrets file
Examples:
bun run act-test listbun run act-test cibun run act-test job ci typecheckbun run act-test dry-run ciact-component-test
Section titled “act-component-test”Test specific components with act.
bun run act-component-test <command>Commands:
list- List available componentstest <component> <type>- Test specific componenttest-all <type>- Test all components
Examples:
bun run act-component-test listbun run act-component-test test apps/client buildbun run act-component-test test-all lintPerformance & Analysis
Section titled “Performance & Analysis”measure-speed
Section titled “measure-speed”Measures build and execution performance across packages.
bun run measure-speed [options]compare-ui-components
Section titled “compare-ui-components”Compares UI component implementations and provides analysis.
bun run compare-ui-components [options]Git Utilities
Section titled “Git Utilities”add-subtree / pull-subtree
Section titled “add-subtree / pull-subtree”Git subtree management utilities.
# Located in packages/scripts/src/./add-subtree.sh <remote> <prefix>./pull-subtree.sh <prefix>Spec Kit Scripts
Section titled “Spec Kit Scripts”The package includes specialized scripts for the Spec Kit workflow under packages/scripts/src/spec-kit/:
| Script | Purpose |
|---|---|
create-new-feature.sh | Scaffolds feature directories and templates |
get-feature-paths.sh | Resolves canonical paths for artifacts |
setup-plan.sh | Prepares context for plan generation |
update-agent-context.sh | Refreshes derived context for agents |
check-task-prerequisites.sh | Validates environment before task implementation |
common.sh | Shared utility functions |
See the Spec Kit documentation for detailed usage.
Configuration
Section titled “Configuration”CI Ignores
Section titled “CI Ignores”Scripts respect the ci-ignores.json configuration for skipping validation on specific packages or check types.
Package.json Integration
Section titled “Package.json Integration”Scripts are available as workspace binaries and can be called from any package:
{ "scripts": { "test:local": "bun run act-test ci" }}Migration Notes
Section titled “Migration Notes”From JavaScript to TypeScript
Section titled “From JavaScript to TypeScript”- All scripts now use TypeScript for better type safety
- Proper error handling and type definitions
- Enhanced IDE support and refactoring capabilities
From pnpm exec to bun
Section titled “From pnpm exec to bun”- Commands now use
bun runinstead ofpnpm exec - Improved execution performance
- Better TypeScript support
From Root to Package
Section titled “From Root to Package”- Scripts moved from repository root to dedicated
packages/scripts/package - Spec Kit scripts organized under
packages/scripts/src/spec-kit/ - Cleaner repository structure and better organization
Development
Section titled “Development”Building the Package
Section titled “Building the Package”cd packages/scriptsbun run buildType Checking
Section titled “Type Checking”cd packages/scriptsbun run typecheckLinting
Section titled “Linting”cd packages/scriptsbun run lintTroubleshooting
Section titled “Troubleshooting”Permission Issues
Section titled “Permission Issues”Ensure shell scripts are executable:
chmod +x packages/scripts/src/spec-kit/*.shchmod +x packages/scripts/src/*.shBun Not Found
Section titled “Bun Not Found”Install bun globally:
curl -fsSL https://bun.sh/install | bashMissing Dependencies
Section titled “Missing Dependencies”Install package dependencies:
cd packages/scriptsbun install