LUAP(1)
π
LUAP(1) β hi bestie, this is the luap page
okay so real quick: this is a User Commands manual page for luap, and we're gonna get into it because honestly? it ate. β¨
πΈ NAME
luap β a Lua prompt with pretty-printing and autocompletion π«Ά
β¨ SYNOPSIS
luap [ -e STMT ] [ -l NAME ] [ -p ] [ -v ] [ -i ] [ -h ] [ <SCRIPT> ]
...
π DESCRIPTION
okay so luaprompt is two things at once and both of them are iconic:
- an interactive Lua prompt you can use instead of the official interpreter, and
- a module that gives you a Lua command prompt you can embed in a host application π
as a standalone interpreter it's got a whole bunch of conveniences the official Lua interpreter simply does not have (sorry to it). and as an embedded prompt, it's for apps that use Lua as a configuration or interface language β those apps can lowkey benefit from an interactive prompt for debugging or just regular use. fr fr.
luaprompt features (get ready, this is the good part):
- Readline-based input with history and completion β specifically, all keywords, global variables and table accesses (with string or integer keys) can be completed on top of Readline's standard file completion. module names get completed too, for modules installed in the standard directories, and completed modules can optionally be loaded. the way that works is so satisfying ngl.
- Persistent command history (retained across sessions π) plus recording of command results for future reference.
- Proper value pretty-printing for interactive use β when you enter an expression at the prompt, all returned values are printed (no, you do not need to prepend an equal sign, we're not animals). values get printed in a descriptive way that tries to be as readable as possible. the formatting tries to mimic Lua code (this is done to minimize ambiguities and no guarantees are made that it is valid code β important, don't come for me). additionally, each value is stored in a table for future reference π.
- Color highlighting of error messages and variable printouts π.
luap tries to mimic the standard Lua interpreter as much as possible (currently only the -E flag is not supported π) while giving you the extra feature set above. all option arguments start with a single hyphen, followed by a letter. multiple consecutive options can be specified by their respective letters following a single hyphen.
anything that does not follow that format is interpreted as either:
- a script file, which is to be executed (if it's the first non-option argument), or
- an argument that gets passed to the script (for subsequent non-option arguments).
a single hyphen is interpreted as a request to execute the standard input. and if no options are passed, luap enters interactive mode, as if the -i option had been specified. main character energy honestly.
π config vibes: a file with custom configuration, or startup actions, can be placed either at~/.luaprc.lua, or alternatively at~/.config/luaprc.lua. the first of these to be found is loaded and executed at startup.
π₯ OPTIONS
luap accepts the following options:
-e STMTβ execute stringSTMT.-l NAMEβ require libraryNAME.-pβ force plain, uncolored output (if you hate fun, or your terminal is being weird π).-vβ print version information.-iβ enter interactive mode.-hβ show this help message and exit.--β stop processing arguments. the rest of the line is interpreted as a script file to execute, optionally followed by arguments that should be passed to the script.
π¦ LuaJIT extras
when luap is used with LuaJIT, the following additional arguments are also understood:
-j CMDβ perform LuaJIT control command.-O OPTβ control LuaJIT optimizations.
π§ CONFIGURATION
luaprompt's β and subsequently luap's β functionality can be customized at build-time. see the documentation accompanying the source code for more details π.
additionally, you can customize luap's command line interface, since it's based on GNU Readline. that includes the ability to change behavior (like how completion is performed), define additional keybindings or redefine existing ones, define custom macros, and other possibilities. so it's highly recommended you consult readline(3) for more info β like, genuinely, go read it π.
π‘ note thatluapromptsets its application name, so you can have custom Readline configuration that'll be effective forluapromptonly β thus not affecting every other Readline-enabled application on your system. you get that with$if ... $endifconditional constructs inside Readline's initialization file. again: seereadline(3)π .
β SEE ALSO
π AUTHOR
Dimitris Papavasileiou (dpapavas@protonmail.ch), Boris Nagaev β absolute legends, we stan π«Ά
π REPORTING BUGS
please report bugs at the luaprompt home page at https://github.com/dpapavas/luaprompt β they'd love that, no cap ππ
okay that's the whole page!! this was luap 0.10, from 2 Aug 2026, and the original file signs off as LUAP(1) β mwah, slay, periodt β¨ππ
π¦ where this page comes from
- nixpkgs unstable: lua5.1-luaprompt 0.10-1
- nixpkgs unstable: lua5.2-luaprompt 0.10-1
- nixpkgs unstable: lua5.3-luaprompt 0.10-1
- nixpkgs unstable: lua5.4-luaprompt 0.10-1
- nixpkgs unstable: lua5.5-luaprompt 0.10-1
- nixpkgs unstable: luajit2.1-luaprompt 0.10-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms