Ian Nuttall

Part entrepreneur, part marketer, part software engineer using AI to build stuff on the internet.

Give Claude an OpenAI CLI for code research

/ 26,236 views / via X

Claude Code pro tip for GPT-5:

Ask it to write a CLI for OpenAI, give it simple tools and write a CLAUDE.⁠md

Claude can then research your codebase, find complex bugs, build plans + features using GPT-5 (when it launches)

Example bash alias below so you can run things like:

oai "@⁠src/ Summarize the architecture and main components"
# OpenAI CLI function
oai() {
    # Set API key if not already set
    if [ -z "$OPENAI_API_KEY" ]; then
        export OPENAI_API_KEY='sk-proj-1234567890'
    fi
    
    # Run the openai CLI with all arguments
    /Users/iannuttall/dev/cli/openai/openai "$@"
}

Image from the original X post

You can also ask Claude to use codex in non-interactive mode:

codex exec "explain utils.ts"

https://github.com/openai/codex

Ian's List

Join 15k+ subscribers