Lunar is an experimental coding harness that empowers users to code using Lua with a simple terminal interface. It offers essential tools for reading, writing, editing, and executing commands without imposing strict workflows. Designed for speed and flexibility, Lunar streamlines coding and enhances productivity while allowing for easy extension through Lua scripts.
Lunar is an experimental terminal coding harness designed specifically for Lua scripting. It enables users to quickly initiate coding sessions through a straightforward interface. With Lunar, the coding experience is both simple and efficient, similar to the functionality provided by Pi but with the added flexibility of Lua for extensions.
The core functionality of Lunar revolves around four primary tools: read, write, edit, and bash. This structure does not impose a rigid workflow, allowing for diverse coding methodologies tailored to different user preferences.
To begin utilizing Lunar, simply run the command:
lunar
Enter a prompt and press Enter to start. The /help command will display available commands, while the /config command allows users to edit and reload the configuration file conveniently.
Users can configure Lunar by setting an API key and defining an OpenAI Chat Completions base URL, along with the desired model:
export LUNAR_API_KEY=...
export LUNAR_BASE_URL=https://api.x.ai/v1
export LUNAR_MODEL=grok-4.6
For persistent settings, create a ~/.lunar/init.lua configuration file, where various models and providers can be defined. This setup allows for much greater customization and integration with services like OpenAI's GPT models.
Future versions of Lunar aim to support Lua extensions, offering robust functionalities such as remote execution capabilities in a Runta runtime environment. For example, the planned functionality for executing local Bash commands could be implemented as follows:
lunar.tools.bash = function(cmd)
local runtime = os.getenv("LUNAR_RUNTIME") or "demo"
return lunar.sh { "runta", "exec", runtime, "--", "sh", "-lc", cmd }
end
Currently, Lunar is in its early development stages, supporting macOS and Linux platforms, specifically tailored to work with OpenAI Chat Completions endpoints. While Lua extensions are on the roadmap, they are not yet implemented, maintaining a focus on providing a solid core experience for developers looking to experiment with Lua scripting within a coding harness.
No comments yet.
Sign in to be the first to comment.