xllify-lua
xllify-lua is command-line interface for testing and interacting with xllify functions.
It provides an interactive shell and test framework/runner for calling Luau-based functions, with support for various data types.
It is available for Mac, Linux and Windows meaning you can validate your code before it gets to Excel.
Usage
Firstly download it for your platform from xllify.com.
Interactive Mode
Start the interactive shell:
xllify-luaOr load a Luau file on startup: (you can specify --load multiple times)
xllify-lua --load functions.luauDirect Command Execution
Execute commands directly without entering interactive mode:
xllify-lua list
xllify-lua desc MyFunction
xllify-lua call MyFunction 42 "hello"JSON Output
Get machine-readable output for scripting:
xllify-lua --json list
xllify-lua --json call Add 5 10Commands
list (or ls)
List all registered functions with their descriptions.
Interactive:
> listDirect:
xllify-lua listJSON Output:
xllify-lua --json list
# Returns: [{"name":"FunctionName","description":"...","category":"..."}]desc (or describe)
Show detailed information about a function including parameters, types, and usage examples.
Interactive:
> desc AddDirect:
xllify-lua desc AddOutput includes:
Function name and description
Category
Parameter list with types and descriptions
Usage examples for CLI and Excel
call [args...]
Execute a function with the provided arguments.
Interactive:
> call Add 5 10
Excel: =Add(5, 10)
15.000000Direct:
xllify-lua call Add 5 10JSON Output:
xllify-lua --json call Add 5 10
# Returns: 15.0load <file.luau>
Load a Luau file containing function definitions.
Interactive:
> load functions.luau
Successfully loaded functions.luau
Total functions: 5Direct:
xllify-lua load functions.luauhelp (or ?)
Display help information about available commands.
quit (or exit, q)
Exit the interactive shell (interactive mode only).
Argument Types
The CLI automatically parses arguments into appropriate types:
Numbers
call MyFunction 42 # Integer
call MyFunction 3.14 # Float
call MyFunction -10 # NegativeStrings
Enclose in double quotes:
call MyFunction "hello world"
call MyFunction "with \"quotes\""Booleans
call MyFunction true
call MyFunction falseArrays (1D)
Use JSON-style square bracket syntax:
call MyFunction [1,2,3]
call MyFunction [1.5,2.7,3.14]Arrays (2D)
For multi-dimensional arrays, nest arrays in row-major order:
call MyFunction [[1,2],[3,4]] # 2x2 matrix
call MyFunction [[1,2,3],[4,5,6]] # 2x3 matrixMixed Arguments
call MyFunction 42 "text" true 3.14
call MyFunction [1,2,3] "label" 100Output Formats
Scalar Values
> call GetValue
42.000000Strings
> call GetName
"John Doe"Booleans
> call IsValid
trueMulti-dimensional Arrays (Matrices)
The CLI displays arrays in a formatted table with column labels (A, B, C...) and row numbers:
> call GetMatrix
Matrix (3x3):
A B C
┌────────┬────────┬────────┐
1 │ 1.000 │ 2.000 │ 3.000 │
├────────┼────────┼────────┤
2 │ 4.000 │ 5.000 │ 6.000 │
├────────┼────────┼────────┤
3 │ 7.000 │ 8.000 │ 9.000 │
└────────┴────────┴────────┘JSON Output
All values are converted to JSON format:
xllify-lua --json call GetMatrix
# Returns: [[1.0,2.0,3.0],[4.0,5.0,6.0],[7.0,8.0,9.0]]JSON Types:
Numbers:
42.5Strings:
"text"Booleans:
true,falseNull/Nil:
nullArrays:
[[1,2],[3,4]]Errors:
{"error":"error_code_X"}or{"error":"message"}Special numbers:
"Infinity","-Infinity",null(for NaN)
Options
--load <file.luau>
Load a Luau file before starting interactive mode or executing a command.
xllify-lua --load functions.luau call MyFunction 42--json
Output results in JSON format (non-interactive mode only).
xllify-lua --json list
xllify-lua --json call Add 5 10--help, -h
Display help information and exit.
xllify-lua --helpExamples
Interactive Session
$ xllify-lua
xllify CLI v1.0.0
Type 'help' for available commands
Loaded 12 functions
> list
Registered functions:
Add - Add two numbers
Multiply - Multiply two numbers
FormatText - Format text with template
...
> desc Add
Function: Add
Description: Add two numbers
Category: Math
Parameters:
1. a (number) - First number
2. b (number) - Second number
Usage:
CLI: call Add <a> <b>
Excel: =Add(<arg1>, <arg2>)
> call Add 5 10
Excel: =Add(5, 10)
15.000000
> quitAutomated Scripting
# Load functions and call in one command
xllify-lua --load mylib.luau call ProcessData 100
# Get JSON output for parsing
result=$(xllify --json --load mylib.luau call Calculate 42)
echo $result | jq .
# List all functions in JSON
xllify-lua --json list | jq '.[] | select(.category=="Math")'Platform Support
macOS: Full readline support with editline
Linux: Full readline support with GNU readline
Windows: Basic line editing (no readline history)
Top tips
Use Tab Completion: On macOS/Linux, readline provides command history navigation with up/down arrows
JSON for Scripts: Use
--jsonflag when calling from scripts for easier parsingPre-load Functions: Use
--loadto automatically load your function libraryTest Before Excel: Use the CLI to test and debug functions before using them in Excel
Check Function Signatures: Use
descto see parameter types and descriptions
Last updated