> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-ko/sdk7/getting-started/using-the-cli.md).

# CLI 사용

Decentraland CLI를 사용해 씬을 실행하고 배포합니다. Creator Hub는 대부분의 크리에이터에게 권장되는 도구이며, CLI는 고급 및 자동화 워크플로에 적합합니다.

{% hint style="info" %}
**💡 팁**: AI 코딩 어시스턴트(Claude Code, Cursor, Copilot 같은)를 사용 중이라면, 코드를 작성하기 전에 공식 Decentraland SDK Skills를 설치하세요. 그러면 검증된 SDK7 패턴을 알게 됩니다:

```bash
npx skills add decentraland/sdk-skills
```

참조 [AI와 함께하는 바이브 코딩](/creator/content-creator-ko/sdk7/getting-started/vibe-coding.md) 에서 전체 AI 지원 워크플로를 확인하세요.
{% endhint %}

Decentraland용 씬을 빌드하려면 다음 중 하나를 사용할 수 있습니다:

* 다음 [Creator Hub](/creator/content-creator-ko/scene-editor/get-started/editor-installation.md)
* 명령줄 인터페이스(CLI)

두 도구 모두 오프체인(off-chain) 개발 환경에서 씬을 컴파일하고 미리 볼 수 있게 해줍니다. 로컬에서 씬을 테스트한 후에는 콘텐츠를 콘텐츠 서버에 업로드하여 LAND 또는 WORLD와 연결할 수 있습니다.

Creator Hub의 Scene Editor가 더 사용하기 쉽지만, CLI는 더 높은 유연성을 제공하며 자동화된 프로세스에서도 쉽게 사용할 수 있습니다.

{% hint style="warning" %}
**📔 참고**: Scene Editor는 내부적으로 동일한 명령줄 작업을 실행합니다.
{% endhint %}

{% hint style="info" %}
**💡 팁**: [설치 가이드](/creator/content-creator-ko/scene-editor/get-started/editor-installation.md) 에서 Creator Hub 설치 방법을 확인하세요.
{% endhint %}

## 시작하기 전에

명령줄로 씬을 다루려면, 씬에 대해 CLI 명령을 실행하기 전에 다음 종속 항목을 설치하세요:

* [Node.js](https://nodejs.org) (버전 20 이상)

## 새 프로젝트 시작하기

실행하세요 `npx @dcl/sdk-commands init` 를 빈 폴더에서 실행하여 Decentraland의 기본 파일을 채워 넣으세요 [씬](/creator/content-creator-ko/sdk7/kinds-of-projects/scene-metadata.md) 프로젝트. 또한 **새 씬** 버튼을 Creator Hub에서 사용해 새 씬을 만들 수도 있으며, 그러면 동일한 프로젝트 구조가 생성됩니다.

다른 종류의 프로젝트에서 시작하려면 `--project` 플래그를 사용하세요. 예를 들어, [스마트 웨어러블](/creator/content-creator-ko/sdk7/kinds-of-projects/smart-wearables.md) 프로젝트를 만들려면:

```bash
npx @dcl/sdk-commands init --project smart-wearable
```

사용 가능한 `--project` 옵션은 `scene-template` (기본값), `px-template`, `smart-wearable`과 `library`.

## 씬의 SDK 버전 업데이트

씬 폴더에서 다음 명령을 실행하세요:

```bash
npm i @dcl/sdk@latest
```

다음 항목을 확인하면 제대로 작동했는지 확인할 수 있습니다. `package.json` 씬의 파일에서 `@dcl/sdk` 버전을 찾아보세요.

## 미리보기 실행

실행하세요 `npm run start` 를 씬, 작업공간, 또는 스마트 웨어러블 프로젝트의 루트 수준에서 실행하면 Decentraland Desktop 클라이언트에서 미리보기가 열립니다.

```bash
npm run start
```

대신 씬을 [Decentraland 모바일 앱](/creator/content-creator-ko/build-for-mobile/mobile-client/overview.md) 에서 미리 보려면 `npm run start -- --mobile` 를 실행하세요(별칭 `-- -m`). CLI는 컴퓨터와 동일한 Wi‑Fi 네트워크에 연결된 휴대폰에서 씬을 여는 QR 코드를 출력합니다. 전체 안내는 [모바일에서 미리보기](/creator/content-creator-ko/build-for-mobile/develop/preview-on-mobile.md) 를 참조하세요.

```bash
npm run start -- --mobile
```

미리보기를 더 부드럽게 실행하고, 게시된 이후와 동일하게 3D 모델이 렌더링되도록 하려면 `--local-ab` 플래그를 추가하세요. 참조 [최적화된 자산으로 미리보기](/creator/content-creator-ko/sdk7/getting-started/preview-scene.md#preview-with-optimized-assets).

```bash
npm run start -- --local-ab
```

참조 [미리보기 씬](/creator/content-creator-ko/sdk7/getting-started/preview-scene.md) 에서 세부 정보와 미리보기를 실행할 때의 특수 옵션을 확인하세요.

## 빌드

실행하세요 `npm run build` 를 실행하여 프로젝트를 빌드하세요. Decentraland 씬은 TypeScript로 작성되지만, 게시될 때는 최소화된 JavaScript로 빌드됩니다. 자세한 내용은 [씬 코딩](https://github.com/decentraland/docs/blob/main/creator/sdk7/getting-started/coding-scenes.md) 를 참조하세요.

빌드 명령은 선택 사항이며, 배포 전에 백그라운드에서도 실행됩니다(다만 건너뛰는 플래그를 추가할 수 있습니다).

빌드 명령은 `npm run start`과 함께 실행되는 검사보다 더 엄격한 타입 검사를 수행하므로, 씬 디버깅에 도움이 될 때가 있습니다.

## 씬 배포

실행하세요 `npm run deploy` 를 실행하여 씬을 Decentraland에 게시하세요. 이 명령은 배포를 승인하기 위해 지갑으로 서명할 수 있는 브라우저 창을 엽니다.

참조 [게시](/creator/content-creator-ko/sdk7/publishing/publishing.md) 에서 씬을 게시할 때의 세부 정보와 특수 옵션을 확인하세요.

## 문제 해결

문제가 발생하면 [문제 해결](/creator/content-creator-ko/sdk7/debugging/troubleshooting.md) 섹션을 참조하세요.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/creator/content-creator-ko/sdk7/getting-started/using-the-cli.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
