Skip to main content
SuperCmd implements all Raycast hooks from both @raycast/api and @raycast/utils. All hooks are fully compatible with the Raycast API specification.

useNavigation

useNavigation

Navigate between views in your extension
The useNavigation hook provides methods to navigate between views.
(component: React.ReactElement) => void
Push a new view onto the navigation stack
() => void
Pop the current view from the navigation stack

Data Fetching

useFetch

useFetch

Fetch data from HTTP APIs with automatic state management
Fetch data from HTTP endpoints with built-in loading states, error handling, and pagination. Type Signature:
Example:

usePromise

usePromise

Execute async functions with state management
Execute asynchronous functions with automatic state tracking. Type Signature:
Example:

useCachedPromise

useCachedPromise

Execute async functions with caching and pagination
Like usePromise but with built-in caching and pagination support. Type Signature:

useCachedState

useCachedState

Persist state to local storage automatically
State hook that persists to LocalStorage automatically. Type Signature:
Example:

Form Management

useForm

useForm

Manage form state with validation
Manage form values, validation, and field props. Type Signature:
Example:

Shell & SQL

useExec

useExec

Execute shell commands with state tracking
Execute shell commands and track their output and state. Type Signature:
Example:

useSQL

useSQL

Query SQLite databases with state tracking
Query SQLite databases with automatic state management. Type Signature:

AI & Streaming

useAI

useAI

Execute AI prompts with streaming support
Execute AI prompts with automatic state tracking and streaming. Type Signature:
Example:

useStreamJSON

useStreamJSON

Fetch and stream JSON data with client-side pagination
Fetch JSON data with client-side filtering, transformation, and pagination. Type Signature:

Utilities

useLocalStorage

useLocalStorage

React hook for LocalStorage with change notifications
LocalStorage hook with automatic synchronization across extensions. Type Signature:

useFrecencySorting

useFrecencySorting

Sort items by frequency and recency
Sort items based on frequency and recency of access. Type Signature:
Example: