Command-Line Usage
Running Scripts
Section titled “Running Scripts”Once you’ve written a script file, for example script-name.luau, you can run it:
lune script-name.luauOr using the legacy syntax:
lune run script-nameLune will look for the file in:
- The current directory
- The folder
lunein the current directory - The folder
.lunein the current directory - The folder
lunein your home directory - The folder
.lunein your home directory
Package Management
Section titled “Package Management”Initialize a project
Section titled “Initialize a project”lune --initCreates lune.config.json, .luaurc, and lune_packages/ directory.
Install packages
Section titled “Install packages”lune --install colors networkingOr install a specific version:
lune --install colors@1.0.0Or install from config file:
lune --installUpdate packages
Section titled “Update packages”lune --updpkgUpdates all packages to their latest versions. After updating, the versions are locked in lune.config.json.
Listing Scripts
Section titled “Listing Scripts”lune --listLists all scripts found in lune or .lune directories.
Building Executables
Section titled “Building Executables”lune --build script.luauCompiles your script into a standalone executable.
lune --replStarts an interactive Luau REPL session.
Advanced Usage
Section titled “Advanced Usage”lune run -Runs a script passed via stdin:
echo "print 'Hello, terminal!'" | lune run -Note: Lune supports both .luau and .lua extensions, but .luau is recommended.
← Installation | Next: Editor Setup →