Getting Started
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 프롬프트 복사
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-auto`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/auto/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 섹션AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 다음 명령어를 사용하여 Capgo 스킬을 추가하세요.
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins그런 다음 다음 명령어를 사용하세요:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-auto` plugin in my project.만약 Manual Setup을 선호한다면, 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
-
패키지 설치
터미널 창 npm i @capgo/capacitor-auto -
자연어 프로젝트 동기화
터미널 창 npx cap sync -
root car 템플릿 설정
import { Auto } from '@capgo/capacitor-auto';await Auto.setRootTemplate({title: 'Garage',sections: [{header: 'Doors',items: [{id: 'open-main-door',title: 'Open main door',subtitle: 'Tap to send the action to the phone app',payload: { doorId: 'main' },},],},],}); -
자동차 액션 처리
await Auto.addListener('carAction', async (event) => {if (event.id === 'open-main-door') {await openGarageDoor(event.payload?.doorId);}}); -
__CAPGO_KEEP_1__
const status = await Auto.isAvailable();console.log(status.available, status.connected, status.platform);await Auto.addListener('connectionChanged', (event) => {console.log('Car connected:', event.connected, event.platform);});
빈 상태
빈 상태설정 emptyText 템플릿이 행이 없을 때:
await Auto.setRootTemplate({ title: 'Garage', emptyText: 'No actions are available right now.', sections: [],});__CAPGO_KEEP_2__
Send bridge messagesSend bridge messages sendMessage Send bridge messages
await Auto.sendMessage({ type: 'status', payload: { online: true },});Send bridge messages
Platform setup- Send bridge messages iOS 설정 Send bridge messages
- iOS 설정 Send bridge messages Android 설정
Getting Started에서 계속 진행하세요
Getting Started에서 계속 진행하는 섹션Capacitor를 사용 중이라면 Getting Started Capacitor를 사용하여 Native 플러그인 작업을 계획하고자 할 때, Capacitor를 사용하여 Native 기능을 연결하는 @capgo/capacitor-auto Capacitor를 사용하여 Native 기능을 연결하는 @capgo/capacitor-auto에서 Capgo 플러그인 디렉토리 Capacitor를 사용하여 제품 워크플로우를 연결하는 Capgo 플러그인 디렉토리에서 Capacitor Plugins by Capgo Capacitor를 사용하여 구현 세부 정보를 연결하는 Capacitor 플러그인에 의해 Capgo 플러그인을 추가하거나 업데이트 __CAPGO_KEEP_0__ 구현 세부 사항에 대한 정보를 추가하거나 플러그인을 업데이트하는 데 사용하는 방법에 대해 설명합니다. Ionic Enterprise 플러그인 대체 옵션 __CAPGO_KEEP_0__ 플러그인 업데이트에 대한 제품 워크플로에 대해 설명합니다.