> 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" %}
**💡 팁**: Claude Code, Cursor, Copilot 같은 AI 코딩 도우미를 사용한다면, 코드 작성 전에 공식 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/content-creator-ko/scene-editor/get-started/editor-installation.md)
* 명령줄 인터페이스(CLI)

두 도구 모두 "오프체인" 개발 환경에서 씬을 컴파일하고 미리 볼 수 있습니다. 씬을 로컬에서 테스트한 후 콘텐츠를 콘텐츠 서버에 업로드하고 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) 를 참조하세요.
{% 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
```

Desktop Explorer는 씬을 미리 보는 동안 3D 모델을 최적화된 에셋 번들로 변환하므로, 게시 후의 모습과 똑같이 표시됩니다. 최적화되지 않은 원본 모델을 불러오려면 독립 실행형 `--lsd-raw-gltf` 명령 뒤에 옵션을 전달합니다. `--`. 자세한 내용은 [최적화된 에셋으로 미리 보기](/creator/content-creator-ko/sdk7/getting-started/preview-scene.md#preview-with-optimized-assets).

```bash
npx sdk-commands start -- --lsd-raw-gltf
```

미리 보기를 실행할 때의 자세한 내용과 특수 옵션은 [씬 미리 보기](/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`에서 실행되는 것보다 더 엄격한 타입 검사를 수행하므로, 씬을 디버깅할 때 실행하면 도움이 될 수 있습니다.

## 씬 배포

씬을 Decentraland에 게시하려면 `npm run deploy` 를 실행합니다. 이 명령은 브라우저 창을 열며, 배포를 승인하려면 지갑으로 서명해야 합니다.

씬 게시에 관한 자세한 내용과 특수 옵션은 [게시](/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.
