• Stars
    star
    168
  • Rank 225,507 (Top 5 %)
  • Language
    Rust
  • License
    MIT License
  • Created almost 5 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Toolchain manager for Roblox projects

Foreman

Actions Status Latest Release on crates.io

Foreman is a toolchain manager to help Roblox developers manage their installations of tools like Rojo, Remodel, Tarmac, DarkLua, StyLua, and Selene.

Foreman is inspired by rustup and asdf.

It's used in production across hundreds of engineers, but more feedback is welcome!

Installation

GitHub Releases

You can download pre-built Foreman releases for Windows, macOS, and Linux from the Releases page.

GitHub Actions

You can use the official setup-foreman action to install Foreman as part of your GitHub Actions workflow.

Upgrading

First, replace your current version of Foreman with the newest one from the GitHub releases. If you don't remember where you have put the executable, running where foreman on Windows or which foreman on macOS and Linux should help you find it.

The other step is to locate the bin directory created by foreman and delete the files there. It is as simple as opening .foreman/bin, which is located under the user directory (%homepath% on Windows or $HOME on macOS and Linux).

From Source

If you have Rust 1.53.0 or newer installed, you can also compile Foreman by installing it from crates.io:

cargo install foreman

To upgrade, re-run cargo install foreman and clean up the bin directory as described in the section just above.

Setup

Most users will want to do a bit of additional setup to begin using tools via foreman.

Path Configuration

On first run (try foreman list), Foreman will create a .foreman directory in your user folder (usually ~/.foreman on Unix systems, %USERPROFILE%/.foreman on Windows).

It's recommended that you add ~/.foreman/bin to your PATH to make the tools that Foreman installs for you accessible on your system. If you have tools installed via other mechanisms (for example, you may have previously installed rojo directly via cargo), ensure that ~/.foreman/bin is on your PATH before any other installation directories like .cargo/bin in order to make sure it takes precedence.

Authentication

To install tools from a private GitHub repository, Foreman supports authenticating with a Personal Access Token.

Use foreman github-auth to pass an authentication token to Foreman, or open ~/.foreman/auth.toml and follow the contained instructions.

Similarly, for projects hosted on a GitLab repository, use foreman gitlab-auth to pass an authentication token to Foreman, or open ~/.foreman/auth.toml.

Usage

Foreman downloads tools from GitHub or GitLab and references them by their user/repo name, like Roblox/foreman.

Configuration File

Foreman uses TOML for its configuration file. It simply takes a single tools entry and an enumeration of the tools you need, which looks like this:

[tools]
rojo = { github = "rojo-rbx/rojo", version = "7.0.0" }
darklua = { gitlab = "seaofvoices/darklua", version = "0.7.0" }

As you may already have noticed, the tool name is located at the left side of = and the right side contains the information necessary to download it. For GitHub tools, use github = "user/repo-name" and for GitLab, use gitlab = "user/repo-name".

Previously, foreman was only able to download tools from GitHub and the format used to be source = "rojo-rbx/rojo". For backward compatibility, foreman still supports this format.

System Tools

To start using Foreman to manage your system's default tools, create the file ~/.foreman/foreman.toml.

A Foreman config that lists Rojo could look like:

[tools]
rojo = { github = "rojo-rbx/rojo", version = "7.0.0" }

Run foreman install from any directory to have Foreman pick up and install the tools listed in your system's Foreman config.

Now, if you run rojo inside of a directory that doesn't specify its own version of Rojo, Foreman will run the most recent 0.5.x release for you!

Project Tools

Managing a project's tools with Foreman is similar to managing system tools. Just create a foreman.toml file in the root of your project.

A Foreman config that lists Remodel might look like this:

[tools]
remodel = { github = "rojo-rbx/remodel", version = "0.9.1" }

Run foreman install to tell Foreman to install any new binaries from this config file.

When inside this directory, the remodel command will run the latest 0.6.x release of Remodel installed on your system.

Troubleshooting

Foreman is a work in progress tool and has some known issues. Check out the issue tracker for known bugs.

If you have issues with configuration, you can delete ~/.foreman to delete all cached data and start from scratch. This directory contains all of Foreman's installed tools and configuration.

Bad CPU type Error

If you're using foreman version 1.0.4 or older on a non-M1 Mac, you may have encounter an error that looks like this:

an error happened trying to run `github.com/some-org/some-tool@^1.2.3` at `/Users/some-user/.foreman/tools/some-org__some-tool-1.2.3` (this is an error in Foreman): Bad CPU type in executable (os error 86)

In this case, your foreman installation has mistakenly downloaded an incompatible version of the tool binary due to an error in the binary file selection logic.

To fix this error, take the following steps:

  1. Upgrade your version of foreman per the instructions above.
  2. Delete the ~/.foreman/tool-cache.json file and the ~/.foreman/tools/ folder (and its contents), as well as the ~/.foreman/bin folder (as described in the Upgrading section above). This should remove any invalid binaries that foreman has cached.
  3. Run foreman install to redownload all relevant tools.

Your downloaded tools should now work correctly.

License

Foreman is available under the MIT license. See LICENSE.txt or https://opensource.org/licenses/MIT for details.

More Repositories

1

luau

A fast, small, safe, gradually typed embeddable scripting language derived from Lua
C++
3,084
star
2

roact

A view management library for Roblox Lua similar to React
Lua
562
star
3

creator-docs

Open Source Creator Documentation
TypeScript
299
star
4

react-lua

A comprehensive translation of upstream React 17.x into Luau. This is a read-only mirror.
Lua
274
star
5

Core-Scripts

All of ROBLOX's core client scripts.
Lua
248
star
6

rodux

A state management library for Roblox Lua inspired by Redux
Lua
246
star
7

nomad-driver-containerd

Nomad task driver for launching containers using containerd.
Go
214
star
8

testez

BDD-style test and assertion library for Roblox Lua
Lua
183
star
9

roblox-blender-plugin

A Blender plugin to upload selected assets in Blender to Roblox using Roblox's Open Cloud API.
Python
113
star
10

tarmac

Command line tool to manage Roblox assets
Rust
109
star
11

avatar

Avatar templates and assets available to our external developers
Lua
99
star
12

StudioWidgets

Lua
91
star
13

roact-rodux

A connector between Roact and Rodux, similar to react-redux
Lua
82
star
14

future-is-bright

Prototyping future Roblox lighting technology
60
star
15

js-to-lua

Conversion tool for migrating JS/TS code into Luau. This is a read-only mirror
TypeScript
54
star
16

voice-safety-classifier

Voice safety classifier
Python
51
star
17

nomad-driver-iis

Nomad task driver for running windows IIS services.
Go
50
star
18

Studio-Tools

Built-in ROBLOX Studio Lua plugins
49
star
19

nomad-node-problem-detector

NNPD - nomad-node-problem-detector
Go
47
star
20

Old-Open-Source-Levels

A repository of ROBLOX levels that are free to manipulate however you wish
36
star
21

rs-consul

This crate provides access to a set of strongly typed apis to interact with consul (https://www.consul.io/)
Rust
34
star
22

material-update-beta

29
star
23

rblx_nurd

Open Source Nomad Usage Resource Dashboard
Go
28
star
24

Wiki-Lua-Libraries

Lua
26
star
25

avatar-evolution

Prototyping the future of games and avatars on Roblox
23
star
26

setup-foreman

GitHub Action to install Foreman, a toolchain manager for Roblox tools
TypeScript
21
star
27

dash

A collection of core utilities expanding the capabilities of Luau. This is a read-only mirror.
Lua
17
star
28

cryo

A collection of methods for working with immutable data in a functional way for Luau. This is a read-only mirror.
Lua
15
star
29

luau-regexp

A regular expression library for Luau. This is a read-only mirror.
Lua
15
star
30

jest-roblox

Delightful testing for Luau. This is a read-only mirror.
Lua
15
star
31

signal-lua

A well-structured, well-tested, and well-documented Luau signal implementation. This is a read-only mirror.
Lua
14
star
32

cla-signature-bot

GitHub Action for self-contained handling of CLA signatures
TypeScript
14
star
33

Catalog

The virtual gear items which make up the Roblox catalog
14
star
34

luau-polyfill

A set of utilities to mimic common JS polyfills needed for translating projects from JS to Luau. This is a read-only mirror.
Lua
13
star
35

rbx-test-files

A repository of small Roblox model and place files to exercise implementations
Lua
13
star
36

graphql-lua

A reference implementation of GraphQL for Luau. This is a read-only mirror.
Lua
12
star
37

chalk-lua

Terminal string styling library for Luau. This is a read-only mirror.
Lua
11
star
38

otter

Declarative animation library for Luau. This is a read-only mirror.
Lua
10
star
39

zen-observable-lua

An Implementation of Observables for Luau. This is a read-only mirror.
Lua
10
star
40

roact-navigation

A declarative navigation system for App UI, built on top of Roact. This is a read-only mirror.
Lua
9
star
41

rhysd-github-action-benchmark

GitHub Action for continuous benchmarking to keep performance Copied from https://github.com/rhysd/github-action-benchmark
TypeScript
9
star
42

picomatch-lua

Blazing fast and accurate glob matcher written in Luau. This is a read-only mirror.
Lua
8
star
43

UnicodeVisualizerPlugin

Deprecated Roblox Studio plugin for visualizing strings of unicode. Use the web version. https://tiffnix.com/unicode/
Lua
8
star
44

symbol-luau

A simple, stable implementation of Symbol in Luau. This is a read-only mirror.
Lua
7
star
45

TweenService-Editor

TweenService Visual Editor plugin for Roblox Studio
Lua
6
star
46

luau-tag-utils

Utility functions to query Instances from tags attached with CollectionService. This is a read-only mirror.
Lua
5
star
47

apollo-client-lua

Apollo Client for GraphQL translated to Luau. This is a read-only mirror.
Lua
5
star
48

chef-teamcity

TeamCity Chef cookbook
Ruby
4
star
49

cla-bot-store

Storage repository for CLA bot. Public so that forks can check the signature file directly.
4
star
50

dom-testing-library-lua

Simple and complete testing utilities that encourage good testing practices. This is a read-only mirror.
Lua
3
star
51

roact-performance-benchmarks

Performance benchmarks for Roact. This a read-only mirror
Lua
3
star
52

test-repo-2022080901

3
star
53

graphql-tag-lua

A Luau template literal tag that parses GraphQL queries. This is a read-only mirror.
Lua
3
star
54

data-tools

Java
2
star
55

strongdm-contrib

contributions to strongdm to help with security operations and automation
Python
2
star
56

react-testing-library-lua

Simple and complete testing utilities that encourage good testing practices. This is a read-only mirror.
Lua
1
star
57

chef-xcode

Ruby
1
star
58

.github

GitHub Meta-Repo
1
star
59

action-creator-docs-automation

GitHub Actions for Creator Docs
1
star