Skip to main content
SuperCmd provides utility functions and objects from @raycast/utils for common operations like clipboard access, storage, caching, and more.

Storage & Data

LocalStorage

LocalStorage

Persistent key-value storage scoped to your extension
Persistent storage scoped to your extension. API:
Example:
LocalStorage is automatically scoped to your extension. Each extension has its own isolated storage namespace.

Cache

Cache

In-memory cache with LRU eviction and capacity limits
In-memory cache with LRU (Least Recently Used) eviction. Constructor:
Example:

Clipboard

Clipboard

Read and write clipboard content
Read and write clipboard content, including text, HTML, and files. API:
Examples:

Icon & Avatar Utilities

getFavicon

getFavicon

Get favicon URL for a website
Get a favicon URL for a given website. Type Signature:
Example:

getAvatarIcon

getAvatarIcon

Generate SVG avatar from name initials
Generate an avatar icon from a name. Type Signature:
Example:
Avatar colors are deterministically generated from the name, so the same name always gets the same color.

getProgressIcon

getProgressIcon

Generate SVG circular progress indicator
Generate a circular progress indicator icon. Type Signature:
Example:

AppleScript & Shell

runAppleScript

runAppleScript

Execute AppleScript commands
Execute AppleScript commands and get the result. Type Signature:
Example:

executeSQL

executeSQL

Execute SQLite queries
Execute SQLite queries directly (non-hook version). Type Signature:
Example:

Caching & Performance

withCache

withCache

Wrap async functions with automatic caching
Cache async function results with TTL and validation. Type Signature:
Example:

Utilities

showFailureToast

showFailureToast

Show error toast with consistent formatting
Show a failure toast with consistent error formatting. Type Signature:
Example:

createDeeplink

Create deeplinks to extensions and commands
Create deeplink URIs for launching extensions or script commands. Type Signature:
Example:

Environment

environment

Access runtime environment information
The environment object provides information about the runtime environment. Properties:
Example:

AI

AI

Execute AI prompts programmatically
The AI object provides programmatic access to AI functionality. API:
Example:
AI availability can be checked with environment.canAccess(AI). Users must configure AI providers in SuperCmd settings.