OpenAI Codex Support
Trunk Code Quality for OpenAI Codex
This document provides guidance for integrating Trunk Code Quality into OpenAI Codex environments.
Requirements
Ensure you’re running the following minimum versions in your .trunk/trunk.yaml
file:
Trunk CLI: v1.24.0 or later
Trunk Plugins: v1.7.0 or later
Installation
In your Codex environment setup script, include:
It's important to pre-install all trunk dependencies during the setup because codex environments are network-isolated post-setup.
Debugging Installation
If the environment setup is slow, run the following to diagnose:
This command will detail installation timings and potential bottlenecks.
Handling Network Isolation
Codex environments are network-isolated post-setup. Linters requiring network access must be excluded from running explicitly:
Example:
Teaching Codex how to use Trunk
Codex can automatically run trunk commands for you, by informing it to do so in your AGENTS.md file:
Last updated