To build scenes for Decentraland you will need to install the Command Line Interface (CLI).
The CLI allows you to compile and preview your scene in an “off-chain” development environment. After testing your scene locally, you can use the CLI to upload your content to the content server, linking it with your LAND.
Please note: Currently, the Decentraland SDK (bundled with the CLI installation) only supports TypeScript.
The Decentraland CLI is distributed via npm.
Before you Begin
Please install the following dependencies before you install the CLI:
- Node.js (version 8)
To install the CLI
Open the Terminal app and run the following command:
npm install -g decentraland
Once the installation is complete, the
dcl command will be globally available.
Optional: Install Git
Since Windows machines don’t use bash, we recommend that you install git and include git bash. You can otherwise run the CLI commands on the Windows command prompt.
- Download git (you’ll likely want the 64-bit Windows version):
- When prompted choose to install git bash
- When prompted for a default text editor select Use the Nano editor by default
- When prompted to adjust your path environment, select Use Git from the Windows Command Prompt
- When prompted to choose the SSH executable, select Use OpenSSH
- When prompted to choose the HTTPS transport backend, select Use the OpenSSL library
- When prompted to configure the line ending conversions, select Checkout Windows-style, commit Unix-style line endings
- When prompted to configure the terminal emulator to use with Git Bash select Use MinTTY
- On the final installation screen select the following options
- Enable file system caching
- Enable Git Credential Manager
- Enable symbolic links
Update the CLI on any platform
To update the CLI to the latest supported version, we recommend first uninstalling the CLI and then reinstalling a fresh version. To do this, run the following commands:
// uninstall npm rm decentraland -g // install npm install -g decentraland
Update the SDK version of a scene
By updating the CLI, the new scenes you create with it will use the latest version of the SDK. Projects that you created before you updated the CLI will keep using the original version of the SDK that they had when you created them. The only way to change this is to manually update the SDK version in the scene.
Note: To migrate from versions that are older than 5.0 to 5.0 or newer, you’re going to have to create a new scene project and migrate content manually.
To update the version of the Decentraland SDK:
- Open the file package-lock.json in the scene folder.
- Look for the version of _decentraland-ecs being used and manually change it to the latest version of the SDK.
Tip: If you’re not sure what’s the latest version, check the release notes.
Note: Checking the SDK version you have installed using
npmwon’t tell you what version of the SDK is being used when previewing a specific scene. The only way to know what version they are using is by checking package-lock.json.