|
1 | | -# Luu Code |
| 1 | +<div align="center"> |
| 2 | + <img src="assets/banner.png" alt="Luu Code" width="680"> |
| 3 | +</div> |
2 | 4 |
|
3 | | -**Use Claude Code or Codex with Roblox Studio.** |
| 5 | +<div align="center"> |
4 | 6 |
|
5 | | -Luu Code is an open-source Roblox Studio harness for coding agents. It gives the agent you already use the ability to inspect and edit your place, run it, watch what happens, interact with it, and check its own work. |
| 7 | +**Use Claude Code or Codex with Roblox Studio.** |
6 | 8 |
|
7 | | -It is not another AI Roblox builder. There are no credits to buy, no model API key to provide, and no proprietary agent inside it. You bring Claude Code or Codex; Luu Code brings Roblox Studio. |
| 9 | +</div> |
8 | 10 |
|
9 | 11 | --- |
10 | 12 |
|
11 | | -## Why |
12 | | - |
13 | | -Coding agents are good at editing files and blind to everything else about a Roblox project. |
14 | | - |
15 | | -Most of a Roblox game does not exist on disk at all. The DataModel, script sources, GUI layout, and runtime state live inside Studio, where an agent that only reads files cannot reach them. |
| 13 | +Luu Code hands your coding agent the keys to your open place. It can read the DataModel, edit scripts, press Play, watch the output, click around the running game, take screenshots, and fix what it broke — while you watch. |
16 | 14 |
|
17 | | -So a coding agent can describe a change but not make it, and certainly not check it: it cannot press Play, read the error that appeared, click the button it just wired up, or tell whether any of it worked. |
18 | | - |
19 | | -Luu Code gives it the Studio connection that closes that gap. It works through Studio only — it does not read or write your files. |
| 15 | +You bring Claude Code or Codex. Luu Code brings Studio. There are no credits, no API key, and no AI of its own. |
20 | 16 |
|
21 | 17 | ## What the agent can do |
22 | 18 |
|
23 | 19 | | | | |
24 | 20 | |---|---| |
25 | | -| **Inspect** | Services, instance trees, properties, attributes, tags, selection, script source | |
26 | | -| **Edit** | Create, delete, rename, reparent, clone, set properties, targeted script edits | |
27 | | -| **Playtest** | Start and stop Play or Run mode, wait for the session to be ready, restart | |
28 | | -| **Observe** | Studio output with cursors, so "what did *my* change break" is answerable | |
29 | | -| **Runtime** | Live players, characters, PlayerGui, camera, and arbitrary Luau evaluation | |
30 | | -| **See** | Screenshots of the Studio window, passed straight into multimodal agents | |
31 | | -| **Interact** | Keyboard, mouse, and GUI clicks resolved to real on-screen elements | |
| 21 | +| **Look around** | Services, instance trees, properties, attributes, tags, your selection, script source | |
| 22 | +| **Change things** | Create, delete, rename, reparent, clone, set properties, edit scripts | |
| 23 | +| **Playtest** | Start and stop Play and Run mode, restart, wait for the game to be ready | |
| 24 | +| **Read output** | Everything Studio prints, including the error your last change caused | |
| 25 | +| **Poke the game** | Players, characters, PlayerGui, the camera, and Luau it runs live | |
| 26 | +| **See the screen** | Screenshots of Studio, handed straight to the agent | |
| 27 | +| **Play the game** | Keyboard, mouse, and clicks on real on-screen buttons | |
32 | 28 |
|
33 | | -Every operation reports what it actually changed, or fails with a code the agent can act on. |
| 29 | +## Before you start |
34 | 30 |
|
35 | | -## Install |
| 31 | +- **Roblox Studio** |
| 32 | +- **Claude Code or Codex**, installed and signed in — Luu Code drives whichever you have |
| 33 | +- **Node 20.11+ and pnpm**, to build the app |
| 34 | +- **[Luumen](https://luumen.dev) (`luu`)**, to build the Studio plugin |
36 | 35 |
|
37 | | -The harness is a pnpm + Turborepo workspace. The Studio plugin is a [Luumen](https://luumen.dev) project, so it is built with `luu`. |
| 36 | +## Install |
38 | 37 |
|
39 | 38 | ```bash |
40 | 39 | pnpm install |
41 | 40 | pnpm build |
42 | 41 |
|
43 | 42 | cd plugin |
44 | | -luu install # Rojo, StyLua, Selene, luau-lsp, Lune, via Rokit (build tooling only) |
| 43 | +luu install # build tools, via Rokit |
45 | 44 | luu build # builds straight into your Studio plugins folder |
46 | 45 | ``` |
47 | 46 |
|
48 | | -Then restart Roblox Studio. The Luu Code panel appears in the Plugins tab. |
| 47 | +Restart Roblox Studio. **Luu Code** appears in the Plugins tab. |
49 | 48 |
|
50 | | -While working on the plugin, `luu dev` rebuilds into the plugins folder on every save. |
| 49 | +## Start |
51 | 50 |
|
52 | | -### First run |
| 51 | +```bash |
| 52 | +pnpm dev |
| 53 | +``` |
53 | 54 |
|
54 | 55 | 1. Open your place in Roblox Studio. |
55 | | -2. Start Luu Code (`pnpm dev`) or the server alone (`pnpm serve`). |
56 | | -3. Studio shows a six-digit code. Approve it in Luu Code. |
57 | | -4. Pick Claude Code or Codex, and describe what you want changed. |
| 56 | +2. Studio shows a six-digit code. |
| 57 | +3. Approve it in Luu Code — check the digits match. |
| 58 | +4. Pick a model, and say what you want changed. |
58 | 59 |
|
59 | | -The pairing step exists so that discovering the local port is not enough to control your Studio session. See [docs/security.md](docs/security.md). |
| 60 | +Try: |
60 | 61 |
|
61 | | -## Using it from another agent interface |
| 62 | +> The shop errors when I click Buy. Play it, find out why, and fix it. |
62 | 63 |
|
63 | | -Luu Code exposes the same Roblox capabilities over a local MCP server, so you can keep whatever agent interface you already prefer: |
| 64 | +> Make the lobby spawn brighter, then show me a screenshot. |
64 | 65 |
|
65 | | -```bash |
66 | | -claude mcp add luu-code -- luu-code-mcp |
67 | | -``` |
| 66 | +Chats are saved per place. Open a place and its history is there. |
68 | 67 |
|
69 | | -```toml |
70 | | -# ~/.codex/config.toml |
71 | | -[mcp_servers.luu-code] |
72 | | -command = "luu-code-mcp" |
73 | | -``` |
| 68 | +## What it is allowed to do |
74 | 69 |
|
75 | | -It attaches to a running Luu Code server if there is one, and starts its own if not. The Electron app does not need to be open. See [docs/mcp.md](docs/mcp.md). |
| 70 | +The chip beside the send button controls the agent's access — looking, editing, playtesting, running Luau, sending input, and screenshots, each on its own switch. Turn any of them off mid-conversation and the agent is told it no longer has them. |
76 | 71 |
|
77 | | -## Conversations belong to a place |
| 72 | +Studio only connects after you approve a pairing code, so knowing the port is not enough to reach your place. Everything runs on `127.0.0.1` and nothing is sent anywhere. |
78 | 73 |
|
79 | | -A chat is filed against the Roblox place it is about, not a folder on disk. Open a place, and its past conversations are there; connect a different place, and you get that one's. |
| 74 | +Luu Code works through Studio. It does not read or write your files. |
80 | 75 |
|
81 | | -Studio has to be connected before a conversation can start, because otherwise there is nowhere to file it. |
| 76 | +## Prefer your own terminal? |
82 | 77 |
|
83 | | -## Layout |
| 78 | +The same Roblox tools are available over MCP, so you can skip the app: |
84 | 79 |
|
85 | | -``` |
86 | | -packages/protocol/ Shared operation, value, and error definitions |
87 | | -packages/server/ Local server: Studio bridge, permissions, CLI, MCP |
88 | | -packages/app/ Electron harness and agent adapters |
89 | | -plugin/ Roblox Studio plugin (Luau) |
90 | | -docs/ Architecture, protocol, MCP, plugin, security |
| 80 | +```bash |
| 81 | +claude mcp add luu-code -- luu-code-mcp |
91 | 82 | ``` |
92 | 83 |
|
93 | | -## Documentation |
| 84 | +```toml |
| 85 | +# ~/.codex/config.toml |
| 86 | +[mcp_servers.luu-code] |
| 87 | +command = "luu-code-mcp" |
| 88 | +``` |
94 | 89 |
|
95 | | -- [Architecture](docs/architecture.md) — how the pieces fit and why |
96 | | -- [Protocol](docs/protocol.md) — operations, values, targets, errors |
97 | | -- [MCP setup](docs/mcp.md) — connecting an external agent |
98 | | -- [Studio plugin](docs/plugin.md) — building, installing, capabilities |
99 | | -- [Security and privacy](docs/security.md) — trust model and what stays local |
| 90 | +It joins a running Luu Code server, or starts one. The app does not have to be open — only Studio. |
100 | 91 |
|
101 | 92 | ## Development |
102 | 93 |
|
103 | 94 | ```bash |
104 | | -pnpm build # protocol, server, app, through Turborepo |
105 | | -pnpm test # protocol and server test suites |
106 | | -pnpm typecheck |
107 | | -pnpm check # all of the above, plus the plugin checks |
| 95 | +pnpm dev # the app, with reload |
| 96 | +pnpm serve # the server on its own |
| 97 | +pnpm check # build, typecheck, test, plugin lint |
| 98 | +pnpm assets:icons # re-render the icons from assets/icon.svg |
108 | 99 |
|
109 | 100 | cd plugin |
110 | | -luu run check # stylua, selene, luau-lsp |
| 101 | +luu dev # rebuild into the plugins folder on every save |
111 | 102 | ``` |
112 | 103 |
|
113 | | -## Contributing |
114 | | - |
115 | | -See [CONTRIBUTING.md](CONTRIBUTING.md). The Studio connection layer is deliberately isolated so that Roblox changes can be absorbed without touching the harness. |
| 104 | +See [CONTRIBUTING.md](CONTRIBUTING.md). |
116 | 105 |
|
117 | 106 | ## License |
118 | 107 |
|
|
0 commit comments