How Extensions Work
Extensions in SuperCmd are built on the same architecture as Raycast, ensuring complete compatibility:Extension Discovery
SuperCmd fetches the extension catalog from the Raycast Extensions GitHub repository using a sparse Git checkout strategy for fast catalog updates.
Installation
When you install an extension, SuperCmd:
- Downloads only the specific extension directory using Git sparse-checkout
- Copies it to
~/Library/Application Support/SuperCmd/extensions/ - Installs npm dependencies (excluding
@raycast/apiwhich is shimmed) - Pre-builds all commands using esbuild for instant execution
Command Bundling
Each extension command is bundled to CommonJS format with:
- React and React DOM kept external (shared with host app)
@raycast/apiand@raycast/utilsmarked as external (provided by SuperCmd’s compatibility shim)- Node.js built-ins and third-party dependencies handled appropriately
Extension Catalog Strategy
SuperCmd uses an efficient strategy to access the Raycast extension catalog:The catalog is cached locally for 24 hours to minimize network requests and improve performance.
Build Strategy
Extensions are pre-built at install time for instant execution:API Compatibility Layer
Thesrc/renderer/src/raycast-api/ directory provides a comprehensive compatibility shim:
Core Components
Full implementations of
List, Detail, Form, Grid, ActionPanel, and MenuBarExtra componentsHooks & Utilities
Complete support for
useNavigation, useFetch, useCachedPromise, usePromise, and all other Raycast hooksSystem Integration
Bridges for clipboard, localStorage, file system, AI, and other system operations via Electron IPC
Platform Features
Window management, AppleScript execution, application detection, and native macOS integration
Extension Context
Each extension runs with full access to the Raycast environment API:Dependency Management
SuperCmd intelligently handles extension dependencies:Platform Compatibility
Extensions can declare platform support in theirpackage.json:
Performance Optimizations
Pre-built Bundles
All commands are built at install time, not runtime, for instant execution
Sparse Checkout
Only downloads necessary files from the extension repository
Cached Catalog
Extension catalog is cached locally for 24 hours
Lazy Screenshots
Extension screenshots are fetched on-demand, not during catalog sync
Next Steps
Installing Extensions
Learn how to install and update extensions
Managing Extensions
Manage installed extensions and preferences
Compatibility
Check API compatibility status