Quick Start
This walkthrough takes you from nothing to requiring a Forest package in a Roblox project in about five minutes. It assumes you sync files into Studio with Rojo or a similar tool.
Building for UEFN? The flow differs enough that it has its own page: see Installing & Importing on UEFN.
Install the Forest CLI
Run the command for your operating system in a terminal:
Windows (PowerShell)
irm https://releases.forest.dev/install.ps1 | iexThen open a new terminal and confirm it works with forest --version. Install options and supported platforms are covered in Installing the Forest CLI.
Install a package
From your project’s root folder (where your Rojo project file lives), install any package from the registry; its scope and name are shown on its forest.dev page. For example:
forest i evaera/promiseSince this is the first package, Forest offers to set the project up for you: accept and pick Roblox, and it writes a forest.json manifest before installing. The package (and any dependencies) lands in a top-level Packages/ folder, recorded in your forest.json and forest-lock.json. Commit both files to source control.
Mount the Packages folder
Forest installs files on disk; you decide where they appear in the datamodel. With Rojo, map the folder in your project file (ReplicatedStorage.Packages is the common choice):
{
"name": "my-game",
"tree": {
"$className": "DataModel",
"ReplicatedStorage": {
"Packages": { "$path": "Packages" }
}
}
}Where you mount it matters for what replicates to clients; see Where packages live.
Require it
Each installed package is a folder you require by instance path, named after the package without its scope:
local Packages = game:GetService("ReplicatedStorage").Packages
local Promise = require(Packages.promise)That’s it. You’re using packages.
Next steps
- New to packages? What is a Package? covers the ideas behind all of this.
- Keep dependencies current:
forest updatepulls in the newest versions your ranges allow;forest auditshows what’s beyond them, plus license considerations. - Publish your own: Publishing a Package walks through
forest initandforest publish. - Full command reference: CLI Commands.