Grenton and Claude: Claude Code in your project
OMP Studio can use Claude Code as its agent for Grenton Lua scripts. Claude Code runs locally, under your own account, in the project's working copy, and you talk to it from the editor's AI box.
Setup
- Install the agent:
npm install -g @anthropic-ai/claude-code. - Sign in: run
claudeonce and sign in. - Select the agent in OMP Studio:
omps ai claude. This also health-checks it. - Open the project:
omps MyProject.omp. The AI box is in the editor's bottom panel. Theompscommand is available after installing; without that, usenpx @omp-studio/ompsinstead ofomps.
How OMP Studio runs Claude Code
Each question is a claude -p run in the project's working folder, in acceptEdits mode, so file edits are accepted without extra prompts. The allowed shell commands include omps lint, omps script and omps event. Sessions continue by their own id, so a follow-up goes to the same conversation and not to someone else's session in that folder.
Claude Code reads CLAUDE.md, which describes the project: where scripts live, how -> works, what not to change by hand. project-index.json gives it the real object and feature names, and you see progress in the editor during the run.
What it helps with
- Writing or fixing a script using objects that really exist in the project.
- Explaining where a script is called from, based on event bindings and other scripts.
- Fixing errors reported by
omps lint, such as a local variable passed to another CLU. - Wiring a script to an event with
omps event add.
The language rules the agent follows are in the Grenton Lua guide. What applies to every agent is in Grenton and AI. Prefer OpenAI's tool? See Grenton and Codex.
What to expect
While the agent runs, the editor is read-only and edits appear live. Sending the project to the CLUs is always yours to do, in Object Manager. The agent can't test a script on an installation: it can only check it with omps lint and read the code.
Claude Code can't change every script: visual scripts are read-only, and adding, renaming or deleting a script goes through omps commands, which refuse while something still calls it. Edits land in the same working copy as those from the editor, so the same sync scope applies. Your .omp file stays on your machine. Scripts, the project index and editor data (room layout, myGrenton screens) sync to the cloud. system.xml and the project cipher key stay local.
Common questions
Do I need a Claude account?
Yes. Claude Code runs under your account, which OMP Studio doesn't supply. Anthropic sets the terms and limits.
Does this work with the Claude app in a browser?
No. OMP Studio drives the Claude Code program on your computer.
What if Claude breaks a script?
Every change is in a local git history. omps history lists the versions, and omps restore rolls back to one, with a backup.