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.comarrow-up-right.

Interactive Mode

Start the interactive shell:

xllify-lua

Or load a Luau file on startup: (you can specify --load multiple times)

xllify-lua --load functions.luau

Direct 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:

Commands

list (or ls)

List all registered functions with their descriptions.

Interactive:

Direct:

JSON Output:

desc (or describe)

Show detailed information about a function including parameters, types, and usage examples.

Interactive:

Direct:

Output 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:

Direct:

JSON Output:

load <file.luau>

Load a Luau file containing function definitions.

Interactive:

Direct:

help (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

Strings

Enclose in double quotes:

Booleans

Arrays (1D)

Use JSON-style square bracket syntax:

Arrays (2D)

For multi-dimensional arrays, nest arrays in row-major order:

Mixed Arguments

Output Formats

Scalar Values

Strings

Booleans

Multi-dimensional Arrays (Matrices)

The CLI displays arrays in a formatted table with column labels (A, B, C...) and row numbers:

JSON Output

All values are converted to JSON format:

JSON Types:

  • Numbers: 42.5

  • Strings: "text"

  • Booleans: true, false

  • Null/Nil: null

  • Arrays: [[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.

--json

Output results in JSON format (non-interactive mode only).

--help, -h

Display help information and exit.

Examples

Interactive Session

Automated Scripting

Platform Support

  • macOS: Full readline support with editline

  • Linux: Full readline support with GNU readline

  • Windows: Basic line editing (no readline history)

chevron-rightError Handlinghashtag

The CLI provides clear error messages:

In JSON mode, errors are returned as JSON objects:

chevron-rightExit Codeshashtag
  • 0: Success

  • 1: Error (function not found, invalid arguments, execution error, etc.)

Top tips

  1. Use Tab Completion: On macOS/Linux, readline provides command history navigation with up/down arrows

  2. JSON for Scripts: Use --json flag when calling from scripts for easier parsing

  3. Pre-load Functions: Use --load to automatically load your function library

  4. Test Before Excel: Use the CLI to test and debug functions before using them in Excel

  5. Check Function Signatures: Use desc to see parameter types and descriptions

Last updated