Building a Relay Clip is a departure from traditional mobile development. Instead of building for a restricted mobile device, you are building for the Relay Shell.
Clips run locally and offline by default. They only use the network when you explicitly request "Pro" power from your Relay Helper.
- Frontend: A React-based UI that runs in the Relay Shell.
- Offline Runtime: Fast, local execution for basic tasks.
- Helper Bridge: Connection to your Mac/PC for Terminal, FS, and heavy CPU tasks.
The relay command is your primary tool for development and management.
| Command | Usage | Description |
|---|---|---|
relay create-app <name> |
relay create-app my-tool |
Scaffolds a new Clip project with the SDK. |
relay dev |
relay dev |
Starts a hot-reloading dev server for mobile testing. |
relay build |
relay build |
Compiles your app into a high-performance .rly bundle. |
relay install [file] |
relay install tools.rly |
Installs a bundle locally for testing. |
relay apps |
relay apps |
Lists all your installed Clips. |
relay uninstall <name> |
relay uninstall my-tool |
Removes a Clip from your local environment. |
relay status |
relay status |
Checks if the Helper server is currently running. |
relay start |
relay start |
Launches the Helper in daemon mode. |
relay stop |
relay stop |
Safely shuts down the Helper daemon. |
relay help |
relay help |
Displays all available commands and flags. |
relay create-app my-new-clipStart the dev server:
relay devOpen the Relay Shell on your phone. Your local app will automatically appear in the Developer Section for instant testing.
To use your Mac's power from your phone:
import { useTerminal } from '@relay/sdk';
const ShellAction = () => {
const { exec } = useTerminal();
const handleBuild = async () => {
// This runs on your MAC, not your phone!
const result = await exec('npm run production-build');
console.log(result.stdout);
};
}When ready, build your bundle:
relay buildNow you're ready to share it! See CONTRIBUTING.md to learn how to add your work to the official Clips Store.