LuaScripting.CSharpHost 1.0.0

dotnet tool install --global LuaScripting.CSharpHost --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local LuaScripting.CSharpHost --version 1.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=LuaScripting.CSharpHost&version=1.0.0
                    
nuke :add-package LuaScripting.CSharpHost --version 1.0.0
                    

LuaScripting.CSharpHost - A .NET Tool for Lua Scripting

Overview

LuaScripting.CSharpHost is a minimalist .NET tool for executing Lua scripts with ultimate simplicity. Built on top of the NLua library, it provides a clean command-line interface to run Lua code quickly and efficiently.

The tool utilizes just one line of C# code to create a Lua runtime instance and execute your script:

new NLua.Lua().DoFile(args[0]);

Key Features

  • Easy Installation: Install as a global .NET tool
  • Simple Usage: Run Lua scripts with a single command
  • Seamless Lua Integration: Uses the NLua library for robust Lua scripting
  • Cross-Platform: Runs anywhere .NET 10 is supported

Prerequisites

Installation

Install the tool globally using .NET CLI:

dotnet tool install --global LuaScripting.CSharpHost

Usage

Run Lua scripts using the luahost command:

luahost path/to/your/script.lua

Example: luahost examples/HelloWorld.lua

Example Lua Scripts

Project Structure

LuaScripting.CSharpHost/
├── LuaHost/
│   ├── LuaHost.csproj    # Project configuration
│   └── Program.cs        # Main entry point
├── examples/             # Example Lua scripts
├── LICENSE
└── README.md

How It Works

  1. The tool is installed as a .NET global tool
  2. The NLua library provides the Lua scripting engine
  3. The host reads the specified Lua file and executes it using the Lua engine

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

Acknowledgements

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.0 106 6/12/2026