cordierite

Cordierite 지원 React Native 앱을 머신에 연결하고, 앱이 등록한 도구를 사용해 터미널에서 구동합니다. 에이전트, 스크립트 등에 유용합니다.

npx skills add https://github.com/callstackincubator/cordierite --skill cordierite

Cordierite

Cordierite is a CLI and host workflow for connecting to a Cordierite-enabled React Native app, discovering its registered tools, invoking those tools from the terminal, and ending the session cleanly after use.

Agent workflow

  1. Run cordierite session --json. The response includes data.sessions (each entry has session_id, status, endpoint info, etc.). If sessions is empty, no Cordierite host is registered for this machine (for this registry).
  2. If you need a new session for a device, follow Establish a session below. Record host.session_id from the host JSON—you must pass it to tools and invoke.
  3. After the user opens the deep link on the device and the app connects, confirm with cordierite session --session-id <session_id> --json until data.selected reflects an active connection (or re-check session --json and infer from the listed session).
  4. cordierite tools --session-id <session_id> --json — list tools registered in the app.
  5. cordierite tools --session-id <session_id> <tool-name> --json — inspect one tool’s input/output schema before calling it.
  6. cordierite invoke --session-id <session_id> <tool-name> --input '{"key":"value"}' --json — invoke the tool with JSON args.

Establish a session

Start the host with --json using the same TLS key and app URL scheme as the project (see Setup if you are wiring Cordierite into an app). The CLI generates the host certificate automatically from the resolved local IP. If the project does not already have a trusted host key, create one first with cordierite keygen in an interactive terminal and add the printed fingerprint to the app’s cliPins. If the default listen port is in use, add --port <port>.

cordierite host --tls-key /path/to/key.pem --scheme myapp --json

Run cordierite host in the background. It blocks; keep the foreground shell free for session, tools, and invoke.

From the host JSON output, use at least:

  • host.deep_link — full URL (e.g. myapp:///?cordierite=…) for the app to open.
  • host.session_id — pass this as --session-id to tools / invoke / session --session-id.

Then:

  1. Give the user the deep link (or QR from interactive host UI on a TTY) so they can open it on a device or simulator.
  2. Or open it yourself when you know the target (e.g. iOS Simulator xcrun simctl openurl booted '<url>', Android via adb, or device automation skills).

After the app opens the link and claims the session, poll cordierite session --session-id <session_id> --json (or session --json) until the session is active.

Terminate the connection

When the user wants to disconnect or stop Cordierite for that session: stop the matching background cordierite host process (end the job, SIGTERM, etc.). That tears down the host and the session. If several hosts run (e.g. different --port), stop the one that corresponds to the session_id you were using.

Declaring tools

The app must register tools before cordierite tools / cordierite invoke can do anything useful. Define schemas with Zod and register with registerTool:

import { registerTool } from "@cordierite/react-native";
import { z } from "zod";

const echoInput = z.object({
  value: z.unknown(),
});

const echoOutput = z.object({
  echoed: z.unknown(),
});

registerTool(
  {
    name: "echo",
    description: "Return the input unchanged",
    inputSchema: echoInput,
    outputSchema: echoOutput,
    handler: async (args) => ({ echoed: args.value }),
  },
);

Notes

  • Use --json for structured CLI output in agent flows.
  • cordierite keygen is the normal setup command for new host keys. It is interactive-only in v1: it writes a PEM private key and prints the exact sha256/... fingerprint the app should trust.
  • tools and invoke always require --session-id (the value from host.session_id or sessions[].session_id).
  • Prefer cordierite session --json first rather than assuming a session exists.
  • If sessions is empty or tools / invoke fail with connection or session errors, establish a session (host running, deep link opened on the correct device).
  • If the app registers no tools, cordierite tools returns an empty list.
  • You may run multiple cordierite host processes (e.g. different --port for different devices); use the session_id that belongs to the host you care about.

Setup

For project integration guidance, see setup.md.

callstackincubator의 다른 스킬

agent-device
callstackincubator
iOS 및 Android 앱 상호작용을 스냅샷 기반 탐색과 선택자 기반 재생으로 자동화합니다. iOS 시뮬레이터/기기 및 Android 에뮬레이터/기기를 지원하며, 세션 기반 자동화, 멀티테넌트 원격 데몬 모드, QA 워크플로를 위한 기기 범위 격리를 제공합니다. 핵심 명령어: UI 탐색을 위한 스냅샷(refs 포함), 상호작용을 위한 press/fill/scroll, 앱 라이프사이클을 위한 open/close, 바이너리 배포를 위한 install/reinstall. 로깅, 네트워크 검사 등을 위한 유틸리티가 포함되어 있습니다.
official
dogfood
callstackincubator
iOS/Android 모바일 앱을 에이전트-디바이스로 체계적으로 탐색 및 테스트하여 버그, UX 문제 및 기타 문제를 찾습니다. dogfood, QA 등을 요청받았을 때 사용하세요.
official
react-devtools
callstackincubator
에이전트 디바이스에서 React Native 컴포넌트 트리를 검사하고 프로파일링합니다. React Native 성능, 프로파일링, props, state, hooks, 렌더링 원인, 느린…에 사용합니다.
official
react-devtools
callstackincubator
React DevTools CLI for AI agents. 사용자가 런타임에 React 또는 React Native 앱을 디버깅하고, 컴포넌트 props/state/hooks를 검사하며, 진단하도록 요청할 때 사용하세요.
official
github
callstackincubator
GitHub 워크플로우 자동화를 gh CLI를 통해 풀 리퀘스트, 스택형 PR, 리포지토리 관리에 제공합니다. 스택형 PR 병합 워크플로우를 제공합니다: 첫 번째 PR을 스쿼시 병합한 후, 체인 내 각 후속 PR에 대해 리베이스 및 베이스 브랜치 업데이트를 수행합니다. 다중 PR 병합 중 무음 실패를 방지하기 위한 충돌 감지 및 수동 해결 프롬프트를 포함합니다. 핵심 gh CLI 작업을 다룹니다: PR 생성, 상태 확인, 스쿼시/리베이스 병합, 브랜치 관리. gh CLI에 의존하여 낮은 컨텍스트 사용에 최적화되었습니다...
official
github-actions
callstackincubator
React Native iOS 시뮬레이터 및 Android 에뮬레이터 클라우드 빌드에 대한 GitHub Actions 워크플로우 패턴으로, 다운로드 가능한 아티팩트를 제공합니다. CI 빌드를 설정할 때 사용하세요.
official
react-native-best-practices
callstackincubator
React Native 앱의 FPS, 번들 크기, TTI, 메모리를 다루는 구조화된 성능 최적화 참고 자료입니다. 9개의 JavaScript/React 가이드(프로파일링, 리스트, 애니메이션, 메모리), 9개의 네이티브 최적화 가이드(터보 모듈, 스레딩, 프로파일링), 9개의 번들링 가이드(트리 쉐이킹, 코드 분할, 크기 분석)로 구성되어 있습니다. 각 참고 자료는 빠른 패턴/명령어, 영향 등급(CRITICAL/HIGH/MEDIUM), 사전 조건과 일반적인 내용을 포함한 심층 설명이 포함된 하이브리드 형식을 따릅니다.
official
react-native-brownfield-migration
callstackincubator
네이티브 iOS 또는 Android 앱을 React Native나 Expo로 마이그레이션하기 위한 점진적 도입 전략을 제공하며, 초기 단계에서 @callstack/react-native-brownfield를 사용합니다.
official