RPMLUA(1) General Commands Manual RPMLUA(1)

# [NAME](#NAME)

rpmlua - RPM Lua interpreter

# [SYNOPSIS](#SYNOPSIS)

**rpmlua** \[options] \[*LUA\_SCRIPT*] \[-- *ARG* ...]

# [DESCRIPTION](#DESCRIPTION)

Run RPM internal Lua interpreter.

Note: indexes start at 1 in Lua, so the program name is at arg\[1] instead of the more customary index zero.

# [ARGUMENTS](#ARGUMENTS)

*LUA SCRIPT*

A Lua script.

*ARG*

Options and arguments to be passed to *SCRIPT\_FILE*. **rpmlua** stops processing at **--**.

# [OPTIONS](#OPTIONS)

**-i**, **--interactive**

Run an interactive session after executing optional script or statement.

**--opts**=*OPTSTRING*

Perform [**getopt**(3)](/man/os/rpm/getopt.3) option processing on the passed arguments according to *OPTSTRING*.

**-e** "*STATEMENT*", **--execute** "*STATEMENT*"

Execute a Lua statement before executing optional script.

# [EXIT STATUS](#EXIT_STATUS)

On success, 0 is returned, a nonzero failure code otherwise.

# [EXAMPLES](#EXAMPLES)

**rpmlua test.lua**

Execute test.lua script file.

**rpmlua --opts=ab:c args.lua -- 1 2 3 -c -b5**

Execute args.lua script file with option processing.

**rpmlua -e "print(rpm.ver('1.0') &lt; rpm.ver('2.0'))"**

Execute single statement to compare rpm versions.

**rpmlua -i**

Run an interactive session.

# [SEE ALSO](#SEE_ALSO)

[**lua**(1)](/man/os/rpm/lua.1), [**popt**(3)](/man/os/rpm/popt.3), [**getopt**(3)](/man/os/rpm/getopt.3), [**rpm**(8)](/man/os/rpm/rpm.8) [**rpm-lua**(7)](/man/os/rpm/rpm-lua.7)

**http://www.rpm.org/**

2026-08-31 RPM 6.1.0

---

Document: rpmlua(1) from rpm 6.1.0-r1 (Chainguard OS)
Source: https://github.com/rpm-software-management/rpm
