glua

command
v0.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Command glua is a Lua 5.5 interpreter powered by go-lua.

Usage:

glua [options] [script [args...]]

Options:

-e "code"     Execute the given Lua code
-l name       Require library 'name' before executing scripts
-i            Enter interactive REPL mode after executing scripts
-v            Print version information and exit
-             Read script from standard input
--sandbox     Run in sandbox mode (CPU limited)
--timeout N   Set execution timeout in seconds
--no-stdlib   Don't load standard libraries

When invoked with no arguments, glua enters interactive REPL mode. Multiple -e and -l flags can be combined; they execute in order.

The REPL supports expression evaluation: typing an expression like "1+2" automatically prints the result (wraps in "return <expr>" internally). Multi-line input is supported — if a statement is incomplete, the prompt changes to ">> " and waits for more input.

Shebang support: scripts can start with #!/usr/bin/env glua and be executed directly as programs on Unix systems.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL