Skip to content

Command-Line Usage

Once you’ve written a script file, for example script-name.luau, you can run it:

Terminal
lune script-name.luau

Or using the legacy syntax:

Terminal
lune run script-name

Lune will look for the file in:

  • The current directory
  • The folder lune in the current directory
  • The folder .lune in the current directory
  • The folder lune in your home directory
  • The folder .lune in your home directory
Terminal
lune --init

Creates lune.config.json, .luaurc, and lune_packages/ directory.

Terminal
lune --install colors networking

Or install a specific version:

Terminal
lune --install colors@1.0.0

Or install from config file:

Terminal
lune --install
Terminal
lune --updpkg

Updates all packages to their latest versions. After updating, the versions are locked in lune.config.json.

Terminal
lune --list

Lists all scripts found in lune or .lune directories.

Terminal
lune --build script.luau

Compiles your script into a standalone executable.

Terminal
lune --repl

Starts an interactive Luau REPL session.

Terminal
lune run -

Runs a script passed via stdin:

Terminal
echo "print 'Hello, terminal!'" | lune run -

Note: Lune supports both .luau and .lua extensions, but .luau is recommended.


Installation | Next: Editor Setup