Skip to content

Scripts Package

The @repo/scripts package provides TypeScript-based utilities for CI/CD automation, local testing, and development workflows.

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

Validates packages across the monorepo with comprehensive checks.

Terminal window
bun run ci-validation [options]

Features:

  • TypeScript type checking
  • ESLint linting
  • Prettier formatting validation
  • Build verification
  • Respects ci-ignores.json configuration
  • Generates TODO lists for failed checks

Runs validation checks on changed files before push.

Terminal window
bun run pre-push-validation

Features:

  • Change detection based on git diff
  • Filtered validation of only changed workspaces
  • Prettier format checking
  • Quick feedback before pushing

Automates dependency updates across the workspace.

Terminal window
bun run update-dependencies [options]

Helper script for running GitHub Actions locally using act.

Terminal window
bun run act-test <command>

Commands:

  • list - List available workflows
  • ci - Run the main CI workflow
  • job <workflow> <job> - Run specific job
  • dry-run <workflow> - Perform dry run
  • setup - Setup secrets file

Examples:

Terminal window
bun run act-test list
bun run act-test ci
bun run act-test job ci typecheck
bun run act-test dry-run ci

Test specific components with act.

Terminal window
bun run act-component-test <command>

Commands:

  • list - List available components
  • test <component> <type> - Test specific component
  • test-all <type> - Test all components

Examples:

Terminal window
bun run act-component-test list
bun run act-component-test test apps/client build
bun run act-component-test test-all lint

Measures build and execution performance across packages.

Terminal window
bun run measure-speed [options]

Compares UI component implementations and provides analysis.

Terminal window
bun run compare-ui-components [options]

Git subtree management utilities.

Terminal window
# Located in packages/scripts/src/
./add-subtree.sh <remote> <prefix>
./pull-subtree.sh <prefix>

The package includes specialized scripts for the Spec Kit workflow under packages/scripts/src/spec-kit/:

ScriptPurpose
create-new-feature.shScaffolds feature directories and templates
get-feature-paths.shResolves canonical paths for artifacts
setup-plan.shPrepares context for plan generation
update-agent-context.shRefreshes derived context for agents
check-task-prerequisites.shValidates environment before task implementation
common.shShared utility functions

See the Spec Kit documentation for detailed usage.

Scripts respect the ci-ignores.json configuration for skipping validation on specific packages or check types.

Scripts are available as workspace binaries and can be called from any package:

{
"scripts": {
"test:local": "bun run act-test ci"
}
}
  • All scripts now use TypeScript for better type safety
  • Proper error handling and type definitions
  • Enhanced IDE support and refactoring capabilities
  • Commands now use bun run instead of pnpm exec
  • Improved execution performance
  • Better TypeScript support
  • 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
Terminal window
cd packages/scripts
bun run build
Terminal window
cd packages/scripts
bun run typecheck
Terminal window
cd packages/scripts
bun run lint

Ensure shell scripts are executable:

Terminal window
chmod +x packages/scripts/src/spec-kit/*.sh
chmod +x packages/scripts/src/*.sh

Install bun globally:

Terminal window
curl -fsSL https://bun.sh/install | bash

Install package dependencies:

Terminal window
cd packages/scripts
bun install