git404hub

what is luna fr?

oniondas/luna — explained in plain English

Analysis updated 2026-05-18

4PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

tl;dr

A local gateway that lets your code talk to AI subscription apps you already pay for through a single OpenAI-style API.

vibe map

mindmap
  root((Luna))
    What it does
      OpenAI compatible gateway
      Routes by model name
      Local terminal chat client
    Tech stack
      Python
      FastAPI
      Grok CLI
      Codex CLI
    Use cases
      Reuse existing AI subscriptions
      Build personal projects
      Test multiple AI backends
    Audience
      Developers
      Hobbyist builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Point an OpenAI compatible tool at your existing Claude, Grok, or Codex subscription instead of buying separate API credits.

VIBE 2

Build a personal script or small app that chats with an AI backend without writing custom integration code for each one.

VIBE 3

Add support for a new AI backend by writing one small Python file with two functions.

what's the stack?

PythonFastAPIGrok CLICodex CLI

how it stacks up fr

oniondas/luna1038lab/agnes-aiadeliox/klein-head-swap
Stars444
LanguagePythonPythonPython
Setup difficultymoderateeasymoderate
Complexity3/52/53/5
Audiencedevelopervibe coderdesigner

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · moderate time til it works · 30min

Requires you to already have accounts and CLIs like Grok CLI, Codex CLI, or the Claude Desktop App installed and logged in separately.

MIT license: you can use, copy, modify, and share this freely, including for commercial purposes, as long as the original copyright notice stays included.

in plain english

Luna is a small local server that sits between your own code and the AI subscription apps you already pay for, such as Claude, Grok, or Codex. Many programs and coding tools expect to talk to an AI service using the OpenAI API format, but not every app you subscribe to speaks that format natively. Luna translates between the two, so a tool built for OpenAI's API can instead send its requests through Luna to whichever subscription based app you have logged into on your own computer. Once running, Luna exposes the same two endpoints that OpenAI's API uses, one for listing available models and one for chat responses. Any existing code, library, or command line tool built to talk to OpenAI can be pointed at Luna's local address instead, with no changes needed to that code. Behind the scenes, Luna decides which backend to use based on the model name in the request, then forwards it to the matching engine, whether that is the Grok API, the Codex command line tool, or the Windows Claude Desktop app. Support for new backends is meant to be simple to add: a single Python file with two functions, one that lists the models a backend offers and one that generates a response, plugged into a small registration list inside the main gateway file. Luna also ships with an optional terminal based chat client for trying things out directly, complete with a moon phase animation while a response is being generated. Right now Luna works with Codex, the Grok command line tool, and the Windows version of the Claude Desktop app, with streaming responses and support for more backends listed as planned but not yet built. It is written in Python using FastAPI, and requires the underlying tools such as Grok CLI or Codex CLI to already be installed and logged in separately. It is released under the MIT license.

prompts (copy fr)

prompt 1
Help me install Luna and point the OpenAI Python SDK at my local gateway instead of the real OpenAI API.
prompt 2
Explain how Luna decides which backend, Grok, Codex, or Claude, to route a chat request to based on the model name.
prompt 3
Walk me through writing a new engine file for Luna so it can talk to a backend that isn't supported yet.
prompt 4
Show me how to run Luna's terminal chat client and switch between the available models it detects.

Frequently asked questions

what is luna fr?

A local gateway that lets your code talk to AI subscription apps you already pay for through a single OpenAI-style API.

What language is luna written in?

Mainly Python. The stack also includes Python, FastAPI, Grok CLI.

What license does luna use?

MIT license: you can use, copy, modify, and share this freely, including for commercial purposes, as long as the original copyright notice stays included.

How hard is luna to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is luna for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.