Skip to content

leonho/raycast-monorepo-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monorepo Scripts

A Raycast extension to browse and run scripts from monorepo workspaces. Stop hunting through dozens of package.json files—discover and execute any script from any workspace in seconds.

Features

  • Multi-workspace discovery — Automatically scans all workspaces in your monorepo (apps, packages, workers, etc.)
  • Multi-project support — Manage multiple monorepos and switch between them instantly
  • Package manager agnostic — Works with pnpm, npm, yarn, and bun with auto-detection
  • Recent scripts — Quick access to your frequently used scripts with timestamps
  • Terminal integration — Execute directly in Ghostty, iTerm, Terminal.app, or Warp
  • Smart caching — Fast startup with automatic cache invalidation when package.json files change

Installation

  1. Clone this repository
  2. Install dependencies:
    pnpm install
  3. Build and import into Raycast:
    pnpm run dev

Usage

Run Script

Open Raycast and search for "Run Script". You'll see all scripts organized by category:

  • root — Scripts from the root package.json
  • apps — Scripts from application workspaces
  • packages — Scripts from shared packages
  • workers — Scripts from worker packages

Actions:

  • Enter — Run script in terminal
  • Cmd+Shift+Enter — Copy command to clipboard
  • Cmd+R — Refresh workspace cache
  • Cmd+Shift+Delete — Clear recent scripts

Add Project

Search for "Add Project" to add a new monorepo. Select the root directory containing your package.json and optionally provide a custom display name.

Switch between projects using the dropdown in the search bar.

Configuration

Configure preferences in Raycast settings:

Preference Description Options
Package Manager Auto-detect or manually specify Auto, pnpm, npm, yarn, bun
Terminal App Where to execute scripts Ghostty, iTerm, Terminal, Warp
Show Root Scripts Include root package.json scripts true/false

Package Manager Detection

When set to "Auto", detection priority is based on lockfiles:

  1. bun.lockb → bun
  2. pnpm-lock.yaml → pnpm
  3. yarn.lock → yarn
  4. package-lock.json → npm

How It Works

The extension scans your monorepo structure by:

  1. pnpm: Reading pnpm-workspace.yaml for workspace patterns
  2. npm/yarn/bun: Reading the workspaces field in package.json

Scripts are extracted from each workspace's package.json and grouped by category (inferred from directory structure).

Caching

Workspace data is cached in Raycast's LocalStorage and automatically invalidated when:

  • package.json modification time changes
  • pnpm-workspace.yaml modification time changes (for pnpm)

Use Cmd+R to force a refresh.

Requirements

  • macOS
  • Raycast
  • A JavaScript/TypeScript monorepo with workspaces

License

MIT

About

Raycast extension to browse and run scripts from all workspaces in your monorepo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors