Skip to content

Instantly share code, notes, and snippets.

@niemyjski
Created September 17, 2025 13:07
Show Gist options
  • Select an option

  • Save niemyjski/3a831a4912f4f525d140cc8599893e89 to your computer and use it in GitHub Desktop.

Select an option

Save niemyjski/3a831a4912f4f525d140cc8599893e89 to your computer and use it in GitHub Desktop.
Codex CLI Pro Powershell - GPT-5 automode with Search
# based on https://x.com/iannuttall/status/1967902687078519225
# MacOS ~/.config/powershell/profile.ps1
function cdx {
param(
[string]$Command,
[Parameter(ValueFromRemainingArguments=$true)]
[string[]]$Arguments
)
if ($Command -eq "update") {
npm install -g @openai/codex@latest
} else {
$searchArgs = @($Command) + $Arguments
codex --model 'gpt-5-codex' --full-auto -c model_reasoning_summary_format=experimental --search @searchArgs
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment