메뉴로 바로가기

Getting Started

GitHub

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-env` plugin in my project.

만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래에 플랫폼에 따라 설명된 지침을 따르세요:

터미널 창
bun add @capgo/capacitor-env
bunx cap sync
import { Env } from '@capgo/capacitor-env';

__getKey__ 함수는 특정 환경 변수의 값을 키로 검색합니다.

이 메서드는 네이티브 빌드 프로세스 중에 설정된 환경 변수를 검색합니다. 변수는 런타임에 액세스하기 전에 네이티브 프로젝트에서 구성해야 합니다.

import { Env } from '@capgo/capacitor-env';
const result = await EnvPlugin.getKey({ key: 'API_URL' });
console.log(result.value); // 'https://api.example.com'

진실의 근원

Source Of Truth

이 페이지는 플러그인의 src/definitions.ts. 업스트림에서 pubic API이 변경되었을 때 다시 싱크를 실행하세요.

Getting Started

Getting Started

이러한 기능을 사용 중이라면 Getting Started 계획 대시보드 및 API 연산을 위해 연결하세요. Using @capgo/capacitor-env Using @capgo/capacitor-env API Overview API Overview __CAPGO_KEEP_0__ Introduction API Keys API Keys Devices __CAPGO_KEEP_0__