Skip to content

Instantly share code, notes, and snippets.

@develpudu
Forked from niemyjski/cdx.ps1
Created September 22, 2025 23:52
Show Gist options
  • Select an option

  • Save develpudu/0f7b3704fafa904fd6e6fdbef38723fc to your computer and use it in GitHub Desktop.

Select an option

Save develpudu/0f7b3704fafa904fd6e6fdbef38723fc 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