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-env`
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/env/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 도구에 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-env` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-envbunx cap syncImport
제목이 'Import'인 섹션import { Env } from '@capgo/capacitor-env';API 개요
제목이 'API 개요'인 섹션getKey
제목이 'getKey'인 섹션특정 환경 변수의 값을 키로 검색합니다.
이 메소드는 네이티브 빌드 프로세스 중에 설정된 환경 변수를 가져옵니다. 변수는 런타임에 액세스할 수 있도록 네이티브 프로젝트에서 구성해야 합니다.
import { Env } from '@capgo/capacitor-env';
const result = await EnvPlugin.getKey({ key: 'API_URL' });console.log(result.value); // 'https://api.example.com'실질적인 진실
‘실질적인 진실’ 제목의 섹션이 페이지는 플러그인의 src/definitions.ts. 업스트림에서 pubic API이 변경될 때 다시 싱크를 실행하세요.
Getting Started에서 계속
‘Getting Started에서 계속’ 제목의 섹션__CAPGO_KEEP_0__를 사용하는 경우 Getting Started 대시보드와 API를 계획하고 운영하기 위해 연결하세요. @capgo/capacitor-env를 사용합니다. capgo native 기능을 위한 @capacitor/capgo-env를 사용하세요. API 개요 API 개요의 구현 세부 정보를 위한 __CAPGO_KEEP_0__ 소개 __CAPGO_KEEP_0__ 소개의 구현 세부 정보를 위한 API 키 API 키의 구현 세부 정보를 위한 , __CAPGO_KEEP_0__ 장치 __CAPGO_KEEP_0__ 장치의 구현 세부 정보를 위한