View the DEMO video here with setup instructions and examples
Improved version of Godex. Integrate the OpenAI Codex CLI directly into the Godot editor. This plugin lets you ask questions, insert code, and request fixes from inside the Script Editor, using a locally installed Codex CLI (no API key in the plugin). This plugis in NOT BUILT for vibe coding, don't let it create your whole project!! It only has permissions to read files, inserting code and writing to the editor is handled manually by the plugin for more fine-grained control.
- ASK: ask questions about your project and get answers in-editor.
- INSERT: generate code at a specific cursor location.
- FIX: select a block and ask Codex to refactor or correct it.
- In‑editor output: results show up in the editor and (for FIX/ASK) a popup with a preview.
- Context: has full project context and read access, and remembers conversations.
- Customizing: easily change the behavior, formatting and skills that Godex respects.
- Godot 4.5+
- OpenAI Codex CLI installed on your machine
- Terminal access from your OS PATH
- Copy this plugin folder into your project, or use the asset library within the Godot engine:
res://addons/godex-cli/
- Enable it in Project → Project Settings → Plugins.
This plugin calls the
codexCLI executable under the hood.
- Install the Codex CLI (follow OpenAI’s official instructions):
npm i -g @openai/codex
# make sure you check out the official codex guidelines
- Verify it works:
codex --version
- Make sure your OpenAI account is authenticated for the CLI.
The plugin reads a folder of context instructions and prepends them to every prompt.
- Default location:
res://addons/godex-cli/context/
- You can change it via:
Editor Settings → GodexCLI/context_dir
Any Markdown files in that folder can be used to control formatting, behavior, and response schema.
The plugin will store its last session ID and resume where you left off. This is on a per-project basis. You can share a session ID over multiple projects if they overlap.
- You can find and load a key via:
Project Settings → GodexCLI/session_id
Type a question at your cursor with the ASK syntax "#(~)#":
#( How can I cache a JSON file in Godot? )#The plugin removes the line and displays the answer in the editor output. When you ask for examples, it will use a popup window to show the code example.
Use the INSERT syntax "#/~/#" to generate code at the current line:
#/ Create a simple player movement function for a CharacterBody2D /#Godex will return a code block and the plugin inserts it at the marked line.
Wrap a block with FIX markers "#/~/#" and a prompt:
#/ improve the error handling and explain the logic
func _process(delta: float) -> void:
... your code ...
/#Godex returns a suggested rewrite or analysis. A popup window lets you compare, make changes and accept it.
- INSERT: replaces the marker line with generated code.
- FIX: opens a review popup with old + new code.
- ASK: opens a popup if a code sample is returned, otherwise prints text.
The plugin does nothing / no response
- Make sure
codexis on your PATH. - Check the Godot output panel for process errors.
addons/godex-cli/
├── context/
│ └── main.md
├── scenes/
│ ├── fix_window.gd
│ └── fix_window.tscn
├── godex-cli-main.gd
├── plugin.cfg
└── godex-cli-main.gd.uid
- Better error surfacing in UI
- Session history
- More robust JSON parsing / buffered output handling
- Custom hotkeys for ASK/INSERT/FIX
- Extra functionality
- Optional custom hooks and prompts
Created by Ben Heirbaut.
MIT


