Grenton and ChatGPT: what works and what doesn't exist
OMP Studio doesn't integrate with the ChatGPT app. It drives OpenAI's Codex CLI, which can sign in with a ChatGPT account (what's included depends on your plan) and, once its config allows it, works directly in a copy of the project.
Two ways to use ChatGPT with Grenton scripts
| Pasting into ChatGPT | Codex CLI through OMP Studio | |
|---|---|---|
| Project knowledge | Only what you paste | Objects and scripts inventory in project-index.json |
| Grenton Lua dialect | Only if you describe it | Described in AGENTS.md |
| Saving changes | You copy by hand | Edits files, visible live in the editor |
| Checking | You paste the result into the editor | omps lint, the same rules as the editor |
Pasting is still possible: paste code written in ChatGPT into the editor, and the checks flag things like unknown objects, semicolons or local variables passed to another CLU. ChatGPT itself still can't see your project.
Using your ChatGPT plan through Codex
- Install Codex CLI:
npm install -g @openai/codex. - Run
codex loginand sign in with your ChatGPT account. - Let Codex edit the project: add the settings shown below this list to
~/.codex/config.toml. - Select the agent:
omps ai codex. - Open the project with
omps MyProject.ompand write in the editor's AI box. Without installing, usenpx @omp-studio/ompsinstead ofomps.
sandbox_mode = "workspace-write"
[sandbox_workspace_write]
network_access = trueWithout write access Codex can't edit scripts, and omps commands talk to the running session on this computer, so they need network access. On Codex CLI 0.166.0 with no config of your own, codex exec can neither write files nor reach 127.0.0.1. Put sandbox_mode before the first section in square brackets.
network_access also lets Codex's commands reach the internet, not only this computer. OMP Studio passes Codex no sandbox settings, so these permissions are yours to set in its config.
Codex availability and limits depend on your plan. OpenAI has the current details: using Codex with your ChatGPT plan and Codex authentication. An API key is billed separately at API pricing.
Grenton and Codex has the run details, and Grenton and AI compares all the agents.
Worth remembering with code from a chat
- Ordinary Lua habits such as semicolons don't work: Grenton's parser rejects them.
->syntax and cross-CLU calls have their own rules, covered in the Grenton Lua guide.- Object names have to match your project, and a chat doesn't know them unless you say.
- Pasting code hands it to the chat provider, so think before pasting client data.
To see how the editor reacts to code from a chat, paste it into the demo, which runs in the browser with no install, on a sample project. The rules apply there just the same, and unknown names show up at once, because the sample has its own objects. In the demo, AI only shows an example answer, since the agent needs a connected project and your computer.
Common questions
Is there an OMP Studio app in ChatGPT?
No. There is no ChatGPT app integration.
Do I need an OpenAI API key?
Not necessarily. Codex CLI can sign in with a ChatGPT account, depending on your plan. An API key is billed separately.
Can I just paste code from ChatGPT into the editor?
Yes. The editor checks it the same way as code written by hand.