cd /news/developer-tools/show-hn-lunar-a-coding-harness-exten… · home topics developer-tools article
[ARTICLE · art-105847] src=github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Show HN: Lunar, a coding harness extensible via Lua

Lunar, a terminal coding harness extensible via Lua, has been released as an open-source tool on GitHub by developer gszr. It provides four tools—read, write, edit, and bash—and supports any OpenAI Chat Completions-compatible endpoint, including xAI's Grok-4.6 model. Lunar is early software for macOS and Linux, with Lua extensions and the Responses API planned but not yet implemented.

read2 min views9 publishedAug 21, 2026
Show HN: Lunar, a coding harness extensible via Lua
Image: Michielbdejong (auto-discovered)

A terminal coding harness. You open lunar

and code.

Simple and fast like Pi <3, but using Lua for extensions.

Lunar gives the model four tools—read

, write

, edit

, and bash

—without imposing a workflow.

brew install --HEAD gszr/taps/lunar

Or with Cargo:

cargo install --git https://github.com/gszr/lunar

With no ~/.lunar/init.lua

, set an API key, an OpenAI Chat Completions base URL, and a model:

export LUNAR_API_KEY=...
export LUNAR_BASE_URL=https://api.x.ai/v1
export LUNAR_MODEL=grok-4.6

Any OpenAI Chat Completions-compatible endpoint should work.

For lasting configuration, create ~/.lunar/init.lua

. From Lunar, /config

opens this file with $VISUAL

or $EDITOR

, then reloads it when the editor exits. Read the key from the environment:

lunar.models {
  grok46 = {
    id = "grok-4.6",
    window = 500000,
  },
}

lunar.providers {
  xai = {
    base_url = "https://api.x.ai/v1",
    key_name = "XAI_API_KEY",
    models = {
      "grok46"
    },
  },
}

lunar.defaults {
  provider = "xai",
  model = "grok46",
}
export XAI_API_KEY=...

Or let Lunar store the credential. Use /login

in the TUI (xAI subscription via device code, or a masked API key). /logout

removes it.

lunar.models {
  grok46 = {
    id = "grok-4.6",
    window = 500000,
  },
}

lunar.providers {
  xai = {
    base_url = "https://api.x.ai/v1",
    key_in = "auth",
    auth_provider = "xai",
    models = {
      "grok46"
    },
  },
}

lunar.defaults {
  provider = "xai",
  model = "grok46",
}
lunar

Type a prompt and press Enter. Run /help

to see the available commands. Use /config

to edit and reload init.lua

, or lunar -c

to continue the latest mission for the current directory.

Lunar includes AGENTS.md

, CONTEXT.md

, and summaries from .agents/skills/*/SKILL.md

in its context.

Lua extensions are planned. For example, you will be able to replace local bash

with execution in a Runta runtime:

-- Planned API; not implemented yet.
lunar.tools.bash = function(cmd)
  local runtime = os.getenv("LUNAR_RUNTIME") or "demo"
  return lunar.sh { "runta", "exec", runtime, "--", "sh", "-lc", cmd }
end

Lunar is early software for macOS and Linux. It currently supports OpenAI Chat Completions endpoints. Lua extensions and the Responses API are not implemented yet.

── more in #developer-tools 4 stories · sorted by recency
── more on @lunar 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-lunar-a-codi…] indexed:0 read:2min 2026-08-21 ·