New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@ceraph/react-native-mcp

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

@ceraph/react-native-mcp

MCP server for React Native and Expo development

unpublished
Source
npmnpm
Version
0.9.3
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@ceraph/react-native-mcp

MCP server for React Native and Expo development. Your coding agent drives and tests your app with build error capture, console monitoring, reliable on-device interactions, and prebuild detection.

Works with any MCP client: Claude Code, Cursor, Codex, VS Code, Antigravity, and others.

⚠️ Ignore the npm i line above. Run this once instead:

npx @ceraph/react-native-mcp@latest init

Platform support

Ceraph supports React Native and Expo apps. iOS testing runs on macOS through Xcode and WebDriverAgent. Android testing runs on macOS, Windows, or Linux through ADB and UiAutomator2.

Target / hostStatusNotes
iOS device (USB)SupportedmacOS only. WebDriverAgent installs through Xcode once, then Ceraph manages subsequent starts.
iOS SimulatorSupportedmacOS only. Windowed and headless targets are supported; Ceraph builds and launches simulator WDA automatically.
Android device (USB)SupportedmacOS, Windows, or Linux. Enable USB debugging and authorize the host when prompted.
Android EmulatorSupportedmacOS, Windows, or Linux. Windowed and no-window modes are supported; Ceraph manages Appium/UiAutomator2.
Expo GoNot supportedUse an Expo dev client or prebuilt app so Ceraph's development shim and native integration are present.

Choosing a platform and target

On macOS, an otherwise ambiguous auto request defaults to iOS. On Windows and Linux it defaults to Android. An active automation session stays selected. With --device, Ceraph selects the platform automatically when exactly one USB device is connected. When multiple devices are connected, pass the exact Apple UDID/CoreDevice identifier or Android adb serial; the identifier also identifies the platform. Exact identifiers remain USB-only unless you also pass --wifi.

ceraph start [--ios|--android] [--device [id] [--wifi] | --simulator | --headless | --emulator | --no-window]
PlatformPhysical deviceWindowed virtual runtimeBackground virtual runtime
iOS--device--simulator--headless
Android--device--emulator--no-window

The platform flag is usually unnecessary because physical devices have unique identifiers and virtual-runtime targets imply their platform. For the ordinary single-device setup, run ceraph start --device. Add an exact Apple UDID or Android adb serial when you need to choose among multiple USB-connected devices. To target a specific paired device over Wi-Fi, run ceraph start --device <UDID-or-adb-serial> --wifi. Run ceraph start --no-wifi to revoke this project's prior Wi-Fi device approval.

The rn_target_status tool reports the active platform, exact runtime, target presentation, and automation readiness.

Requirements

  • Node.js 20.19+, 22.12+, or 24+
  • Expo dev client or prebuilt app (Expo Go is not supported)
  • For iOS: macOS with Xcode 14+ and either an iOS 16+ USB device or a booted Simulator. See iOS setup.
  • For Android: the Android SDK/JDK used by your project, with adb available, and either an authorized USB device or a booted Android Emulator. See Android setup.

Multiple agents: One running app instance has one active Ceraph driver. Simultaneous contenders are arbitrated so they receive a busy result instead of fighting over the same device or simulator.

Environment variables

Most users should leave these unset. Use them for a persistent runtime preference or when Ceraph's remediation asks for an explicit override.

VariableDefaultPurpose
CERAPH_SIGNAL_HOSTauto-detectedTroubleshooting only: override the host address when the selected device cannot reach the address Ceraph detected.
CERAPH_SIGNAL_PORT8101Troubleshooting only: change the host listener port when 8101 is already in use.
CERAPH_TARGETautoPersistent target: device, simulator, headless, emulator, no-window, or auto.
CERAPH_FAST_RELOADtrueSet to false or 0 to disable Fast Reload for the host session.
CERAPH_WINDOW_FOCUStrueSet to false or 0 to prevent Ceraph from bringing Simulator.app to the foreground.
CERAPH_TELEMETRYenabledSet to 0 to disable installation analytics.
CERAPH_CAMERA_TEST_MEDIAplatform defaulton uses registered test media while connected; off uses the real camera; auto uses test media on simulators/emulators and the real camera on physical devices. Production always uses the real camera.
CERAPH_KEEP_AWAKE_HEARTBEATenabledSet to off to disable keep-awake protection for the host session. The ordinary wake/unlock check still runs.

iOS setup

iOS testing requires macOS, Xcode 14+, and iOS 16 or later.

Physical device

Connect and unlock the device over USB, trust the Mac when prompted, and enable Developer Mode. Start the sole connected device with ceraph start --device. When multiple devices are connected, select it with ceraph start --device <UDID-or-CoreDevice-ID>.

WebDriverAgent installs through Xcode once. Ceraph then manages subsequent starts, including the USB connection to WDA, and routes supported interaction and lifecycle tools to the selected device. If the Mac needs an additional dependency, ceraph doctor provides the exact installation step.

Simulator

The Simulator has two presentation modes:

  • ceraph start --simulator opens a windowed Simulator for visible testing.
  • ceraph start --headless runs without Simulator.app for CI, cloud Macs, and background agent verification. Screenshots, recordings, snapshots, and WDA remain available; host audio is not disabled.

Ceraph automatically installs the optional appium-webdriveragent package the first time it targets a Simulator, then builds and launches WDA. The first build usually takes about a minute; later runs reuse it. Device-only setups do not install this dependency.

You can let Ceraph boot a Simulator or boot one yourself:

open -a Simulator
# or: xcrun simctl boot <UDID>

Use xcrun simctl list devices booted to see booted Simulators. Call rn_wda_stop to stop WDA, or exit the MCP server to stop its managed process.

To make headless mode the default for the current environment:

export CERAPH_TARGET=headless

An explicit target still overrides that preference for one run. The standalone rn_build_ios primitive supports headless builds only when you deliberately opt into its unmanaged mode.

Physical device and Simulator connected: An active Simulator automation session remains selected even when a phone is connected. Run ceraph start --device to select the phone instead. Before a Simulator session exists, automatic selection uses a USB-connected iPhone; a Wi-Fi-only iPhone is never selected automatically. Target one explicitly with ceraph start --device <UDID-or-CoreDevice-ID> --wifi.

Android setup

Install Android Studio and use its SDK Manager to install Platform-Tools and the SDK components required by your React Native project. Ensure adb is available on your PATH, then confirm that it can see the intended runtime:

adb devices -l

Physical device

Enable Developer options and USB debugging, connect and unlock the phone over USB, and accept the host authorization prompt. Start the sole connected device with ceraph start --device. When multiple devices are connected, select the phone with ceraph start --device <adb-serial>.

Emulator

The Android Emulator has two presentation modes:

  • ceraph start --emulator selects or launches a windowed AVD.
  • ceraph start --no-window runs an AVD without a window or host audio for CI and background testing.

Use --avd <name> when more than one AVD is installed. Use --variant <name> when the project has multiple debuggable build variants.

Ceraph manages build and installation, automation, app launch, wake and unlock verification, and Expo dev-client routing for both Android targets.

Physical device and Emulator connected: An active Emulator automation session remains selected even when a phone is connected. Run ceraph start --device to select the phone instead. Before an Emulator session exists, automatic selection uses a USB-connected Android phone; a Wi-Fi-only phone is never selected automatically. Target one explicitly with ceraph start --device <adb-serial> --wifi.

Quick start

Run one command from your project root:

npx @ceraph/react-native-mcp@latest init

init automatically:

  • Configures supported MCP clients and runtime-error delivery
  • Integrates with Expo Router and Metro while preserving existing project customizations
  • Keeps generated local state out of version control
  • Signs you in through browser OAuth when you choose Pro; Starter requires no account
  • Makes the ceraph command and supported user-level MCP integrations available; use --no-global to keep this init project-scoped
  • In interactive Git projects, offers to commit portable team setup; it never commits for agents, CI, or other non-interactive runs

init configures the project but does not start a runtime. Your coding agent can call ceraph_start itself. To prime a physical device or start Ceraph manually:

ceraph start

(No ceraph on your PATH — a permissions-restricted machine, --no-global, or a non-interactive init? Use npx @ceraph/react-native-mcp@latest start instead.)

start picks a platform and target automatically using the host defaults above. See Choosing a platform and target to select a different runtime or an exact device.

Using Ceraph in another project

User-level integrations make Ceraph available when you open another project in a supported coding client. When you request React Native testing, the agent can use Ceraph to complete missing project setup. Merely loading its tools does not install packages or start an app. Ambiguous workspace choices still need to be resolved before setup can proceed.

Portable project configuration remains available for collaborators. Their agent can offer user-level registration when they first use Ceraph; they do not need to know to run init themselves. To switch your machine to project-only discovery:

ceraph uninstall --global

Run ceraph init to enable user-level discovery again, then restart affected coding clients. init --global is the same as ordinary init: it also configures the current React Native project when one is detected. Outside a React Native project, interactive init completes machine setup without changing project files. uninstall --global only removes owned user-level MCP entries; it preserves project setup, the CLI, and sign-in. Custom entries are reported for manual review. init --no-global skips global setup for that invocation; it does not remove an existing user-level integration.

Diagnostics

ceraph start runs the same health checks automatically after bring-up. To inspect project and runtime readiness without building the app or starting Metro, run:

ceraph doctor

Doctor accepts the same target flags as start. Use ceraph doctor --json for automation or a GitHub issue, and ceraph doctor --help for the full command reference.

Account

Sign in or switch the Ceraph account used by every project on this machine:

ceraph login

Sign out without changing any project setup, hooks, fixtures, or preferences:

ceraph logout

Both commands use a machine-wide credential. Logout affects only this machine; it does not sign you out of the Ceraph website or other computers. Pro supports three recently used development installations per account. Sign-ins expire after 30 days without Ceraph use, automatically freeing their slots. If all three are active, sign-in asks which one to sign out; it never removes another installation automatically. Projects, agents, and test devices do not count separately; separate OS profiles, VMs, and WSL installations can.

If the global ceraph command is not installed, use npx @ceraph/react-native-mcp@latest login or npx @ceraph/react-native-mcp@latest logout.

Preferences and updates

Machine preferences apply across projects. Use ceraph start --no-focus to skip Ceraph's Simulator/emulator window activation for one bring-up, or CERAPH_WINDOW_FOCUS=false for the process. The app still opens inside its runtime; physical-device keep-awake is unaffected. Use ceraph start --focus to request window activation for one start, overriding a saved windowFocus: false preference. Omitting both flags follows the configured preference, which defaults to focus enabled. CERAPH_WINDOW_FOCUS=false still prevents activation when --focus is supplied. Neither flag changes the saved preference or opens a window for headless or no-window targets. --focus and --no-focus cannot be combined. Environment overrides are listed above.

ceraph update

Updates ask first by default. Your agent can offer to remember automatic updates; granting or revoking that permission does not require another full init. For manual access, settings are stored in ~/.ceraph/preferences.json under its versioned values object; preserve the other entries when editing it. Updates preserve existing project choices and do not sign in, open pricing, or commit changes. If an update is interrupted, follow its recovery instructions before resuming testing. A required-version notice does not grant installation permission. Some updates change the available tools and require restarting your coding client.

CLI reference

Run ceraph help (or ceraph --help) for commands and setup options. Use ceraph start --help, ceraph doctor --help, ceraph update --help, ceraph analytics --help, or ceraph uninstall --help for command-specific help.

Start

ceraph start [flags] brings the app up and reports whether it is ready.

OptionPurpose
--simulatorUse a visible iOS Simulator.
--headlessUse an iOS simulator without opening Simulator.app.
--emulatorUse a windowed Android emulator.
--no-windowUse an Android emulator without a window or host audio.
--device [id]Use the sole USB device, or select an exact physical device identifier.
--wifiAllow the exact device selected by --device <id> to connect over Wi-Fi.
--no-wifiRevoke this project's prior Wi-Fi device approval.
--target <type>Select auto, device, simulator, headless, emulator, or no-window; also accepts --target=<type>.
--ios, --android, --platform <name>Select a platform when it cannot be inferred; also accepts --platform=<name>.
--avd <name>Select an exact Android Virtual Device; implies an Android emulator.
--variant <name>Select an exact debuggable Android Gradle variant.
--focusRequest window activation for this start, overriding the saved focus preference. Environment restrictions still apply.
--no-focusSkip window activation for this start. Cannot be combined with --focus.
--yes, -yNever prompt or wait; print any required device action and exit.
--help, -hShow start help.

Doctor

ceraph doctor [flags] diagnoses project and runtime readiness without building the app or starting Metro.

OptionPurpose
--simulator, --headless, --emulator, --no-window, --deviceSelect the runtime kind to check.
--target <type>Select auto or one of the runtime kinds above; also accepts --target=<type>.
--ios, --androidSelect a platform when the target does not imply one.
--device-id <id>Pin an exact physical device, simulator, or emulator.
--bundle-id <id>Override the app identifier detected from the project.
--required-env <name>Require a non-empty environment variable; repeat for multiple names.
--expected-network <name>Check the expected Wi-Fi network.
--jsonPrint the complete structured diagnostic result.
--help, -hShow doctor help.

For example, ceraph doctor --device --device-id <id> checks an exact phone.

Setup and maintenance

Command / optionPurpose
ceraph init --tier <plan>Preselect starter or pro.
ceraph init --yes / -yUse non-interactive defaults; selects Starter unless --tier is supplied.
ceraph init --globalSet up user-level access and the current project when detected; this is the default.
ceraph init --no-globalKeep this init project-scoped, preserving existing global entries.
ceraph init --agentLet an agent drive setup with a structured camera-setup handoff.
ceraph init --help / -hShow setup help.
ceraph login / ceraph logoutSign in, switch accounts, or sign out on this machine.
ceraph updateUpdate the package and existing setup.
ceraph update --resumeResume an interrupted update's recorded release.
ceraph analytics on / offEnable or disable future analytics collection on this machine.

See Uninstalling Ceraph for removal options.

Installation analytics

Ceraph sends a minimal daily installation sample: a random installation ID, running and installed versions, host OS, and whether setup and bring-up have succeeded. Samples can be associated with your account when signed in. No project names, paths, code, tool history, device identifiers, or test evidence are included. CI and explicitly marked internal runs are excluded. Successful explicit project uninstalls are counted separately; removing one project does not mean someone stopped using Ceraph. Direct package-manager removals and deleted folders are not observable.

ceraph analytics off
ceraph analytics on

These commands persist the preference for this machine. For a single process, CERAPH_TELEMETRY=0 or DO_NOT_TRACK=1 disables collection without changing that preference. See the Privacy Policy for retention, deletion, and website analytics choices.

Uninstalling Ceraph

npx @ceraph/react-native-mcp uninstall

It reverses the current project's Ceraph setup and reports a per-step status, while preserving camera fixtures and the machine-wide sign-in. Use ceraph logout separately to sign out. Only @ceraph/react-native-mcp is removed from package.json.

User-level discovery is preserved. Use ceraph uninstall --global separately if you also want to remove Ceraph-managed user-level registrations.

Flags

FlagEffect
-y, --yesSkip confirmation prompts.
--purge-dataAlso delete Ceraph run data, generated local state, and this project's external build cache at ~/.ceraph/derived/<project>. Agent hooks and camera fixtures are preserved.
--dry-runPreview the step list without writing anything.
--project-dir <path>Operate against a specific subpackage. Required when a monorepo has more than one React Native app.
--globalRemove only user-level MCP registrations; use this flag by itself. Project setup, CLI installation, and sign-in are preserved.
--help, -hShow uninstall help.

Not auto-reverted

A few mutations are hand-edits the uninstaller can't safely make for you. Each surfaces as a manual step with the exact lines to remove:

  • Bare React Native Info.plist local-network and scheme entries, plus the AndroidManifest.xml scheme entry.
  • Expo dynamic config (app.config.js / app.config.ts) — the file path and scheme value to remove.
  • useEffect that contains installCeraph() alongside your own statements — the file and line to edit.

Keep-awake protection

During physical-device testing, ceraph start keeps the device awake through build, installation, launch, bundle loading, and runtime errors. Ceraph restores temporary device settings after the final session exits and never relies on periodic gestures. Expo and bare React Native are supported.

After installing or updating Ceraph, run ceraph init and rebuild the app once so the bundled development module is linked. ceraph start performs the native build during normal bring-up. On iPhone, allow the app's Local Network request so its development shim can reach Ceraph on your computer.

Set CERAPH_KEEP_AWAKE_HEARTBEAT=off to opt out of Ceraph-managed persistent keep-awake protection for one host session. The ordinary wake/unlock readiness check still runs, and the device may auto-lock after this explicit opt-out.

To opt a project out persistently, configure the installed development shim:

installCeraph({ keepAwake: false });

Keep-awake is on by default. Either the project option or the session environment variable can turn it off; a session cannot override a project's explicit keepAwake: false setting.

Fast Reload

Fast Reload reconnects development builds after Metro restarts, network changes, or the host resumes from sleep. It is enabled by default.

Turning it off

Two equivalent ways:

# Environment variable
CERAPH_FAST_RELOAD=false   # or 0
// In your installCeraph call
installCeraph({ fastReload: false });

What it does and doesn't do

Fast Reload reconnects the JavaScript bundle; it does not apply native or app configuration changes. Those still require a rebuild. Reloading also remounts the app, so in-memory component state is lost.

Other MCP clients

ceraph init configures the supported client integrations automatically. Use the instructions below only for clients Ceraph does not yet configure.

Cline / Roo Code (VS Code extensions)

Open VS Code Settings → Extensions → Cline (or Roo Code) → MCP Servers, then add:

{
  "react-native-mcp": {
    "command": "npx",
    "args": ["-y", "@ceraph/react-native-mcp@latest"]
  }
}

JetBrains IDEs

Settings → Tools → MCP Servers → Add, then enter:

  • Name: react-native-mcp
  • Command: npx
  • Args: -y @ceraph/react-native-mcp@latest

Tools

Setup and preferences

ToolDescription
ceraph_initComplete project setup, preserving existing choices and returning required decisions.
ceraph_init_statusInspect project setup without starting an app.
ceraph_report_issuePrepare a sanitized public defect report and submit only with per-report or account-bound lasting authorization.

Build & Runtime

ToolDescription
ceraph_startCall this first. Bring the selected runtime to a ready-to-test state. Runs only what is missing and returns remediation for the first failed check.
ceraph_doctorDiagnose project and runtime readiness without starting a test session. Returns structured failures with remediation.
rn_build_iosAdvanced unmanaged iOS build diagnostic. Prefer ceraph_start, or app_launch({ rebuild: true }) when automation is not needed.
rn_build_androidAdvanced unmanaged Android build diagnostic. Prefer ceraph_start, or app_launch({ rebuild: true }) when automation is not needed.
rn_metro_startStart or reuse Metro and capture console output.
rn_get_errorsReturn captured build and runtime errors.
rn_get_consoleReturn recent Metro console output, filtered by level.
rn_check_prebuildReport whether an Expo native project needs a clean prebuild and why.
rn_stopStop processes managed by Ceraph for the current project.

Target & platform drivers

ToolDescription
rn_target_statusReport the active platform, exact runtime, presentation mode, and automation readiness.
rn_wda_startAdvanced: start or reuse automation for a booted iOS Simulator. Normal testing should begin with ceraph_start.
rn_wda_stopStop the iOS Simulator automation session started by rn_wda_start.

Screen Interaction

ToolDescription
ceraph_snapshotStructured accessibility-tree snapshot of the current screen. Pass includeStyles: true after visual changes to include bounded render-time styles for uniquely matched visible elements, plus honest style-coverage metadata.
ceraph_run_hookRun a project-owned command inside the live app when authentication, gated state, a development-only blocker, or cleanup would otherwise prevent meaningful testing.
ceraph_record_runReplay an already-verified path without model pauses and produce a clean MP4 with structured UI snapshots and screenshots tracing the verified flow.
screen_tapTap by snapshot ref, bounds, or coordinates. Prefer a stable ref; screenshot-derived coordinates are best-effort.
screen_tap_and_verifyFind an element by text/label/type, tap its center, and assert a required follow-up selector is on screen. Use screen_tap when no postcondition is needed.
screen_tap_chainTap a sequence of elements as one compound action; sends nothing if any target cannot be resolved.
screen_type_into_fieldFocus an input and type into it. Set clearFirst: true to clear the field first.
screen_swipeSwipe up/down/left/right. Defaults to a 60%-of-axis swipe from screen center.
screen_scroll_toRepeatedly swipe until a matching element is on screen (no tap).
screen_long_pressLong-press a matched element for a configurable duration.
screen_press_keyPress a hardware/system button: back, home, volumeUp, volumeDown, lock.
screen_open_urlOpen a URL / deep link (e.g. myapp://product/42) to jump straight to a screen — useful for testing your app's deep-link routes.
screen_screenshotCapture a pixel screenshot of the current screen (a viewable image block) — for confirming actual rendered appearance. For structured screen data (elements, roles, bounds, refs to act on) use ceraph_snapshot.
screen_wait_forPoll until an element is on screen (or no longer on screen). Pass timeoutMs: 0 for a one-shot check.

App Lifecycle & Device

ToolDescription
app_launchOpen or relaunch an installed app. For the project app, Ceraph also makes its Metro bundle ready without starting automation; pass rebuild: true to rebuild and install it first.
app_terminateTerminate an app by its iOS bundle ID or Android package ID.
app_activateBring an app to the foreground without a cold restart.
app_list_installedList installed apps on the selected runtime.
app_infoReport the foreground app's identity and name. Android also reports its activity.
rn_reloadReload the app's JS bundle, wait for it to come back, then capture a screenshot. Requires installCeraph active in the app; dev-only.
device_ensure_awakeEnsure the device is awake and unlocked. Returns structured remediation when locked.
device_set_orientationRequest portrait or landscape and verify the rotation reached both the device and foreground app.
ceraph_add_mediaAdd an image or video to the selected runtime's system photo library so the agent can test the app's real native media picker. Supports iOS simulators plus Android emulators and devices.

Driving the app

Ceraph provides two building blocks for reliable app driving:

  • ceraph_snapshot returns structured screen elements, roles, values, bounds, and stable refs. Call it before acting and again after each action.
  • The screen_* and app_* tools act on those refs, navigate, type, capture screenshots, and manage the app on the selected runtime.

The loop is ceraph_start → ceraph_snapshot → act → snapshot again. Check rn_get_errors and rn_get_console between steps. Once a path works, ceraph_record_run can replay it into an MP4 and ordered state trace for review. For a settled static change, use screen_screenshot plus ceraph_snapshot instead.

License notice: The Ceraph Software License Agreement strictly prohibits using Ceraph software, documentation, machine-readable tool descriptions, or other technical materials as a blueprint to reproduce, emulate, reimplement, or otherwise create Ceraph features for any purpose, including personal or internal use. Read the full agreement.

Media picker testing

Call ceraph_add_media before opening a native image or video picker when the selected runtime needs something to choose. Ceraph adds the supplied media to the runtime's system photo library; the agent then opens and drives the app's real picker UI as part of the end-to-end flow.

The tool accepts JPEG, PNG, WebP, and HEIC images up to 5 MB, plus MP4, MOV, and M4V videos up to 25 MB. It supports iOS Simulators and Android emulators or devices. Physical iPhones cannot be seeded through this interface, so Ceraph returns targeted remediation. Added media remains until it is deleted; erasing a simulator or emulator also removes its media.

Camera testing

Ceraph makes camera-dependent flows deterministic in development builds. Each <CeraphCamera mediaKey> can return a configured image from takePictureAsync and a configured video from recordAsync, while production builds continue to use the real camera.

Setup

Run ceraph init; it configures the development integration and offers to replace detected Expo CameraView components. Assign a descriptive key to each camera scenario:

import { CeraphCamera } from "@ceraph/react-native-mcp/shim";

export function ScanProfileScreen() {
  return <CeraphCamera mediaKey="profile" style={{ flex: 1 }} facing="front" ref={cameraRef} />;
}

CeraphCamera accepts the same camera props used by Expo Camera. The same mediaKey can select both an image and a video for a screen that supports both capture modes.

Ask the agent to add fixtures with ceraph_add_camera_image or ceraph_add_camera_video. Images support JPEG, PNG, WebP, and HEIC up to 5 MB; videos support MP4, MOV, and M4V up to 25 MB. Set overwrite: true when replacing an existing key.

For manual fixture management, use lowercase, hyphenated filenames whose stem matches mediaKey:

.ceraph/camera-images/profile.jpg
.ceraph/camera-videos/treadmill.mp4

Run ceraph doctor after adding files manually so they are ready for the next development bundle.

Your agent can switch a running development app between registered test media and the real camera with ceraph_set_camera_test_media, without rebuilding. The choice stays enabled between actions while connected. Physical devices use the real camera by default; simulators and emulators default to test media. Set CERAPH_CAMERA_TEST_MEDIA=on, off, or auto for a process override, or ask your agent to save the cameraTestMedia preference. These choices never enable fixtures in production builds.

Production safety

Camera fixtures and test behavior are development-only. Production builds use the real camera and exclude configured test media.

Hooks

A hook is a project-owned command that Ceraph can run inside the live development app. It can use the app's own state, navigation, auth, feature-flag, and API modules. The agent invokes a hook explicitly with ceraph_run_hook.

Safety: Hooks use your app's services, so a development build can still affect a production backend. Use disposable, non-production data, keep credentials in your existing secret configuration, and prefer idempotent (safe-to-repeat), runId-scoped effects. Clean up afterward.

Create a hook in .ceraph/hooks/, one file per route, named *.hook.ts or *.hook.js. It exports the route it fires on and a run function, and may import your app's own modules:

// .ceraph/hooks/paywall.hook.ts
import { grantTestEntitlement } from "../../src/services/devTesting";
import { getCurrentPath } from "../../src/navigation";

export const route = "/paywall";
export const description = "Grant disposable premium access for this test run";
export const isAvailable = () => getCurrentPath() === "/paywall";

export async function run(ctx) {
  await grantTestEntitlement({ runId: ctx.runId });
  return { ok: true };
}

Restart Metro after adding or removing a hook. Available routes and descriptions appear in ceraph_snapshot.meta.availableHooks; invoke one with ceraph_run_hook({ route: "/paywall" }).

isAvailable controls discovery, not authorization. Every registered route can still be invoked directly, so hooks must enforce any required checks themselves.

The run(ctx) contract

run may be synchronous or asynchronous and returns { ok, error? }:

ctx field
ctx.routeThe registered hook route the agent chose to invoke.
ctx.runIdStable identifier of the current run.

Return { ok: true } once setup is complete, or { ok: false, error: "…" } to explain why it failed. Thrown errors are also recorded as failures.

  • export const route (required) — the route name presented to the agent, as a string literal.
  • export const description (optional) — a short explanation surfaced beside the route so the agent knows what state the hook establishes.
  • export const isAvailable (optional) — a fast, side-effect-free predicate that controls whether the hook is advertised.

Hooks are development-only and are excluded from production builds.

License

Ceraph Software License Agreement — Starter is free for internal development and testing; Pro requires an active subscription. Using Ceraph materials to recreate its features for any purpose, modification, reverse engineering, redistribution, competitive use, and bypassing subscription controls are prohibited. Documented extension points remain available for project-owned hooks, configuration, fixtures, and test artifacts.

Found a Ceraph bug? File an issue. Your agent can also prepare a sanitized report through ceraph_report_issue. Public submission requires your approval unless you have explicitly authorized future reports for the current GitHub account. No source, logs, or attachments are uploaded automatically. Ask your agent to disable reporting or require approval again at any time.

Keywords

react-native

FAQs

Package last updated on 14 Sep 2026

Related posts