Clone this repository at <script src="https://gist.github.com/zikhan/13b2d702fbd4e5c5e357b3b2e62ba186.js"></script>
Save zikhan/13b2d702fbd4e5c5e357b3b2e62ba186 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
|
# $stopwatch = [System.Diagnostics.Stopwatch]::StartNew(); |
|
|
|
Class AWSProfiles : System.Management.Automation.IValidateSetValuesGenerator { |
|
[string[]] GetValidValues() { |
|
return [string[]] (aws configure list-profiles) |
|
} |
|
} |
|
|
|
Class EKSContexts : System.Management.Automation.IValidateSetValuesGenerator { |
|
[string[]] GetValidValues() { |
|
return [string[]] (kubectl config get-contexts -o name) |
|
} |
|
} |
|
|
|
Class TCPCLIContexts : System.Management.Automation.IValidateSetValuesGenerator { |
|
[string[]] GetValidValues() { |
|
return [string[]] (tcp-cli config list --output json --no-headers | ConvertFrom-Json | Select-Object -ExpandProperty Name | % {$_.Trim("*", " ")}) |
|
} |
|
} |
|
|
|
function Switch-TCPENV { |
|
param ( |
|
[ValidateSet([AWSProfiles])] |
|
[string] |
|
$awsprofile, |
|
[ValidateSet([EKSContexts])] |
|
[string] |
|
$ekscontext, |
|
[ValidateSet([TCPCLIContexts])] |
|
[string] |
|
$tcpclienv |
|
) |
|
|
|
$env:AWS_PROFILE=$awsprofile |
|
kubectl config use-context $ekscontext |
|
tcp-cli config use $tcpclienv |
|
} |
|
|
|
function Clear-TCPENV { |
|
$env:AWS_PROFILE=''; |
|
if ((kubectl config get-contexts -o name) -contains 'docker-desktop'){ |
|
kubectl config use-context docker-desktop; |
|
} |
|
else { |
|
kubectl config unset current-context; |
|
} |
|
tcp-cli config use unset; |
|
} |
|
|
|
function tcpci { |
|
Switch-TCPENV cdsso_dev tcpci-1-eks tcpci |
|
} |
|
|
|
function tcpqa { |
|
Switch-TCPENV cdsso_dev tcpqa-1-eks tcpqa |
|
} |
|
|
|
Class CorpRepos : System.Management.Automation.IValidateSetValuesGenerator { |
|
[string[]] GetValidValues() { |
|
$folders = @(); |
|
if (-not [System.String]::IsNullOrEmpty($env:CorpdevLocation)){ |
|
$folders = Get-ChildItem $env:CorpdevLocation -Directory -Name | % {$_} |
|
$folders += ".." |
|
} |
|
return [string[]]$folders; |
|
} |
|
} |
|
|
|
function cdrepo { |
|
param ( |
|
[ValidateSet([CorpRepos])] |
|
[string] |
|
$repo |
|
) |
|
if (-not [System.String]::IsNullOrEmpty($env:CorpdevLocation)){ |
|
if ([System.String]::IsNullOrEmpty($repo)){ |
|
Set-Location $env:CorpdevLocation |
|
} |
|
else { |
|
Join-Path -Path $env:CorpdevLocation,$repo -ChildPath '' | Set-Location |
|
} |
|
} |
|
else { |
|
Write-Host "Couldn't find corpdev location" |
|
} |
|
} |
|
|
|
function startsln { |
|
$slns = Get-ChildItem -Path *.sln,*.slnx; |
|
if ($slns.Count -eq 1) { |
|
start $slns |
|
} |
|
elseif ($slns.Count -gt 1) { |
|
$sln = $slns | Select-Object -ExpandProperty FullName | Out-ConsoleGridView -OutputMode Single -MinUI; |
|
start $sln |
|
} |
|
elseif ($slns.Count -eq 0) { |
|
$projs = Get-ChildItem -Path *.csproj,*.esproj,*.fsproj; |
|
if ($projs.Count -eq 1) { |
|
start $projs |
|
} |
|
elseif ($projs.Count -gt 1) { |
|
$proj = $projs | Select-Object -ExpandProperty FullName | Out-ConsoleGridView -OutputMode Single -MinUI; |
|
start $proj |
|
} |
|
} |
|
else { |
|
Write-Output "No SLN or PROJECT file found" |
|
} |
|
} |
|
# $stopwatch.Stop(); |
|
# Write-Host "Load up took $($stopwatch.ElapsedMilliseconds) ms"; |
|
|
|
# Check if custom module is installed |
|
if (Get-Module -ListAvailable -Name 'posh-git' -ErrorAction SilentlyContinue) { |
|
# $stopwatch.Start(); |
|
Import-Module posh-git > $null; |
|
$env:POSH_GIT_ENABLED=$true |
|
# $stopwatch.Stop(); |
|
# Write-Host "posh-git ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
else { |
|
Write-Warning "Missing git support, install posh-git with 'Install-Module posh-git' and restart pwsh." |
|
} |
|
if (Get-Module -ListAvailable -Name 'DockerCompletion' -ErrorAction SilentlyContinue) { |
|
# $stopwatch.Restart(); |
|
Import-Module DockerCompletion > $null |
|
# $stopwatch.Stop(); |
|
# Write-Host "DockerCompletion ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
else { |
|
Write-Warning "Missing docker support, install DockerCompletion with 'Install-Module DockerCompletion' and restart pwsh." |
|
} |
|
|
|
if (Get-Module -ListAvailable -Name 'Get-ChildItemColor' -ErrorAction SilentlyContinue) { |
|
# $stopwatch.Restart(); |
|
Import-Module Get-ChildItemColor > $null |
|
# $stopwatch.Stop(); |
|
# Write-Host "ls color ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
else { |
|
Write-Warning "Missing ls color support, install with 'Install-Module Get-ChildItemColor -AllowClobber' and restart pwsh." |
|
} |
|
if (Get-Module -ListAvailable -Name Microsoft.PowerShell.ConsoleGuiTools -ErrorAction SilentlyContinue) { |
|
Import-Module Microsoft.PowerShell.ConsoleGuiTools > $null |
|
} |
|
else { |
|
Install-Module Microsoft.PowerShell.ConsoleGuiTools |
|
} |
|
|
|
if (Get-Command oh-my-posh -ErrorAction Ignore) { |
|
# $stopwatch.Restart(); |
|
|
|
function Set-EnvVar { |
|
if (Get-Command tcp-cli -ErrorAction SilentlyContinue){ |
|
$env:CurrentTCPConfig = Get-Content $env:USERPROFILE\.config\tcp\tcp-cli.json | ConvertFrom-Json | Select-Object -ExpandProperty SelectedEnvironment; |
|
} |
|
else { |
|
$env:CurrentTCPConfig = 'unset'; |
|
} |
|
} |
|
New-Alias -Name 'Set-PoshContext' -Value 'Set-EnvVar' -Scope Global -Force; |
|
|
|
$resolved = Get-ChildItem $PSCommandPath | select -ExpandProperty Target | Split-Path -Resolve; |
|
$theme = Join-Path (([String]::IsNullOrEmpty($resolved)) ? (Split-Path $PROFILE -Resolve) : $resolved ) 'powerline.omp.json'; |
|
oh-my-posh init pwsh --config $theme | Invoke-Expression |
|
# $stopwatch.Stop(); |
|
# Write-Host "oh-my-posh ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
else { |
|
Write-Warning "Missing oh-my-posh module, install oh-my-posh https://ohmyposh.dev/docs/installation/windows and restart pwsh." |
|
} |
|
|
|
# Choco tab-completion |
|
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" |
|
if (Test-Path($ChocolateyProfile)) { |
|
# $stopwatch.Restart(); |
|
Import-Module "$ChocolateyProfile" |
|
# $stopwatch.Stop(); |
|
# Write-Host "choco ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
|
|
if (Get-Command aws -ErrorAction SilentlyContinue) { |
|
# $stopwatch.Restart(); |
|
Register-ArgumentCompleter -Native -CommandName aws -ScriptBlock { |
|
param($commandName, $wordToComplete, $cursorPosition); |
|
$env:COMP_LINE=$wordToComplete; |
|
if ($env:COMP_LINE.Length -lt $cursorPosition){ |
|
$env:COMP_LINE=$env:COMP_LINE + " " |
|
} |
|
$env:COMP_POINT=$cursorPosition; |
|
aws_completer.exe | ForEach-Object { |
|
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) |
|
} |
|
Remove-Item Env:\COMP_LINE; |
|
Remove-Item Env:\COMP_POINT |
|
} |
|
# $stopwatch.Stop(); |
|
# Write-Host "aws ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
|
|
# Winget completion |
|
if (Get-Command "winget" -errorAction SilentlyContinue){ |
|
Register-ArgumentCompleter -Native -CommandName winget -ScriptBlock { |
|
param($wordToComplete, $commandAst, $cursorPosition) |
|
[Console]::InputEncoding = [Console]::OutputEncoding = $OutputEncoding = [System.Text.Utf8Encoding]::new() |
|
$Local:word = $wordToComplete.Replace('"', '""') |
|
$Local:ast = $commandAst.ToString().Replace('"', '""') |
|
winget complete --word="$Local:word" --commandline "$Local:ast" --position $cursorPosition | ForEach-Object { |
|
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) |
|
} |
|
} |
|
} |
|
|
|
# dotnet suggest shell start |
|
if (Get-Command "dotnet-suggest" -errorAction SilentlyContinue){ |
|
# $stopwatch.Restart(); |
|
$availableToComplete = (dotnet-suggest list) | Out-String |
|
$availableToCompleteArray = $availableToComplete.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries) |
|
#$availableToCompleteArray = $availableToComplete.Split([Environment]::NewLine, [System.StringSplitOptions]::RemoveEmptyEntries) -notmatch '\bdotnet\b'; |
|
|
|
Register-ArgumentCompleter -Native -CommandName $availableToCompleteArray -ScriptBlock { |
|
param($wordToComplete, $commandAst, $cursorPosition) |
|
$fullpath = (Get-Command $commandAst.CommandElements[0]).Source |
|
|
|
$arguments = $commandAst.Extent.ToString().Replace('"', '\"') |
|
dotnet-suggest get -e $fullpath --position $cursorPosition -- "$arguments" | ForEach-Object { |
|
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) |
|
} |
|
} |
|
$env:DOTNET_SUGGEST_SCRIPT_VERSION = "1.0.2" |
|
# $stopwatch.Stop(); |
|
# Write-Host "dotnet suggest ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
# dotnet suggest script end |
|
|
|
if (Get-Command dotnet -ErrorAction Ignore){ |
|
# $stopwatch.Restart(); |
|
# Register-ArgumentCompleter -Native -CommandName dotnet -ScriptBlock { |
|
# param($commandName, $wordToComplete, $cursorPosition) |
|
# dotnet complete --position $cursorPosition "$wordToComplete" | ForEach-Object { |
|
# [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) |
|
# } |
|
# } |
|
dotnet completions script pwsh | Out-String | Invoke-Expression |
|
# $stopwatch.Stop(); |
|
# Write-Host "dotnet ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
|
|
Set-PSReadLineOption -PredictionSource History -Colors @{ InlinePrediction = "#9694A2"} |
|
Set-PSReadLineKeyHandler -Chord 'Ctrl+x,Ctrl+e' -Function ViEditVisually |
|
|
|
if (Get-Command kubectl -ErrorAction SilentlyContinue) { |
|
# $stopwatch.Restart(); |
|
# Copyright 2016 The Kubernetes Authors. |
|
# |
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
|
# you may not use this file except in compliance with the License. |
|
# You may obtain a copy of the License at |
|
# |
|
# http://www.apache.org/licenses/LICENSE-2.0 |
|
# |
|
# Unless required by applicable law or agreed to in writing, software |
|
# distributed under the License is distributed on an "AS IS" BASIS, |
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
# See the License for the specific language governing permissions and |
|
# limitations under the License. |
|
# powershell completion for kubectl -*- shell-script -*- |
|
|
|
function __kubectl_debug { |
|
if ($env:BASH_COMP_DEBUG_FILE) { |
|
"$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" |
|
} |
|
} |
|
|
|
filter __kubectl_escapeStringWithSpecialChars { |
|
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&' |
|
} |
|
|
|
Register-ArgumentCompleter -CommandName 'kubectl' -ScriptBlock { |
|
param( |
|
$WordToComplete, |
|
$CommandAst, |
|
$CursorPosition |
|
) |
|
|
|
# Get the current command line and convert into a string |
|
$Command = $CommandAst.CommandElements |
|
$Command = "$Command" |
|
|
|
__kubectl_debug "" |
|
__kubectl_debug "========= starting completion logic ==========" |
|
__kubectl_debug "WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition" |
|
|
|
# The user could have moved the cursor backwards on the command-line. |
|
# We need to trigger completion from the $CursorPosition location, so we need |
|
# to truncate the command-line ($Command) up to the $CursorPosition location. |
|
# Make sure the $Command is longer then the $CursorPosition before we truncate. |
|
# This happens because the $Command does not include the last space. |
|
if ($Command.Length -gt $CursorPosition) { |
|
$Command=$Command.Substring(0,$CursorPosition) |
|
} |
|
__kubectl_debug "Truncated command: $Command" |
|
|
|
$ShellCompDirectiveError=1 |
|
$ShellCompDirectiveNoSpace=2 |
|
$ShellCompDirectiveNoFileComp=4 |
|
$ShellCompDirectiveFilterFileExt=8 |
|
$ShellCompDirectiveFilterDirs=16 |
|
|
|
# Prepare the command to request completions for the program. |
|
# Split the command at the first space to separate the program and arguments. |
|
$Program,$Arguments = $Command.Split(" ",2) |
|
$RequestComp="$Program __complete $Arguments" |
|
__kubectl_debug "RequestComp: $RequestComp" |
|
|
|
# we cannot use $WordToComplete because it |
|
# has the wrong values if the cursor was moved |
|
# so use the last argument |
|
if ($WordToComplete -ne "" ) { |
|
$WordToComplete = $Arguments.Split(" ")[-1] |
|
} |
|
__kubectl_debug "New WordToComplete: $WordToComplete" |
|
|
|
|
|
# Check for flag with equal sign |
|
$IsEqualFlag = ($WordToComplete -Like "--*=*" ) |
|
if ( $IsEqualFlag ) { |
|
__kubectl_debug "Completing equal sign flag" |
|
# Remove the flag part |
|
$Flag,$WordToComplete = $WordToComplete.Split("=",2) |
|
} |
|
|
|
if ( $WordToComplete -eq "" -And ( -Not $IsEqualFlag )) { |
|
# If the last parameter is complete (there is a space following it) |
|
# We add an extra empty parameter so we can indicate this to the go method. |
|
__kubectl_debug "Adding extra empty parameter" |
|
# We need to use `"`" to pass an empty argument a "" or '' does not work!!! |
|
$RequestComp="$RequestComp" + ' `"`"' |
|
} |
|
|
|
__kubectl_debug "Calling $RequestComp" |
|
#call the command store the output in $out and redirect stderr and stdout to null |
|
# $Out is an array contains each line per element |
|
Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null |
|
|
|
|
|
# get directive from last line |
|
[int]$Directive = $Out[-1].TrimStart(':') |
|
if ($Directive -eq "") { |
|
# There is no directive specified |
|
$Directive = 0 |
|
} |
|
__kubectl_debug "The completion directive is: $Directive" |
|
|
|
# remove directive (last element) from out |
|
$Out = $Out | Where-Object { $_ -ne $Out[-1] } |
|
__kubectl_debug "The completions are: $Out" |
|
|
|
if (($Directive -band $ShellCompDirectiveError) -ne 0 ) { |
|
# Error code. No completion. |
|
__kubectl_debug "Received error from custom completion go code" |
|
return |
|
} |
|
|
|
$Longest = 0 |
|
$Values = $Out | ForEach-Object { |
|
#Split the output in name and description |
|
$Name, $Description = $_.Split("`t",2) |
|
__kubectl_debug "Name: $Name Description: $Description" |
|
|
|
# Look for the longest completion so that we can format things nicely |
|
if ($Longest -lt $Name.Length) { |
|
$Longest = $Name.Length |
|
} |
|
|
|
# Set the description to a one space string if there is none set. |
|
# This is needed because the CompletionResult does not accept an empty string as argument |
|
if (-Not $Description) { |
|
$Description = " " |
|
} |
|
@{Name="$Name";Description="$Description"} |
|
} |
|
|
|
|
|
$Space = " " |
|
if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) { |
|
# remove the space here |
|
__kubectl_debug "ShellCompDirectiveNoSpace is called" |
|
$Space = "" |
|
} |
|
|
|
if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or |
|
(($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 )) { |
|
__kubectl_debug "ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported" |
|
|
|
# return here to prevent the completion of the extensions |
|
return |
|
} |
|
|
|
$Values = $Values | Where-Object { |
|
# filter the result |
|
$_.Name -like "$WordToComplete*" |
|
|
|
# Join the flag back if we have an equal sign flag |
|
if ( $IsEqualFlag ) { |
|
__kubectl_debug "Join the equal sign flag back to the completion value" |
|
$_.Name = $Flag + "=" + $_.Name |
|
} |
|
} |
|
|
|
if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) { |
|
__kubectl_debug "ShellCompDirectiveNoFileComp is called" |
|
|
|
if ($Values.Length -eq 0) { |
|
# Just print an empty string here so the |
|
# shell does not start to complete paths. |
|
# We cannot use CompletionResult here because |
|
# it does not accept an empty string as argument. |
|
"" |
|
return |
|
} |
|
} |
|
|
|
# Get the current mode |
|
$Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq "Tab" }).Function |
|
__kubectl_debug "Mode: $Mode" |
|
|
|
$Values | ForEach-Object { |
|
|
|
# store temporary because switch will overwrite $_ |
|
$comp = $_ |
|
|
|
# PowerShell supports three different completion modes |
|
# - TabCompleteNext (default windows style - on each key press the next option is displayed) |
|
# - Complete (works like bash) |
|
# - MenuComplete (works like zsh) |
|
# You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function <mode> |
|
|
|
# CompletionResult Arguments: |
|
# 1) CompletionText text to be used as the auto completion result |
|
# 2) ListItemText text to be displayed in the suggestion list |
|
# 3) ResultType type of completion result |
|
# 4) ToolTip text for the tooltip with details about the object |
|
|
|
switch ($Mode) { |
|
|
|
# bash like |
|
"Complete" { |
|
|
|
if ($Values.Length -eq 1) { |
|
__kubectl_debug "Only one completion left" |
|
|
|
# insert space after value |
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __kubectl_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") |
|
|
|
} else { |
|
# Add the proper number of spaces to align the descriptions |
|
while($comp.Name.Length -lt $Longest) { |
|
$comp.Name = $comp.Name + " " |
|
} |
|
|
|
# Check for empty description and only add parentheses if needed |
|
if ($($comp.Description) -eq " " ) { |
|
$Description = "" |
|
} else { |
|
$Description = " ($($comp.Description))" |
|
} |
|
|
|
[System.Management.Automation.CompletionResult]::new("$($comp.Name)$Description", "$($comp.Name)$Description", 'ParameterValue', "$($comp.Description)") |
|
} |
|
} |
|
|
|
# zsh like |
|
"MenuComplete" { |
|
# insert space after value |
|
# MenuComplete will automatically show the ToolTip of |
|
# the highlighted value at the bottom of the suggestions. |
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __kubectl_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") |
|
} |
|
|
|
# TabCompleteNext and in case we get something unknown |
|
Default { |
|
# Like MenuComplete but we don't want to add a space here because |
|
# the user need to press space anyway to get the completion. |
|
# Description will not be shown because that's not possible with TabCompleteNext |
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __kubectl_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)") |
|
} |
|
} |
|
|
|
} |
|
} |
|
# $stopwatch.Stop(); |
|
# Write-Host "kubectl ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
|
|
if (Get-Command gh -ErrorAction Ignore){ |
|
# $stopwatch.Restart(); |
|
|
|
# powershell completion for gh -*- shell-script -*- |
|
|
|
function __gh_debug { |
|
if ($env:BASH_COMP_DEBUG_FILE) { |
|
"$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" |
|
} |
|
} |
|
|
|
filter __gh_escapeStringWithSpecialChars { |
|
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&' |
|
} |
|
|
|
[scriptblock]$__ghCompleterBlock = { |
|
param( |
|
$WordToComplete, |
|
$CommandAst, |
|
$CursorPosition |
|
) |
|
|
|
# Get the current command line and convert into a string |
|
$Command = $CommandAst.CommandElements |
|
$Command = "$Command" |
|
|
|
__gh_debug "" |
|
__gh_debug "========= starting completion logic ==========" |
|
__gh_debug "WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition" |
|
|
|
# The user could have moved the cursor backwards on the command-line. |
|
# We need to trigger completion from the $CursorPosition location, so we need |
|
# to truncate the command-line ($Command) up to the $CursorPosition location. |
|
# Make sure the $Command is longer then the $CursorPosition before we truncate. |
|
# This happens because the $Command does not include the last space. |
|
if ($Command.Length -gt $CursorPosition) { |
|
$Command=$Command.Substring(0,$CursorPosition) |
|
} |
|
__gh_debug "Truncated command: $Command" |
|
|
|
$ShellCompDirectiveError=1 |
|
$ShellCompDirectiveNoSpace=2 |
|
$ShellCompDirectiveNoFileComp=4 |
|
$ShellCompDirectiveFilterFileExt=8 |
|
$ShellCompDirectiveFilterDirs=16 |
|
|
|
# Prepare the command to request completions for the program. |
|
# Split the command at the first space to separate the program and arguments. |
|
$Program,$Arguments = $Command.Split(" ",2) |
|
|
|
$RequestComp="$Program __complete $Arguments" |
|
__gh_debug "RequestComp: $RequestComp" |
|
|
|
# we cannot use $WordToComplete because it |
|
# has the wrong values if the cursor was moved |
|
# so use the last argument |
|
if ($WordToComplete -ne "" ) { |
|
$WordToComplete = $Arguments.Split(" ")[-1] |
|
} |
|
__gh_debug "New WordToComplete: $WordToComplete" |
|
|
|
|
|
# Check for flag with equal sign |
|
$IsEqualFlag = ($WordToComplete -Like "--*=*" ) |
|
if ( $IsEqualFlag ) { |
|
__gh_debug "Completing equal sign flag" |
|
# Remove the flag part |
|
$Flag,$WordToComplete = $WordToComplete.Split("=",2) |
|
} |
|
|
|
if ( $WordToComplete -eq "" -And ( -Not $IsEqualFlag )) { |
|
# If the last parameter is complete (there is a space following it) |
|
# We add an extra empty parameter so we can indicate this to the go method. |
|
__gh_debug "Adding extra empty parameter" |
|
# We need to use `"`" to pass an empty argument a "" or '' does not work!!! |
|
$RequestComp="$RequestComp" + ' `"`"' |
|
} |
|
|
|
__gh_debug "Calling $RequestComp" |
|
# First disable ActiveHelp which is not supported for Powershell |
|
$env:GH_ACTIVE_HELP=0 |
|
|
|
#call the command store the output in $out and redirect stderr and stdout to null |
|
# $Out is an array contains each line per element |
|
Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null |
|
|
|
# get directive from last line |
|
[int]$Directive = $Out[-1].TrimStart(':') |
|
if ($Directive -eq "") { |
|
# There is no directive specified |
|
$Directive = 0 |
|
} |
|
__gh_debug "The completion directive is: $Directive" |
|
|
|
# remove directive (last element) from out |
|
$Out = $Out | Where-Object { $_ -ne $Out[-1] } |
|
__gh_debug "The completions are: $Out" |
|
|
|
if (($Directive -band $ShellCompDirectiveError) -ne 0 ) { |
|
# Error code. No completion. |
|
__gh_debug "Received error from custom completion go code" |
|
return |
|
} |
|
|
|
$Longest = 0 |
|
$Values = $Out | ForEach-Object { |
|
#Split the output in name and description |
|
$Name, $Description = $_.Split("`t",2) |
|
__gh_debug "Name: $Name Description: $Description" |
|
|
|
# Look for the longest completion so that we can format things nicely |
|
if ($Longest -lt $Name.Length) { |
|
$Longest = $Name.Length |
|
} |
|
|
|
# Set the description to a one space string if there is none set. |
|
# This is needed because the CompletionResult does not accept an empty string as argument |
|
if (-Not $Description) { |
|
$Description = " " |
|
} |
|
@{Name="$Name";Description="$Description"} |
|
} |
|
|
|
|
|
$Space = " " |
|
if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) { |
|
# remove the space here |
|
__gh_debug "ShellCompDirectiveNoSpace is called" |
|
$Space = "" |
|
} |
|
|
|
if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or |
|
(($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 )) { |
|
__gh_debug "ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported" |
|
|
|
# return here to prevent the completion of the extensions |
|
return |
|
} |
|
|
|
$Values = $Values | Where-Object { |
|
# filter the result |
|
$_.Name -like "$WordToComplete*" |
|
|
|
# Join the flag back if we have an equal sign flag |
|
if ( $IsEqualFlag ) { |
|
__gh_debug "Join the equal sign flag back to the completion value" |
|
$_.Name = $Flag + "=" + $_.Name |
|
} |
|
} |
|
|
|
if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) { |
|
__gh_debug "ShellCompDirectiveNoFileComp is called" |
|
|
|
if ($Values.Length -eq 0) { |
|
# Just print an empty string here so the |
|
# shell does not start to complete paths. |
|
# We cannot use CompletionResult here because |
|
# it does not accept an empty string as argument. |
|
"" |
|
return |
|
} |
|
} |
|
|
|
# Get the current mode |
|
$Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq "Tab" }).Function |
|
__gh_debug "Mode: $Mode" |
|
|
|
$Values | ForEach-Object { |
|
|
|
# store temporary because switch will overwrite $_ |
|
$comp = $_ |
|
|
|
# PowerShell supports three different completion modes |
|
# - TabCompleteNext (default windows style - on each key press the next option is displayed) |
|
# - Complete (works like bash) |
|
# - MenuComplete (works like zsh) |
|
# You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function <mode> |
|
|
|
# CompletionResult Arguments: |
|
# 1) CompletionText text to be used as the auto completion result |
|
# 2) ListItemText text to be displayed in the suggestion list |
|
# 3) ResultType type of completion result |
|
# 4) ToolTip text for the tooltip with details about the object |
|
|
|
switch ($Mode) { |
|
|
|
# bash like |
|
"Complete" { |
|
|
|
if ($Values.Length -eq 1) { |
|
__gh_debug "Only one completion left" |
|
|
|
# insert space after value |
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __gh_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") |
|
|
|
} else { |
|
# Add the proper number of spaces to align the descriptions |
|
while($comp.Name.Length -lt $Longest) { |
|
$comp.Name = $comp.Name + " " |
|
} |
|
|
|
# Check for empty description and only add parentheses if needed |
|
if ($($comp.Description) -eq " " ) { |
|
$Description = "" |
|
} else { |
|
$Description = " ($($comp.Description))" |
|
} |
|
|
|
[System.Management.Automation.CompletionResult]::new("$($comp.Name)$Description", "$($comp.Name)$Description", 'ParameterValue', "$($comp.Description)") |
|
} |
|
} |
|
|
|
# zsh like |
|
"MenuComplete" { |
|
# insert space after value |
|
# MenuComplete will automatically show the ToolTip of |
|
# the highlighted value at the bottom of the suggestions. |
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __gh_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") |
|
} |
|
|
|
# TabCompleteNext and in case we get something unknown |
|
Default { |
|
# Like MenuComplete but we don't want to add a space here because |
|
# the user need to press space anyway to get the completion. |
|
# Description will not be shown because that's not possible with TabCompleteNext |
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __gh_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)") |
|
} |
|
} |
|
|
|
} |
|
} |
|
|
|
Register-ArgumentCompleter -CommandName 'gh' -ScriptBlock $__ghCompleterBlock |
|
# $stopwatch.Stop(); |
|
# Write-Host "gh ellapsed time $($stopwatch.ElapsedMilliseconds) ms" |
|
} |
|
|
|
if (Get-Command tcpnew -ErrorAction Ignore) { |
|
# powershell completion for tcpnew -*- shell-script -*- |
|
function __tcpnew_debug { |
|
if ($env:BASH_COMP_DEBUG_FILE) { |
|
"$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" |
|
} |
|
} |
|
|
|
filter __tcpnew_escapeStringWithSpecialChars { |
|
$_ -replace '\s|#|@|\$|;|,|''|\{|\}|\(|\)|"|`|\||<|>|&','`$&' |
|
} |
|
|
|
[scriptblock]${__tcpnewCompleterBlock} = { |
|
param( |
|
$WordToComplete, |
|
$CommandAst, |
|
$CursorPosition |
|
) |
|
|
|
# Get the current command line and convert into a string |
|
$Command = $CommandAst.CommandElements |
|
$Command = "$Command" |
|
|
|
__tcpnew_debug "" |
|
__tcpnew_debug "========= starting completion logic ==========" |
|
__tcpnew_debug "WordToComplete: $WordToComplete Command: $Command CursorPosition: $CursorPosition" |
|
|
|
# The user could have moved the cursor backwards on the command-line. |
|
# We need to trigger completion from the $CursorPosition location, so we need |
|
# to truncate the command-line ($Command) up to the $CursorPosition location. |
|
# Make sure the $Command is longer then the $CursorPosition before we truncate. |
|
# This happens because the $Command does not include the last space. |
|
if ($Command.Length -gt $CursorPosition) { |
|
$Command=$Command.Substring(0,$CursorPosition) |
|
} |
|
__tcpnew_debug "Truncated command: $Command" |
|
|
|
$ShellCompDirectiveError=1 |
|
$ShellCompDirectiveNoSpace=2 |
|
$ShellCompDirectiveNoFileComp=4 |
|
$ShellCompDirectiveFilterFileExt=8 |
|
$ShellCompDirectiveFilterDirs=16 |
|
$ShellCompDirectiveKeepOrder=32 |
|
|
|
# Prepare the command to request completions for the program. |
|
# Split the command at the first space to separate the program and arguments. |
|
$Program,$Arguments = $Command.Split(" ",2) |
|
|
|
$RequestComp="$Program __complete $Arguments" |
|
__tcpnew_debug "RequestComp: $RequestComp" |
|
|
|
# we cannot use $WordToComplete because it |
|
# has the wrong values if the cursor was moved |
|
# so use the last argument |
|
if ($WordToComplete -ne "" ) { |
|
$WordToComplete = $Arguments.Split(" ")[-1] |
|
} |
|
__tcpnew_debug "New WordToComplete: $WordToComplete" |
|
|
|
|
|
# Check for flag with equal sign |
|
$IsEqualFlag = ($WordToComplete -Like "--*=*" ) |
|
if ( $IsEqualFlag ) { |
|
__tcpnew_debug "Completing equal sign flag" |
|
# Remove the flag part |
|
$Flag,$WordToComplete = $WordToComplete.Split("=",2) |
|
} |
|
|
|
if ( $WordToComplete -eq "" -And ( -Not $IsEqualFlag )) { |
|
# If the last parameter is complete (there is a space following it) |
|
# We add an extra empty parameter so we can indicate this to the go method. |
|
__tcpnew_debug "Adding extra empty parameter" |
|
# PowerShell 7.2+ changed the way how the arguments are passed to executables, |
|
# so for pre-7.2 or when Legacy argument passing is enabled we need to use |
|
# `"`" to pass an empty argument, a "" or '' does not work!!! |
|
if ($PSVersionTable.PsVersion -lt [version]'7.2.0' -or |
|
($PSVersionTable.PsVersion -lt [version]'7.3.0' -and -not [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -or |
|
(($PSVersionTable.PsVersion -ge [version]'7.3.0' -or [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -and |
|
$PSNativeCommandArgumentPassing -eq 'Legacy')) { |
|
$RequestComp="$RequestComp" + ' `"`"' |
|
} else { |
|
$RequestComp="$RequestComp" + ' ""' |
|
} |
|
} |
|
|
|
__tcpnew_debug "Calling $RequestComp" |
|
# First disable ActiveHelp which is not supported for Powershell |
|
${env:TCPNEW_ACTIVE_HELP}=0 |
|
|
|
#call the command store the output in $out and redirect stderr and stdout to null |
|
# $Out is an array contains each line per element |
|
Invoke-Expression -OutVariable out "$RequestComp" 2>&1 | Out-Null |
|
|
|
# get directive from last line |
|
[int]$Directive = $Out[-1].TrimStart(':') |
|
if ($Directive -eq "") { |
|
# There is no directive specified |
|
$Directive = 0 |
|
} |
|
__tcpnew_debug "The completion directive is: $Directive" |
|
|
|
# remove directive (last element) from out |
|
$Out = $Out | Where-Object { $_ -ne $Out[-1] } |
|
__tcpnew_debug "The completions are: $Out" |
|
|
|
if (($Directive -band $ShellCompDirectiveError) -ne 0 ) { |
|
# Error code. No completion. |
|
__tcpnew_debug "Received error from custom completion go code" |
|
return |
|
} |
|
|
|
$Longest = 0 |
|
[Array]$Values = $Out | ForEach-Object { |
|
#Split the output in name and description |
|
$Name, $Description = $_.Split("`t",2) |
|
__tcpnew_debug "Name: $Name Description: $Description" |
|
|
|
# Look for the longest completion so that we can format things nicely |
|
if ($Longest -lt $Name.Length) { |
|
$Longest = $Name.Length |
|
} |
|
|
|
# Set the description to a one space string if there is none set. |
|
# This is needed because the CompletionResult does not accept an empty string as argument |
|
if (-Not $Description) { |
|
$Description = " " |
|
} |
|
@{Name="$Name";Description="$Description"} |
|
} |
|
|
|
|
|
$Space = " " |
|
if (($Directive -band $ShellCompDirectiveNoSpace) -ne 0 ) { |
|
# remove the space here |
|
__tcpnew_debug "ShellCompDirectiveNoSpace is called" |
|
$Space = "" |
|
} |
|
|
|
if ((($Directive -band $ShellCompDirectiveFilterFileExt) -ne 0 ) -or |
|
(($Directive -band $ShellCompDirectiveFilterDirs) -ne 0 )) { |
|
__tcpnew_debug "ShellCompDirectiveFilterFileExt ShellCompDirectiveFilterDirs are not supported" |
|
|
|
# return here to prevent the completion of the extensions |
|
return |
|
} |
|
|
|
$Values = $Values | Where-Object { |
|
# filter the result |
|
$_.Name -like "$WordToComplete*" |
|
|
|
# Join the flag back if we have an equal sign flag |
|
if ( $IsEqualFlag ) { |
|
__tcpnew_debug "Join the equal sign flag back to the completion value" |
|
$_.Name = $Flag + "=" + $_.Name |
|
} |
|
} |
|
|
|
# we sort the values in ascending order by name if keep order isn't passed |
|
if (($Directive -band $ShellCompDirectiveKeepOrder) -eq 0 ) { |
|
$Values = $Values | Sort-Object -Property Name |
|
} |
|
|
|
if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) { |
|
__tcpnew_debug "ShellCompDirectiveNoFileComp is called" |
|
|
|
if ($Values.Length -eq 0) { |
|
# Just print an empty string here so the |
|
# shell does not start to complete paths. |
|
# We cannot use CompletionResult here because |
|
# it does not accept an empty string as argument. |
|
"" |
|
return |
|
} |
|
} |
|
|
|
# Get the current mode |
|
$Mode = (Get-PSReadLineKeyHandler | Where-Object {$_.Key -eq "Tab" }).Function |
|
__tcpnew_debug "Mode: $Mode" |
|
|
|
$Values | ForEach-Object { |
|
|
|
# store temporary because switch will overwrite $_ |
|
$comp = $_ |
|
|
|
# PowerShell supports three different completion modes |
|
# - TabCompleteNext (default windows style - on each key press the next option is displayed) |
|
# - Complete (works like bash) |
|
# - MenuComplete (works like zsh) |
|
# You set the mode with Set-PSReadLineKeyHandler -Key Tab -Function <mode> |
|
|
|
# CompletionResult Arguments: |
|
# 1) CompletionText text to be used as the auto completion result |
|
# 2) ListItemText text to be displayed in the suggestion list |
|
# 3) ResultType type of completion result |
|
# 4) ToolTip text for the tooltip with details about the object |
|
|
|
switch ($Mode) { |
|
|
|
# bash like |
|
"Complete" { |
|
|
|
if ($Values.Length -eq 1) { |
|
__tcpnew_debug "Only one completion left" |
|
|
|
# insert space after value |
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __tcpnew_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") |
|
|
|
} else { |
|
# Add the proper number of spaces to align the descriptions |
|
while($comp.Name.Length -lt $Longest) { |
|
$comp.Name = $comp.Name + " " |
|
} |
|
|
|
# Check for empty description and only add parentheses if needed |
|
if ($($comp.Description) -eq " " ) { |
|
$Description = "" |
|
} else { |
|
$Description = " ($($comp.Description))" |
|
} |
|
|
|
[System.Management.Automation.CompletionResult]::new("$($comp.Name)$Description", "$($comp.Name)$Description", 'ParameterValue', "$($comp.Description)") |
|
} |
|
} |
|
|
|
# zsh like |
|
"MenuComplete" { |
|
# insert space after value |
|
# MenuComplete will automatically show the ToolTip of |
|
# the highlighted value at the bottom of the suggestions. |
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __tcpnew_escapeStringWithSpecialChars) + $Space, "$($comp.Name)", 'ParameterValue', "$($comp.Description)") |
|
} |
|
|
|
# TabCompleteNext and in case we get something unknown |
|
Default { |
|
# Like MenuComplete but we don't want to add a space here because |
|
# the user need to press space anyway to get the completion. |
|
# Description will not be shown because that's not possible with TabCompleteNext |
|
[System.Management.Automation.CompletionResult]::new($($comp.Name | __tcpnew_escapeStringWithSpecialChars), "$($comp.Name)", 'ParameterValue', "$($comp.Description)") |
|
} |
|
} |
|
|
|
} |
|
} |
|
|
|
Register-ArgumentCompleter -CommandName 'tcpnew' -ScriptBlock ${__tcpnewCompleterBlock} |
|
} |
|
|
|
if (Get-Command "codex" -ErrorAction Ignore) { |
|
Register-ArgumentCompleter -Native -CommandName 'codex' -ScriptBlock { |
|
param($wordToComplete, $commandAst, $cursorPosition) |
|
|
|
$commandElements = $commandAst.CommandElements |
|
$command = @( |
|
'codex' |
|
for ($i = 1; $i -lt $commandElements.Count; $i++) { |
|
$element = $commandElements[$i] |
|
if ($element -isnot [StringConstantExpressionAst] -or |
|
$element.StringConstantType -ne [StringConstantType]::BareWord -or |
|
$element.Value.StartsWith('-') -or |
|
$element.Value -eq $wordToComplete) { |
|
break |
|
} |
|
$element.Value |
|
}) -join ';' |
|
|
|
$completions = @(switch ($command) { |
|
'codex' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('--image', '--image', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--model', '--model', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--local-provider', '--local-provider', [CompletionResultType]::ParameterName, 'Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection') |
|
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('--profile', '--profile', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('-s', '-s', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('--sandbox', '--sandbox', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('-a', '-a', [CompletionResultType]::ParameterName, 'Configure when the model requires human approval before executing a command') |
|
[CompletionResult]::new('--ask-for-approval', '--ask-for-approval', [CompletionResultType]::ParameterName, 'Configure when the model requires human approval before executing a command') |
|
[CompletionResult]::new('-C', '-C ', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--cd', '--cd', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--add-dir', '--add-dir', [CompletionResultType]::ParameterName, 'Additional directories that should be writable alongside the primary workspace') |
|
[CompletionResult]::new('--oss', '--oss', [CompletionResultType]::ParameterName, 'Convenience flag to select the local open source model provider. Equivalent to -c model_provider=oss; verifies a local LM Studio or Ollama server is running') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write)') |
|
[CompletionResult]::new('--dangerously-bypass-approvals-and-sandbox', '--dangerously-bypass-approvals-and-sandbox', [CompletionResultType]::ParameterName, 'Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed') |
|
[CompletionResult]::new('--search', '--search', [CompletionResultType]::ParameterName, 'Enable live web search. When enabled, the native Responses `web_search` tool is available to the model (no per‑call approval)') |
|
[CompletionResult]::new('--no-alt-screen', '--no-alt-screen', [CompletionResultType]::ParameterName, 'Disable alternate screen mode') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('exec', 'exec', [CompletionResultType]::ParameterValue, 'Run Codex non-interactively') |
|
[CompletionResult]::new('e', 'e', [CompletionResultType]::ParameterValue, 'Run Codex non-interactively') |
|
[CompletionResult]::new('review', 'review', [CompletionResultType]::ParameterValue, 'Run a code review non-interactively') |
|
[CompletionResult]::new('login', 'login', [CompletionResultType]::ParameterValue, 'Manage login') |
|
[CompletionResult]::new('logout', 'logout', [CompletionResultType]::ParameterValue, 'Remove stored authentication credentials') |
|
[CompletionResult]::new('mcp', 'mcp', [CompletionResultType]::ParameterValue, '[experimental] Run Codex as an MCP server and manage MCP servers') |
|
[CompletionResult]::new('mcp-server', 'mcp-server', [CompletionResultType]::ParameterValue, '[experimental] Run the Codex MCP server (stdio transport)') |
|
[CompletionResult]::new('app-server', 'app-server', [CompletionResultType]::ParameterValue, '[experimental] Run the app server or related tooling') |
|
[CompletionResult]::new('completion', 'completion', [CompletionResultType]::ParameterValue, 'Generate shell completion scripts') |
|
[CompletionResult]::new('sandbox', 'sandbox', [CompletionResultType]::ParameterValue, 'Run commands within a Codex-provided sandbox') |
|
[CompletionResult]::new('debug', 'debug', [CompletionResultType]::ParameterValue, 'Debugging tools') |
|
[CompletionResult]::new('execpolicy', 'execpolicy', [CompletionResultType]::ParameterValue, 'Execpolicy tooling') |
|
[CompletionResult]::new('apply', 'apply', [CompletionResultType]::ParameterValue, 'Apply the latest diff produced by Codex agent as a `git apply` to your local working tree') |
|
[CompletionResult]::new('a', 'a', [CompletionResultType]::ParameterValue, 'Apply the latest diff produced by Codex agent as a `git apply` to your local working tree') |
|
[CompletionResult]::new('resume', 'resume', [CompletionResultType]::ParameterValue, 'Resume a previous interactive session (picker by default; use --last to continue the most recent)') |
|
[CompletionResult]::new('fork', 'fork', [CompletionResultType]::ParameterValue, 'Fork a previous interactive session (picker by default; use --last to fork the most recent)') |
|
[CompletionResult]::new('cloud', 'cloud', [CompletionResultType]::ParameterValue, '[EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally') |
|
[CompletionResult]::new('responses-api-proxy', 'responses-api-proxy', [CompletionResultType]::ParameterValue, 'Internal: run the responses API proxy') |
|
[CompletionResult]::new('stdio-to-uds', 'stdio-to-uds', [CompletionResultType]::ParameterValue, 'Internal: relay stdio to a Unix domain socket') |
|
[CompletionResult]::new('features', 'features', [CompletionResultType]::ParameterValue, 'Inspect feature flags') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;exec' { |
|
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('--image', '--image', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--model', '--model', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--local-provider', '--local-provider', [CompletionResultType]::ParameterName, 'Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection') |
|
[CompletionResult]::new('-s', '-s', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('--sandbox', '--sandbox', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('--profile', '--profile', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('-C', '-C ', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--cd', '--cd', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--add-dir', '--add-dir', [CompletionResultType]::ParameterName, 'Additional directories that should be writable alongside the primary workspace') |
|
[CompletionResult]::new('--output-schema', '--output-schema', [CompletionResultType]::ParameterName, 'Path to a JSON Schema file describing the model''s final response shape') |
|
[CompletionResult]::new('--color', '--color', [CompletionResultType]::ParameterName, 'Specifies color settings for use in the output') |
|
[CompletionResult]::new('-o', '-o', [CompletionResultType]::ParameterName, 'Specifies file where the last message from the agent should be written') |
|
[CompletionResult]::new('--output-last-message', '--output-last-message', [CompletionResultType]::ParameterName, 'Specifies file where the last message from the agent should be written') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--oss', '--oss', [CompletionResultType]::ParameterName, 'Use open-source provider') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write)') |
|
[CompletionResult]::new('--dangerously-bypass-approvals-and-sandbox', '--dangerously-bypass-approvals-and-sandbox', [CompletionResultType]::ParameterName, 'Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed') |
|
[CompletionResult]::new('--skip-git-repo-check', '--skip-git-repo-check', [CompletionResultType]::ParameterName, 'Allow running Codex outside a Git repository') |
|
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Print events to stdout as JSONL') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('resume', 'resume', [CompletionResultType]::ParameterValue, 'Resume a previous session by id or pick the most recent with --last') |
|
[CompletionResult]::new('review', 'review', [CompletionResultType]::ParameterValue, 'Run a code review against the current repository') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;e' { |
|
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('--image', '--image', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--model', '--model', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--local-provider', '--local-provider', [CompletionResultType]::ParameterName, 'Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection') |
|
[CompletionResult]::new('-s', '-s', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('--sandbox', '--sandbox', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('--profile', '--profile', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('-C', '-C ', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--cd', '--cd', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--add-dir', '--add-dir', [CompletionResultType]::ParameterName, 'Additional directories that should be writable alongside the primary workspace') |
|
[CompletionResult]::new('--output-schema', '--output-schema', [CompletionResultType]::ParameterName, 'Path to a JSON Schema file describing the model''s final response shape') |
|
[CompletionResult]::new('--color', '--color', [CompletionResultType]::ParameterName, 'Specifies color settings for use in the output') |
|
[CompletionResult]::new('-o', '-o', [CompletionResultType]::ParameterName, 'Specifies file where the last message from the agent should be written') |
|
[CompletionResult]::new('--output-last-message', '--output-last-message', [CompletionResultType]::ParameterName, 'Specifies file where the last message from the agent should be written') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--oss', '--oss', [CompletionResultType]::ParameterName, 'Use open-source provider') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write)') |
|
[CompletionResult]::new('--dangerously-bypass-approvals-and-sandbox', '--dangerously-bypass-approvals-and-sandbox', [CompletionResultType]::ParameterName, 'Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed') |
|
[CompletionResult]::new('--skip-git-repo-check', '--skip-git-repo-check', [CompletionResultType]::ParameterName, 'Allow running Codex outside a Git repository') |
|
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Print events to stdout as JSONL') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('resume', 'resume', [CompletionResultType]::ParameterValue, 'Resume a previous session by id or pick the most recent with --last') |
|
[CompletionResult]::new('review', 'review', [CompletionResultType]::ParameterValue, 'Run a code review against the current repository') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;exec;resume' { |
|
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the prompt sent after resuming') |
|
[CompletionResult]::new('--image', '--image', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the prompt sent after resuming') |
|
[CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--model', '--model', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--last', '--last', [CompletionResultType]::ParameterName, 'Resume the most recent recorded session (newest) without specifying an id') |
|
[CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Show all sessions (disables cwd filtering)') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write)') |
|
[CompletionResult]::new('--dangerously-bypass-approvals-and-sandbox', '--dangerously-bypass-approvals-and-sandbox', [CompletionResultType]::ParameterName, 'Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed') |
|
[CompletionResult]::new('--skip-git-repo-check', '--skip-git-repo-check', [CompletionResultType]::ParameterName, 'Allow running Codex outside a Git repository') |
|
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Print events to stdout as JSONL') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;e;resume' { |
|
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the prompt sent after resuming') |
|
[CompletionResult]::new('--image', '--image', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the prompt sent after resuming') |
|
[CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--model', '--model', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--last', '--last', [CompletionResultType]::ParameterName, 'Resume the most recent recorded session (newest) without specifying an id') |
|
[CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Show all sessions (disables cwd filtering)') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write)') |
|
[CompletionResult]::new('--dangerously-bypass-approvals-and-sandbox', '--dangerously-bypass-approvals-and-sandbox', [CompletionResultType]::ParameterName, 'Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed') |
|
[CompletionResult]::new('--skip-git-repo-check', '--skip-git-repo-check', [CompletionResultType]::ParameterName, 'Allow running Codex outside a Git repository') |
|
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Print events to stdout as JSONL') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;exec;review' { |
|
[CompletionResult]::new('--base', '--base', [CompletionResultType]::ParameterName, 'Review changes against the given base branch') |
|
[CompletionResult]::new('--commit', '--commit', [CompletionResultType]::ParameterName, 'Review the changes introduced by a commit') |
|
[CompletionResult]::new('--title', '--title', [CompletionResultType]::ParameterName, 'Optional commit title to display in the review summary') |
|
[CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--model', '--model', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--uncommitted', '--uncommitted', [CompletionResultType]::ParameterName, 'Review staged, unstaged, and untracked changes') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write)') |
|
[CompletionResult]::new('--dangerously-bypass-approvals-and-sandbox', '--dangerously-bypass-approvals-and-sandbox', [CompletionResultType]::ParameterName, 'Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed') |
|
[CompletionResult]::new('--skip-git-repo-check', '--skip-git-repo-check', [CompletionResultType]::ParameterName, 'Allow running Codex outside a Git repository') |
|
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Print events to stdout as JSONL') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;e;review' { |
|
[CompletionResult]::new('--base', '--base', [CompletionResultType]::ParameterName, 'Review changes against the given base branch') |
|
[CompletionResult]::new('--commit', '--commit', [CompletionResultType]::ParameterName, 'Review the changes introduced by a commit') |
|
[CompletionResult]::new('--title', '--title', [CompletionResultType]::ParameterName, 'Optional commit title to display in the review summary') |
|
[CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--model', '--model', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--uncommitted', '--uncommitted', [CompletionResultType]::ParameterName, 'Review staged, unstaged, and untracked changes') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write)') |
|
[CompletionResult]::new('--dangerously-bypass-approvals-and-sandbox', '--dangerously-bypass-approvals-and-sandbox', [CompletionResultType]::ParameterName, 'Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed') |
|
[CompletionResult]::new('--skip-git-repo-check', '--skip-git-repo-check', [CompletionResultType]::ParameterName, 'Allow running Codex outside a Git repository') |
|
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Print events to stdout as JSONL') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;exec;help' { |
|
[CompletionResult]::new('resume', 'resume', [CompletionResultType]::ParameterValue, 'Resume a previous session by id or pick the most recent with --last') |
|
[CompletionResult]::new('review', 'review', [CompletionResultType]::ParameterValue, 'Run a code review against the current repository') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;exec;help;resume' { |
|
break |
|
} |
|
'codex;exec;help;review' { |
|
break |
|
} |
|
'codex;exec;help;help' { |
|
break |
|
} |
|
'codex;e;help' { |
|
[CompletionResult]::new('resume', 'resume', [CompletionResultType]::ParameterValue, 'Resume a previous session by id or pick the most recent with --last') |
|
[CompletionResult]::new('review', 'review', [CompletionResultType]::ParameterValue, 'Run a code review against the current repository') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;e;help;resume' { |
|
break |
|
} |
|
'codex;e;help;review' { |
|
break |
|
} |
|
'codex;e;help;help' { |
|
break |
|
} |
|
'codex;review' { |
|
[CompletionResult]::new('--base', '--base', [CompletionResultType]::ParameterName, 'Review changes against the given base branch') |
|
[CompletionResult]::new('--commit', '--commit', [CompletionResultType]::ParameterName, 'Review the changes introduced by a commit') |
|
[CompletionResult]::new('--title', '--title', [CompletionResultType]::ParameterName, 'Optional commit title to display in the review summary') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--uncommitted', '--uncommitted', [CompletionResultType]::ParameterName, 'Review staged, unstaged, and untracked changes') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;login' { |
|
[CompletionResult]::new('--api-key', '--api-key', [CompletionResultType]::ParameterName, '(deprecated) Previously accepted the API key directly; now exits with guidance to use --with-api-key') |
|
[CompletionResult]::new('--experimental_issuer', '--experimental_issuer', [CompletionResultType]::ParameterName, 'EXPERIMENTAL: Use custom OAuth issuer base URL (advanced) Override the OAuth issuer base URL (advanced)') |
|
[CompletionResult]::new('--experimental_client-id', '--experimental_client-id', [CompletionResultType]::ParameterName, 'EXPERIMENTAL: Use custom OAuth client ID (advanced)') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--with-api-key', '--with-api-key', [CompletionResultType]::ParameterName, 'Read the API key from stdin (e.g. `printenv OPENAI_API_KEY | codex login --with-api-key`)') |
|
[CompletionResult]::new('--device-auth', '--device-auth', [CompletionResultType]::ParameterName, 'device-auth') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Show login status') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;login;status' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;login;help' { |
|
[CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Show login status') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;login;help;status' { |
|
break |
|
} |
|
'codex;login;help;help' { |
|
break |
|
} |
|
'codex;logout' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;mcp' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'list') |
|
[CompletionResult]::new('get', 'get', [CompletionResultType]::ParameterValue, 'get') |
|
[CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'add') |
|
[CompletionResult]::new('remove', 'remove', [CompletionResultType]::ParameterValue, 'remove') |
|
[CompletionResult]::new('login', 'login', [CompletionResultType]::ParameterValue, 'login') |
|
[CompletionResult]::new('logout', 'logout', [CompletionResultType]::ParameterValue, 'logout') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;mcp;list' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Output the configured servers as JSON') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;mcp;get' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Output the server configuration as JSON') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;mcp;add' { |
|
[CompletionResult]::new('--env', '--env', [CompletionResultType]::ParameterName, 'Environment variables to set when launching the server. Only valid with stdio servers') |
|
[CompletionResult]::new('--url', '--url', [CompletionResultType]::ParameterName, 'URL for a streamable HTTP MCP server') |
|
[CompletionResult]::new('--bearer-token-env-var', '--bearer-token-env-var', [CompletionResultType]::ParameterName, 'Optional environment variable to read for a bearer token. Only valid with streamable HTTP servers') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;mcp;remove' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;mcp;login' { |
|
[CompletionResult]::new('--scopes', '--scopes', [CompletionResultType]::ParameterName, 'Comma-separated list of OAuth scopes to request') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;mcp;logout' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;mcp;help' { |
|
[CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'list') |
|
[CompletionResult]::new('get', 'get', [CompletionResultType]::ParameterValue, 'get') |
|
[CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'add') |
|
[CompletionResult]::new('remove', 'remove', [CompletionResultType]::ParameterValue, 'remove') |
|
[CompletionResult]::new('login', 'login', [CompletionResultType]::ParameterValue, 'login') |
|
[CompletionResult]::new('logout', 'logout', [CompletionResultType]::ParameterValue, 'logout') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;mcp;help;list' { |
|
break |
|
} |
|
'codex;mcp;help;get' { |
|
break |
|
} |
|
'codex;mcp;help;add' { |
|
break |
|
} |
|
'codex;mcp;help;remove' { |
|
break |
|
} |
|
'codex;mcp;help;login' { |
|
break |
|
} |
|
'codex;mcp;help;logout' { |
|
break |
|
} |
|
'codex;mcp;help;help' { |
|
break |
|
} |
|
'codex;mcp-server' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;app-server' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--analytics-default-enabled', '--analytics-default-enabled', [CompletionResultType]::ParameterName, 'Controls whether analytics are enabled by default') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('generate-ts', 'generate-ts', [CompletionResultType]::ParameterValue, '[experimental] Generate TypeScript bindings for the app server protocol') |
|
[CompletionResult]::new('generate-json-schema', 'generate-json-schema', [CompletionResultType]::ParameterValue, '[experimental] Generate JSON Schema for the app server protocol') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;app-server;generate-ts' { |
|
[CompletionResult]::new('-o', '-o', [CompletionResultType]::ParameterName, 'Output directory where .ts files will be written') |
|
[CompletionResult]::new('--out', '--out', [CompletionResultType]::ParameterName, 'Output directory where .ts files will be written') |
|
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Optional path to the Prettier executable to format generated files') |
|
[CompletionResult]::new('--prettier', '--prettier', [CompletionResultType]::ParameterName, 'Optional path to the Prettier executable to format generated files') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--experimental', '--experimental', [CompletionResultType]::ParameterName, 'Include experimental methods and fields in the generated output') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;app-server;generate-json-schema' { |
|
[CompletionResult]::new('-o', '-o', [CompletionResultType]::ParameterName, 'Output directory where the schema bundle will be written') |
|
[CompletionResult]::new('--out', '--out', [CompletionResultType]::ParameterName, 'Output directory where the schema bundle will be written') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--experimental', '--experimental', [CompletionResultType]::ParameterName, 'Include experimental methods and fields in the generated output') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;app-server;help' { |
|
[CompletionResult]::new('generate-ts', 'generate-ts', [CompletionResultType]::ParameterValue, '[experimental] Generate TypeScript bindings for the app server protocol') |
|
[CompletionResult]::new('generate-json-schema', 'generate-json-schema', [CompletionResultType]::ParameterValue, '[experimental] Generate JSON Schema for the app server protocol') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;app-server;help;generate-ts' { |
|
break |
|
} |
|
'codex;app-server;help;generate-json-schema' { |
|
break |
|
} |
|
'codex;app-server;help;help' { |
|
break |
|
} |
|
'codex;completion' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;sandbox' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('macos', 'macos', [CompletionResultType]::ParameterValue, 'Run a command under Seatbelt (macOS only)') |
|
[CompletionResult]::new('seatbelt', 'seatbelt', [CompletionResultType]::ParameterValue, 'Run a command under Seatbelt (macOS only)') |
|
[CompletionResult]::new('linux', 'linux', [CompletionResultType]::ParameterValue, 'Run a command under Landlock+seccomp (Linux only)') |
|
[CompletionResult]::new('landlock', 'landlock', [CompletionResultType]::ParameterValue, 'Run a command under Landlock+seccomp (Linux only)') |
|
[CompletionResult]::new('windows', 'windows', [CompletionResultType]::ParameterValue, 'Run a command under Windows restricted token (Windows only)') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;sandbox;macos' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (network-disabled sandbox that can write to cwd and TMPDIR)') |
|
[CompletionResult]::new('--log-denials', '--log-denials', [CompletionResultType]::ParameterName, 'While the command runs, capture macOS sandbox denials via `log stream` and print them after exit') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;sandbox;seatbelt' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (network-disabled sandbox that can write to cwd and TMPDIR)') |
|
[CompletionResult]::new('--log-denials', '--log-denials', [CompletionResultType]::ParameterName, 'While the command runs, capture macOS sandbox denials via `log stream` and print them after exit') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;sandbox;linux' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (network-disabled sandbox that can write to cwd and TMPDIR)') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;sandbox;landlock' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (network-disabled sandbox that can write to cwd and TMPDIR)') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;sandbox;windows' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (network-disabled sandbox that can write to cwd and TMPDIR)') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;sandbox;help' { |
|
[CompletionResult]::new('macos', 'macos', [CompletionResultType]::ParameterValue, 'Run a command under Seatbelt (macOS only)') |
|
[CompletionResult]::new('linux', 'linux', [CompletionResultType]::ParameterValue, 'Run a command under Landlock+seccomp (Linux only)') |
|
[CompletionResult]::new('windows', 'windows', [CompletionResultType]::ParameterValue, 'Run a command under Windows restricted token (Windows only)') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;sandbox;help;macos' { |
|
break |
|
} |
|
'codex;sandbox;help;linux' { |
|
break |
|
} |
|
'codex;sandbox;help;windows' { |
|
break |
|
} |
|
'codex;sandbox;help;help' { |
|
break |
|
} |
|
'codex;debug' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('app-server', 'app-server', [CompletionResultType]::ParameterValue, 'Tooling: helps debug the app server') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;debug;app-server' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('send-message-v2', 'send-message-v2', [CompletionResultType]::ParameterValue, 'send-message-v2') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;debug;app-server;send-message-v2' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;debug;app-server;help' { |
|
[CompletionResult]::new('send-message-v2', 'send-message-v2', [CompletionResultType]::ParameterValue, 'send-message-v2') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;debug;app-server;help;send-message-v2' { |
|
break |
|
} |
|
'codex;debug;app-server;help;help' { |
|
break |
|
} |
|
'codex;debug;help' { |
|
[CompletionResult]::new('app-server', 'app-server', [CompletionResultType]::ParameterValue, 'Tooling: helps debug the app server') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;debug;help;app-server' { |
|
[CompletionResult]::new('send-message-v2', 'send-message-v2', [CompletionResultType]::ParameterValue, 'send-message-v2') |
|
break |
|
} |
|
'codex;debug;help;app-server;send-message-v2' { |
|
break |
|
} |
|
'codex;debug;help;help' { |
|
break |
|
} |
|
'codex;execpolicy' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('check', 'check', [CompletionResultType]::ParameterValue, 'Check execpolicy files against a command') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;execpolicy;check' { |
|
[CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Paths to execpolicy rule files to evaluate (repeatable)') |
|
[CompletionResult]::new('--rules', '--rules', [CompletionResultType]::ParameterName, 'Paths to execpolicy rule files to evaluate (repeatable)') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--pretty', '--pretty', [CompletionResultType]::ParameterName, 'Pretty-print the JSON output') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;execpolicy;help' { |
|
[CompletionResult]::new('check', 'check', [CompletionResultType]::ParameterValue, 'Check execpolicy files against a command') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;execpolicy;help;check' { |
|
break |
|
} |
|
'codex;execpolicy;help;help' { |
|
break |
|
} |
|
'codex;apply' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;a' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;resume' { |
|
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('--image', '--image', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--model', '--model', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--local-provider', '--local-provider', [CompletionResultType]::ParameterName, 'Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection') |
|
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('--profile', '--profile', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('-s', '-s', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('--sandbox', '--sandbox', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('-a', '-a', [CompletionResultType]::ParameterName, 'Configure when the model requires human approval before executing a command') |
|
[CompletionResult]::new('--ask-for-approval', '--ask-for-approval', [CompletionResultType]::ParameterName, 'Configure when the model requires human approval before executing a command') |
|
[CompletionResult]::new('-C', '-C ', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--cd', '--cd', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--add-dir', '--add-dir', [CompletionResultType]::ParameterName, 'Additional directories that should be writable alongside the primary workspace') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--last', '--last', [CompletionResultType]::ParameterName, 'Continue the most recent session without showing the picker') |
|
[CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Show all sessions (disables cwd filtering and shows CWD column)') |
|
[CompletionResult]::new('--oss', '--oss', [CompletionResultType]::ParameterName, 'Convenience flag to select the local open source model provider. Equivalent to -c model_provider=oss; verifies a local LM Studio or Ollama server is running') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write)') |
|
[CompletionResult]::new('--dangerously-bypass-approvals-and-sandbox', '--dangerously-bypass-approvals-and-sandbox', [CompletionResultType]::ParameterName, 'Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed') |
|
[CompletionResult]::new('--search', '--search', [CompletionResultType]::ParameterName, 'Enable live web search. When enabled, the native Responses `web_search` tool is available to the model (no per‑call approval)') |
|
[CompletionResult]::new('--no-alt-screen', '--no-alt-screen', [CompletionResultType]::ParameterName, 'Disable alternate screen mode') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version') |
|
break |
|
} |
|
'codex;fork' { |
|
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('--image', '--image', [CompletionResultType]::ParameterName, 'Optional image(s) to attach to the initial prompt') |
|
[CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--model', '--model', [CompletionResultType]::ParameterName, 'Model the agent should use') |
|
[CompletionResult]::new('--local-provider', '--local-provider', [CompletionResultType]::ParameterName, 'Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection') |
|
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('--profile', '--profile', [CompletionResultType]::ParameterName, 'Configuration profile from config.toml to specify default options') |
|
[CompletionResult]::new('-s', '-s', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('--sandbox', '--sandbox', [CompletionResultType]::ParameterName, 'Select the sandbox policy to use when executing model-generated shell commands') |
|
[CompletionResult]::new('-a', '-a', [CompletionResultType]::ParameterName, 'Configure when the model requires human approval before executing a command') |
|
[CompletionResult]::new('--ask-for-approval', '--ask-for-approval', [CompletionResultType]::ParameterName, 'Configure when the model requires human approval before executing a command') |
|
[CompletionResult]::new('-C', '-C ', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--cd', '--cd', [CompletionResultType]::ParameterName, 'Tell the agent to use the specified directory as its working root') |
|
[CompletionResult]::new('--add-dir', '--add-dir', [CompletionResultType]::ParameterName, 'Additional directories that should be writable alongside the primary workspace') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--last', '--last', [CompletionResultType]::ParameterName, 'Fork the most recent session without showing the picker') |
|
[CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Show all sessions (disables cwd filtering and shows CWD column)') |
|
[CompletionResult]::new('--oss', '--oss', [CompletionResultType]::ParameterName, 'Convenience flag to select the local open source model provider. Equivalent to -c model_provider=oss; verifies a local LM Studio or Ollama server is running') |
|
[CompletionResult]::new('--full-auto', '--full-auto', [CompletionResultType]::ParameterName, 'Convenience alias for low-friction sandboxed automatic execution (-a on-request, --sandbox workspace-write)') |
|
[CompletionResult]::new('--dangerously-bypass-approvals-and-sandbox', '--dangerously-bypass-approvals-and-sandbox', [CompletionResultType]::ParameterName, 'Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed') |
|
[CompletionResult]::new('--search', '--search', [CompletionResultType]::ParameterName, 'Enable live web search. When enabled, the native Responses `web_search` tool is available to the model (no per‑call approval)') |
|
[CompletionResult]::new('--no-alt-screen', '--no-alt-screen', [CompletionResultType]::ParameterName, 'Disable alternate screen mode') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version') |
|
break |
|
} |
|
'codex;cloud' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version') |
|
[CompletionResult]::new('exec', 'exec', [CompletionResultType]::ParameterValue, 'Submit a new Codex Cloud task without launching the TUI') |
|
[CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Show the status of a Codex Cloud task') |
|
[CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List Codex Cloud tasks') |
|
[CompletionResult]::new('apply', 'apply', [CompletionResultType]::ParameterValue, 'Apply the diff for a Codex Cloud task locally') |
|
[CompletionResult]::new('diff', 'diff', [CompletionResultType]::ParameterValue, 'Show the unified diff for a Codex Cloud task') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;cloud;exec' { |
|
[CompletionResult]::new('--env', '--env', [CompletionResultType]::ParameterName, 'Target environment identifier (see `codex cloud` to browse)') |
|
[CompletionResult]::new('--attempts', '--attempts', [CompletionResultType]::ParameterName, 'Number of assistant attempts (best-of-N)') |
|
[CompletionResult]::new('--branch', '--branch', [CompletionResultType]::ParameterName, 'Git branch to run in Codex Cloud (defaults to current branch)') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;cloud;status' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;cloud;list' { |
|
[CompletionResult]::new('--env', '--env', [CompletionResultType]::ParameterName, 'Filter tasks by environment identifier') |
|
[CompletionResult]::new('--limit', '--limit', [CompletionResultType]::ParameterName, 'Maximum number of tasks to return (1-20)') |
|
[CompletionResult]::new('--cursor', '--cursor', [CompletionResultType]::ParameterName, 'Pagination cursor returned by a previous call') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Emit JSON instead of plain text') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;cloud;apply' { |
|
[CompletionResult]::new('--attempt', '--attempt', [CompletionResultType]::ParameterName, 'Attempt number to apply (1-based)') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;cloud;diff' { |
|
[CompletionResult]::new('--attempt', '--attempt', [CompletionResultType]::ParameterName, 'Attempt number to display (1-based)') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;cloud;help' { |
|
[CompletionResult]::new('exec', 'exec', [CompletionResultType]::ParameterValue, 'Submit a new Codex Cloud task without launching the TUI') |
|
[CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Show the status of a Codex Cloud task') |
|
[CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List Codex Cloud tasks') |
|
[CompletionResult]::new('apply', 'apply', [CompletionResultType]::ParameterValue, 'Apply the diff for a Codex Cloud task locally') |
|
[CompletionResult]::new('diff', 'diff', [CompletionResultType]::ParameterValue, 'Show the unified diff for a Codex Cloud task') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;cloud;help;exec' { |
|
break |
|
} |
|
'codex;cloud;help;status' { |
|
break |
|
} |
|
'codex;cloud;help;list' { |
|
break |
|
} |
|
'codex;cloud;help;apply' { |
|
break |
|
} |
|
'codex;cloud;help;diff' { |
|
break |
|
} |
|
'codex;cloud;help;help' { |
|
break |
|
} |
|
'codex;responses-api-proxy' { |
|
[CompletionResult]::new('--port', '--port', [CompletionResultType]::ParameterName, 'Port to listen on. If not set, an ephemeral port is used') |
|
[CompletionResult]::new('--server-info', '--server-info', [CompletionResultType]::ParameterName, 'Path to a JSON file to write startup info (single line). Includes {"port": <u16>}') |
|
[CompletionResult]::new('--upstream-url', '--upstream-url', [CompletionResultType]::ParameterName, 'Absolute URL the proxy should forward requests to (defaults to OpenAI)') |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('--http-shutdown', '--http-shutdown', [CompletionResultType]::ParameterName, 'Enable HTTP shutdown endpoint at GET /shutdown') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;stdio-to-uds' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;features' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List known features with their stage and effective state') |
|
[CompletionResult]::new('enable', 'enable', [CompletionResultType]::ParameterValue, 'Enable a feature in config.toml') |
|
[CompletionResult]::new('disable', 'disable', [CompletionResultType]::ParameterValue, 'Disable a feature in config.toml') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;features;list' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;features;enable' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;features;disable' { |
|
[CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--config', '--config', [CompletionResultType]::ParameterName, 'Override a configuration value that would otherwise be loaded from `~/.codex/config.toml`. Use a dotted path (`foo.bar.baz`) to override nested values. The `value` portion is parsed as TOML. If it fails to parse as TOML, the raw string is used as a literal') |
|
[CompletionResult]::new('--enable', '--enable', [CompletionResultType]::ParameterName, 'Enable a feature (repeatable). Equivalent to `-c features.<name>=true`') |
|
[CompletionResult]::new('--disable', '--disable', [CompletionResultType]::ParameterName, 'Disable a feature (repeatable). Equivalent to `-c features.<name>=false`') |
|
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')') |
|
break |
|
} |
|
'codex;features;help' { |
|
[CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List known features with their stage and effective state') |
|
[CompletionResult]::new('enable', 'enable', [CompletionResultType]::ParameterValue, 'Enable a feature in config.toml') |
|
[CompletionResult]::new('disable', 'disable', [CompletionResultType]::ParameterValue, 'Disable a feature in config.toml') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;features;help;list' { |
|
break |
|
} |
|
'codex;features;help;enable' { |
|
break |
|
} |
|
'codex;features;help;disable' { |
|
break |
|
} |
|
'codex;features;help;help' { |
|
break |
|
} |
|
'codex;help' { |
|
[CompletionResult]::new('exec', 'exec', [CompletionResultType]::ParameterValue, 'Run Codex non-interactively') |
|
[CompletionResult]::new('review', 'review', [CompletionResultType]::ParameterValue, 'Run a code review non-interactively') |
|
[CompletionResult]::new('login', 'login', [CompletionResultType]::ParameterValue, 'Manage login') |
|
[CompletionResult]::new('logout', 'logout', [CompletionResultType]::ParameterValue, 'Remove stored authentication credentials') |
|
[CompletionResult]::new('mcp', 'mcp', [CompletionResultType]::ParameterValue, '[experimental] Run Codex as an MCP server and manage MCP servers') |
|
[CompletionResult]::new('mcp-server', 'mcp-server', [CompletionResultType]::ParameterValue, '[experimental] Run the Codex MCP server (stdio transport)') |
|
[CompletionResult]::new('app-server', 'app-server', [CompletionResultType]::ParameterValue, '[experimental] Run the app server or related tooling') |
|
[CompletionResult]::new('completion', 'completion', [CompletionResultType]::ParameterValue, 'Generate shell completion scripts') |
|
[CompletionResult]::new('sandbox', 'sandbox', [CompletionResultType]::ParameterValue, 'Run commands within a Codex-provided sandbox') |
|
[CompletionResult]::new('debug', 'debug', [CompletionResultType]::ParameterValue, 'Debugging tools') |
|
[CompletionResult]::new('execpolicy', 'execpolicy', [CompletionResultType]::ParameterValue, 'Execpolicy tooling') |
|
[CompletionResult]::new('apply', 'apply', [CompletionResultType]::ParameterValue, 'Apply the latest diff produced by Codex agent as a `git apply` to your local working tree') |
|
[CompletionResult]::new('resume', 'resume', [CompletionResultType]::ParameterValue, 'Resume a previous interactive session (picker by default; use --last to continue the most recent)') |
|
[CompletionResult]::new('fork', 'fork', [CompletionResultType]::ParameterValue, 'Fork a previous interactive session (picker by default; use --last to fork the most recent)') |
|
[CompletionResult]::new('cloud', 'cloud', [CompletionResultType]::ParameterValue, '[EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally') |
|
[CompletionResult]::new('responses-api-proxy', 'responses-api-proxy', [CompletionResultType]::ParameterValue, 'Internal: run the responses API proxy') |
|
[CompletionResult]::new('stdio-to-uds', 'stdio-to-uds', [CompletionResultType]::ParameterValue, 'Internal: relay stdio to a Unix domain socket') |
|
[CompletionResult]::new('features', 'features', [CompletionResultType]::ParameterValue, 'Inspect feature flags') |
|
[CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') |
|
break |
|
} |
|
'codex;help;exec' { |
|
[CompletionResult]::new('resume', 'resume', [CompletionResultType]::ParameterValue, 'Resume a previous session by id or pick the most recent with --last') |
|
[CompletionResult]::new('review', 'review', [CompletionResultType]::ParameterValue, 'Run a code review against the current repository') |
|
break |
|
} |
|
'codex;help;exec;resume' { |
|
break |
|
} |
|
'codex;help;exec;review' { |
|
break |
|
} |
|
'codex;help;review' { |
|
break |
|
} |
|
'codex;help;login' { |
|
[CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Show login status') |
|
break |
|
} |
|
'codex;help;login;status' { |
|
break |
|
} |
|
'codex;help;logout' { |
|
break |
|
} |
|
'codex;help;mcp' { |
|
[CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'list') |
|
[CompletionResult]::new('get', 'get', [CompletionResultType]::ParameterValue, 'get') |
|
[CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'add') |
|
[CompletionResult]::new('remove', 'remove', [CompletionResultType]::ParameterValue, 'remove') |
|
[CompletionResult]::new('login', 'login', [CompletionResultType]::ParameterValue, 'login') |
|
[CompletionResult]::new('logout', 'logout', [CompletionResultType]::ParameterValue, 'logout') |
|
break |
|
} |
|
'codex;help;mcp;list' { |
|
break |
|
} |
|
'codex;help;mcp;get' { |
|
break |
|
} |
|
'codex;help;mcp;add' { |
|
break |
|
} |
|
'codex;help;mcp;remove' { |
|
break |
|
} |
|
'codex;help;mcp;login' { |
|
break |
|
} |
|
'codex;help;mcp;logout' { |
|
break |
|
} |
|
'codex;help;mcp-server' { |
|
break |
|
} |
|
'codex;help;app-server' { |
|
[CompletionResult]::new('generate-ts', 'generate-ts', [CompletionResultType]::ParameterValue, '[experimental] Generate TypeScript bindings for the app server protocol') |
|
[CompletionResult]::new('generate-json-schema', 'generate-json-schema', [CompletionResultType]::ParameterValue, '[experimental] Generate JSON Schema for the app server protocol') |
|
break |
|
} |
|
'codex;help;app-server;generate-ts' { |
|
break |
|
} |
|
'codex;help;app-server;generate-json-schema' { |
|
break |
|
} |
|
'codex;help;completion' { |
|
break |
|
} |
|
'codex;help;sandbox' { |
|
[CompletionResult]::new('macos', 'macos', [CompletionResultType]::ParameterValue, 'Run a command under Seatbelt (macOS only)') |
|
[CompletionResult]::new('linux', 'linux', [CompletionResultType]::ParameterValue, 'Run a command under Landlock+seccomp (Linux only)') |
|
[CompletionResult]::new('windows', 'windows', [CompletionResultType]::ParameterValue, 'Run a command under Windows restricted token (Windows only)') |
|
break |
|
} |
|
'codex;help;sandbox;macos' { |
|
break |
|
} |
|
'codex;help;sandbox;linux' { |
|
break |
|
} |
|
'codex;help;sandbox;windows' { |
|
break |
|
} |
|
'codex;help;debug' { |
|
[CompletionResult]::new('app-server', 'app-server', [CompletionResultType]::ParameterValue, 'Tooling: helps debug the app server') |
|
break |
|
} |
|
'codex;help;debug;app-server' { |
|
[CompletionResult]::new('send-message-v2', 'send-message-v2', [CompletionResultType]::ParameterValue, 'send-message-v2') |
|
break |
|
} |
|
'codex;help;debug;app-server;send-message-v2' { |
|
break |
|
} |
|
'codex;help;execpolicy' { |
|
[CompletionResult]::new('check', 'check', [CompletionResultType]::ParameterValue, 'Check execpolicy files against a command') |
|
break |
|
} |
|
'codex;help;execpolicy;check' { |
|
break |
|
} |
|
'codex;help;apply' { |
|
break |
|
} |
|
'codex;help;resume' { |
|
break |
|
} |
|
'codex;help;fork' { |
|
break |
|
} |
|
'codex;help;cloud' { |
|
[CompletionResult]::new('exec', 'exec', [CompletionResultType]::ParameterValue, 'Submit a new Codex Cloud task without launching the TUI') |
|
[CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Show the status of a Codex Cloud task') |
|
[CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List Codex Cloud tasks') |
|
[CompletionResult]::new('apply', 'apply', [CompletionResultType]::ParameterValue, 'Apply the diff for a Codex Cloud task locally') |
|
[CompletionResult]::new('diff', 'diff', [CompletionResultType]::ParameterValue, 'Show the unified diff for a Codex Cloud task') |
|
break |
|
} |
|
'codex;help;cloud;exec' { |
|
break |
|
} |
|
'codex;help;cloud;status' { |
|
break |
|
} |
|
'codex;help;cloud;list' { |
|
break |
|
} |
|
'codex;help;cloud;apply' { |
|
break |
|
} |
|
'codex;help;cloud;diff' { |
|
break |
|
} |
|
'codex;help;responses-api-proxy' { |
|
break |
|
} |
|
'codex;help;stdio-to-uds' { |
|
break |
|
} |
|
'codex;help;features' { |
|
[CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List known features with their stage and effective state') |
|
[CompletionResult]::new('enable', 'enable', [CompletionResultType]::ParameterValue, 'Enable a feature in config.toml') |
|
[CompletionResult]::new('disable', 'disable', [CompletionResultType]::ParameterValue, 'Disable a feature in config.toml') |
|
break |
|
} |
|
'codex;help;features;list' { |
|
break |
|
} |
|
'codex;help;features;enable' { |
|
break |
|
} |
|
'codex;help;features;disable' { |
|
break |
|
} |
|
'codex;help;help' { |
|
break |
|
} |
|
}) |
|
|
|
$completions.Where{ $_.CompletionText -like "$wordToComplete*" } | |
|
Sort-Object -Property ListItemText |
|
} |
|
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.