From 69325c97e453b90053efcd9eb0acfadf104a0898 Mon Sep 17 00:00:00 2001 From: PRO-2684 <54608551+PRO-2684@users.noreply.github.com> Date: Wed, 19 Aug 2026 09:42:57 +0800 Subject: [PATCH 1/4] feat: Add Codex completions --- custom-completions/codex/codex-completions.nu | 925 ++++++++++++++++++ 1 file changed, 925 insertions(+) create mode 100644 custom-completions/codex/codex-completions.nu diff --git a/custom-completions/codex/codex-completions.nu b/custom-completions/codex/codex-completions.nu new file mode 100644 index 00000000..fa5c53ef --- /dev/null +++ b/custom-completions/codex/codex-completions.nu @@ -0,0 +1,925 @@ +# Codex CLI completions for Nushell +# Based on Codex 0.148.0 help and its generated Bash completion. + +def "nu-complete codex sandbox" [] { + [read-only workspace-write danger-full-access] +} + +def "nu-complete codex approval-policy" [] { + [untrusted on-request never] +} + +def "nu-complete codex local-provider" [] { + [lmstudio ollama] +} + +def "nu-complete codex color" [] { + [always never auto] +} + +def "nu-complete codex shell" [] { + [bash elvish fish powershell zsh] +} + +def "nu-complete codex ws-auth" [] { + [none token shared-secret] +} + +def "nu-complete codex bool" [] { + [true false] +} + +# Start an interactive Codex session. +export extern codex [ + prompt?: string # Optional prompt to start the session + --config(-c): string # Override a configuration value + --enable: string # Enable a feature + --disable: string # Disable a feature + --remote: string # Connect to a remote app server endpoint + --remote-auth-token-env: string # Environment variable containing the remote bearer token + --strict-config # Reject unrecognized configuration fields + --image(-i): path # Attach an image to the prompt + --model(-m): string # Model to use + --oss # Use an open-source provider + --local-provider: string@"nu-complete codex local-provider" # Open-source provider + --profile(-p): string # Configuration profile + --sandbox(-s): string@"nu-complete codex sandbox" # Sandbox policy + --approve-for-me # Automatically review approval requests + --dangerously-bypass-approvals-and-sandbox # Disable approvals and sandboxing + --dangerously-bypass-hook-trust # Run hooks without persisted trust + --cd(-C): path # Working directory + --add-dir: path # Additional writable directory + --ask-for-approval(-a): string@"nu-complete codex approval-policy" # Approval policy + --search # Enable web search + --no-alt-screen # Disable alternate-screen mode + --help(-h) # Show help + --version(-V) # Show version +] + +# Run Codex non-interactively. +export extern "codex exec" [ + prompt?: string # Initial prompt, or read it from stdin + --image(-i): path # Attach an image + --profile(-p): string # Configuration profile + --sandbox(-s): string@"nu-complete codex sandbox" # Sandbox policy + --cd(-C): path # Working directory + --model(-m): string # Model to use + --output-last-message(-o): path # Write the final message to a file + --strict-config # Reject unrecognized configuration fields + --oss # Use an open-source provider + --local-provider: string@"nu-complete codex local-provider" # Open-source provider + --approve-for-me # Automatically review approval requests + --add-dir: path # Additional writable directory + --dangerously-bypass-approvals-and-sandbox # Disable approvals and sandboxing + --dangerously-bypass-hook-trust # Run hooks without persisted trust + --skip-git-repo-check # Allow running outside a Git repository + --ephemeral # Do not persist session files + --ignore-user-config # Ignore user configuration + --ignore-rules # Ignore repository instruction files + --output-schema: path # JSON Schema for the final response + --color: string@"nu-complete codex color" # Output color mode + --json # Emit JSONL events + --config(-c): string # Override a configuration value + --enable: string # Enable a feature + --disable: string # Disable a feature + --help(-h) # Show help + --version(-V) # Show version +] + +# Alias for `codex exec`. +export extern "codex e" [ + prompt?: string + --help(-h) +] + +# Resume a non-interactive session. +export extern "codex exec resume" [ + session_id?: string + prompt?: string + --last # Resume the most recent session + --all # Show all sessions + --image(-i): path + --model(-m): string + --output-last-message(-o): path + --strict-config + --dangerously-bypass-approvals-and-sandbox + --dangerously-bypass-hook-trust + --skip-git-repo-check + --ephemeral + --ignore-user-config + --ignore-rules + --output-schema: path + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Fork a non-interactive session. +export extern "codex exec fork" [ + session_id: string + prompt?: string + --image(-i): path + --model(-m): string + --output-last-message(-o): path + --strict-config + --dangerously-bypass-approvals-and-sandbox + --dangerously-bypass-hook-trust + --skip-git-repo-check + --ephemeral + --ignore-user-config + --ignore-rules + --output-schema: path + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Run a non-interactive code review. +export extern "codex exec review" [ + prompt?: string + --uncommitted # Review staged, unstaged, and untracked changes + --base: string # Review changes against a base branch + --commit: string # Review a commit + --title: string # Optional review title + --model(-m): string + --output-last-message(-o): path + --strict-config + --dangerously-bypass-approvals-and-sandbox + --dangerously-bypass-hook-trust + --skip-git-repo-check + --ephemeral + --ignore-user-config + --ignore-rules + --output-schema: path + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Run a code review non-interactively. +export extern "codex review" [ + prompt?: string + --strict-config + --uncommitted # Review all local changes + --base: string # Review against a base branch + --commit: string # Review a commit + --title: string # Review title + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Manage authentication. +export extern "codex login" [ + --with-api-key # Read an API key from stdin + --with-access-token # Read an access token from stdin + --api-key: string # API key + --device-auth # Use device-code authentication + --experimental_issuer: string # Experimental OAuth issuer + --experimental_client-id: string # Experimental OAuth client ID + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex login status" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex logout" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Manage MCP servers. +export extern "codex mcp" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex mcp list" [ + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex mcp get" [ + name: string + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex mcp add" [ + name: string + ...command: string # Command for a stdio server + --env: string # Environment variable (KEY=VALUE) + --url: string # URL for a streamable HTTP server + --bearer-token-env-var: string # Bearer-token environment variable + --oauth-client-id: string + --oauth-client-registration: string + --oauth-resource: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex mcp remove" [ + name: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex mcp login" [ + name: string + --scopes: string + --oauth-client-registration: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex mcp logout" [ + name: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Start Codex as an MCP server over stdio. +export extern "codex mcp-server" [ + --strict-config + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Manage Codex plugins. +export extern "codex plugin" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex plugin add" [ + plugin: string # PLUGIN[@MARKETPLACE] + --marketplace(-m): string + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex plugin list" [ + --marketplace(-m): string + --json + --available + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex plugin remove" [ + plugin: string # PLUGIN[@MARKETPLACE] + --marketplace(-m): string + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex plugin marketplace" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex plugin marketplace add" [ + source: string + --ref: string + --sparse: string + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex plugin marketplace list" [ + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex plugin marketplace upgrade" [ + marketplace_name?: string + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex plugin marketplace remove" [ + marketplace_name: string + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Run the experimental app server. +export extern "codex app-server" [ + --code-mode-host: string + --strict-config + --listen: string + --stdio + --remote-control + --analytics-default-enabled: string@"nu-complete codex bool" + --ws-auth: string@"nu-complete codex ws-auth" + --ws-token-file: path + --ws-token-sha256: string + --ws-shared-secret-file: path + --ws-issuer: string + --ws-audience: string + --ws-max-clock-skew-seconds: int + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server daemon" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server daemon bootstrap" [ + --remote-control + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server daemon start" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server daemon restart" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server daemon enable-remote-control" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server daemon disable-remote-control" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server daemon stop" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server daemon version" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server daemon pid-update-loop" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server proxy" [ + --sock: path + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server generate-ts" [ + --out(-o): path + --prettier(-p): path + --experimental + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server generate-json-schema" [ + --out(-o): path + --experimental + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex app-server generate-internal-json-schema" [ + --out(-o): path + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Manage the app-server daemon with remote control enabled. +export extern "codex remote-control" [ + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex remote-control start" [ + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex remote-control stop" [ + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex remote-control pair" [ + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Launch the Codex Desktop app. +export extern "codex app" [ + path?: path + --download-url: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Generate shell completion scripts. +export extern "codex completion" [ + shell?: string@"nu-complete codex shell" + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex update" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Diagnose the local Codex installation. +export extern "codex doctor" [ + --json + --summary + --all + --no-color + --ascii + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Run a command in a Codex-provided sandbox. +export extern "codex sandbox" [ + ...command: string + --sandbox-state-json: string + --sandbox-state-readable-root: path + --sandbox-state-disable-network + --permission-profile(-P): string + --profile(-p): string + --cd(-C): path + --include-managed-config + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Debugging tools. +export extern "codex debug" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex debug models" [ + --bundled + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex debug app-server" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex debug app-server send-message-v2" [ + user_message: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex debug prompt-input" [ + prompt?: string + --image(-i): path + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex debug trace-reduce" [ + trace_bundle: path + --output(-o): path + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex debug clear-memories" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Check a command against Codex execution-policy rules. +export extern "codex execpolicy" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex execpolicy check" [ + ...command: string + --rules(-r): path + --pretty + --resolve-host-executables + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Apply the latest diff produced by a Codex task. +export extern "codex apply" [ + task_id: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Alias for `codex apply`. +export extern "codex a" [ + task_id: string + --help(-h) +] + +# Resume an interactive session. +export extern "codex resume" [ + session_id?: string + prompt?: string + --last + --all + --include-non-interactive + --remote: string + --remote-auth-token-env: string + --strict-config + --image(-i): path + --model(-m): string + --oss + --local-provider: string@"nu-complete codex local-provider" + --profile(-p): string + --sandbox(-s): string@"nu-complete codex sandbox" + --dangerously-bypass-hook-trust + --cd(-C): path + --add-dir: path + --dangerously-bypass-approvals-and-sandbox + --approve-for-me + --ask-for-approval(-a): string@"nu-complete codex approval-policy" + --search + --no-alt-screen + --config(-c): string + --enable: string + --disable: string + --help(-h) + --version(-V) +] + +# Fork an interactive session. +export extern "codex fork" [ + session_id?: string + prompt?: string + --last + --all + --remote: string + --remote-auth-token-env: string + --strict-config + --image(-i): path + --model(-m): string + --oss + --local-provider: string@"nu-complete codex local-provider" + --profile(-p): string + --sandbox(-s): string@"nu-complete codex sandbox" + --dangerously-bypass-hook-trust + --cd(-C): path + --add-dir: path + --dangerously-bypass-approvals-and-sandbox + --approve-for-me + --ask-for-approval(-a): string@"nu-complete codex approval-policy" + --search + --no-alt-screen + --config(-c): string + --enable: string + --disable: string + --help(-h) + --version(-V) +] + +export extern "codex archive" [ + session: string + --remote: string + --remote-auth-token-env: string + --image(-i): path + --model(-m): string + --oss + --local-provider: string@"nu-complete codex local-provider" + --profile(-p): string + --sandbox(-s): string@"nu-complete codex sandbox" + --approve-for-me + --dangerously-bypass-approvals-and-sandbox + --dangerously-bypass-hook-trust + --cd(-C): path + --add-dir: path + --strict-config + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex unarchive" [ + session: string + --remote: string + --remote-auth-token-env: string + --image(-i): path + --model(-m): string + --oss + --local-provider: string@"nu-complete codex local-provider" + --profile(-p): string + --sandbox(-s): string@"nu-complete codex sandbox" + --approve-for-me + --dangerously-bypass-approvals-and-sandbox + --dangerously-bypass-hook-trust + --cd(-C): path + --add-dir: path + --strict-config + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex delete" [ + session: string + --force + --remote: string + --remote-auth-token-env: string + --image(-i): path + --model(-m): string + --oss + --local-provider: string@"nu-complete codex local-provider" + --profile(-p): string + --sandbox(-s): string@"nu-complete codex sandbox" + --approve-for-me + --dangerously-bypass-approvals-and-sandbox + --dangerously-bypass-hook-trust + --cd(-C): path + --add-dir: path + --strict-config + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex migrate-rollouts" [ + --apply + --thread: string + --max-mib-per-second: number + --json + --verbose + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Browse Codex Cloud tasks and apply changes locally. +export extern "codex cloud" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) + --version(-V) +] + +export extern "codex cloud exec" [ + query?: string + --env: string + --attempts: int + --branch: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex cloud status" [ + task_id: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex cloud list" [ + --env: string + --limit: int + --cursor: string + --json + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex cloud apply" [ + task_id: string + --attempt: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex cloud diff" [ + task_id: string + --attempt: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Run the standalone exec-server service. +export extern "codex exec-server" [ + --strict-config + --concurrent-requests: int + --listen: string + --remote: string + --environment-id: string + --name: string + --use-agent-identity-auth + --exit-on-stdin-close + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Inspect feature flags. +export extern "codex features" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex features list" [ + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex features enable" [ + feature: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex features disable" [ + feature: string + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +# Internal utility commands included by Codex's generated completion. +export extern "codex responses-api-proxy" [ + --port: int + --server-info: path + --http-shutdown + --upstream-url: string + --dump-dir: path + --config(-c): string + --enable: string + --disable: string + --help(-h) +] + +export extern "codex stdio-to-uds" [ + socket_path: path + --config(-c): string + --enable: string + --disable: string + --help(-h) +] From 65c43a6d51c9c14e70cfa2aa4c2e6696e21ce2a5 Mon Sep 17 00:00:00 2001 From: PRO-2684 <54608551+PRO-2684@users.noreply.github.com> Date: Wed, 19 Aug 2026 09:52:26 +0800 Subject: [PATCH 2/4] docs: Add Codex completion README --- custom-completions/codex/README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 custom-completions/codex/README.md diff --git a/custom-completions/codex/README.md b/custom-completions/codex/README.md new file mode 100644 index 00000000..c081953d --- /dev/null +++ b/custom-completions/codex/README.md @@ -0,0 +1,5 @@ +# Codex CLI completions + +[Codex CLI](https://developers.openai.com/codex/cli) is an OpenAI coding agent that runs in your terminal. + +This directory provides Nushell completions for the `codex` command and its subcommands. From b80e061d7fe3c4ecf35ae3154ee6949528691023 Mon Sep 17 00:00:00 2001 From: PRO-2684 <54608551+PRO-2684@users.noreply.github.com> Date: Wed, 19 Aug 2026 09:54:45 +0800 Subject: [PATCH 3/4] fix: Update Codex product link --- custom-completions/codex/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-completions/codex/README.md b/custom-completions/codex/README.md index c081953d..ef236b37 100644 --- a/custom-completions/codex/README.md +++ b/custom-completions/codex/README.md @@ -1,5 +1,5 @@ # Codex CLI completions -[Codex CLI](https://developers.openai.com/codex/cli) is an OpenAI coding agent that runs in your terminal. +[Codex CLI](https://learn.chatgpt.com/docs/codex/cli) is an OpenAI coding agent that runs in your terminal. This directory provides Nushell completions for the `codex` command and its subcommands. From 2d98d043edac8dae1a8bab9be74ab8349b5de0c8 Mon Sep 17 00:00:00 2001 From: PRO-2684 <54608551+PRO-2684@users.noreply.github.com> Date: Wed, 19 Aug 2026 20:47:26 +0800 Subject: [PATCH 4/4] fix(codex-completions): Using generated completion script --- custom-completions/codex/codex-completions.nu | 2619 +++++++++++------ 1 file changed, 1703 insertions(+), 916 deletions(-) diff --git a/custom-completions/codex/codex-completions.nu b/custom-completions/codex/codex-completions.nu index fa5c53ef..8b071394 100644 --- a/custom-completions/codex/codex-completions.nu +++ b/custom-completions/codex/codex-completions.nu @@ -1,925 +1,1712 @@ -# Codex CLI completions for Nushell -# Based on Codex 0.148.0 help and its generated Bash completion. +module completions { + + def "nu-complete codex sandbox_mode" [] { + [ "read-only" "workspace-write" "danger-full-access" ] + } + + def "nu-complete codex approval_policy" [] { + [ "untrusted" "on-request" "never" ] + } + + # Codex CLI + export extern codex [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --remote: string # Connect the TUI to a remote app server endpoint + --remote-auth-token-env: string # Name of the environment variable containing the bearer token to send to a remote app server websocket + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --image(-i): path # Optional image(s) to attach to the initial prompt + --model(-m): string # Model the agent should use + --oss # Use open-source provider + --local-provider: string # Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection + --profile(-p): string # Layer $CODEX_HOME/.config.toml on top of the base user config + --sandbox(-s): string@"nu-complete codex sandbox_mode" # Select the sandbox policy to use when executing model-generated shell commands + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --cd(-C): path # Tell the agent to use the specified directory as its working root + --add-dir: path # Additional directories that should be writable alongside the primary workspace + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --approve-for-me # Route approval requests through automatic review using the workspace-write sandbox + --ask-for-approval(-a): string@"nu-complete codex approval_policy" # Configure when the model requires human approval before executing a command + --search # Enable live web search. When enabled, the native Responses `web_search` tool is available to the model (no per‑call approval) + --no-alt-screen # Disable alternate screen mode + --help(-h) # Print help (see more with '--help') + --version(-V) # Print version + prompt?: string # Optional user prompt to start the session + ] + + # Browse all agent sessions on the shared local app-server daemon + export extern "codex agents" [ + --remote: string # Connect the TUI to a remote app server endpoint + --remote-auth-token-env: string # Name of the environment variable containing the bearer token to send to a remote app server websocket + --cd(-C): path # Use this directory for new tasks on a remote server + --no-alt-screen # Disable alternate screen mode + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + def "nu-complete codex exec sandbox_mode" [] { + [ "read-only" "workspace-write" "danger-full-access" ] + } + + def "nu-complete codex exec color" [] { + [ "always" "never" "auto" ] + } + + # Run Codex non-interactively + export extern "codex exec" [ + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --image(-i): path # Optional image(s) to attach to the initial prompt + --oss # Use open-source provider + --local-provider: string # Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection + --profile(-p): string # Layer $CODEX_HOME/.config.toml on top of the base user config + --sandbox(-s): string@"nu-complete codex exec sandbox_mode" # Select the sandbox policy to use when executing model-generated shell commands + --approve-for-me # Route approval requests through automatic review using the workspace-write sandbox + --cd(-C): path # Tell the agent to use the specified directory as its working root + --add-dir: path # Additional directories that should be writable alongside the primary workspace + --model(-m): string # Model the agent should use + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --skip-git-repo-check # Allow running Codex outside a Git repository + --ephemeral # Run without persisting session files to disk + --ignore-user-config # Do not load `$CODEX_HOME/config.toml`; auth still uses `CODEX_HOME` + --ignore-rules # Do not load user or project execpolicy `.rules` files + --output-schema: path # Path to a JSON Schema file describing the model's final response shape + --color: string@"nu-complete codex exec color" # Specifies color settings for use in the output + --json # Print events to stdout as JSONL + --output-last-message(-o): path # Specifies file where the last message from the agent should be written + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + --version(-V) # Print version + prompt?: string # Initial instructions for the agent. If not provided as an argument (or if `-` is used), instructions are read from stdin. If stdin is piped and a prompt is also provided, stdin is appended as a `` block + ] + + # Resume a previous session by id or pick the most recent with --last + export extern "codex exec resume" [ + --last # Resume the most recent recorded session (newest) without specifying an id + --all # Show all sessions (disables cwd filtering) + --image(-i): path # Optional image(s) to attach to the prompt sent after resuming + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --model(-m): string # Model the agent should use + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --skip-git-repo-check # Allow running Codex outside a Git repository + --ephemeral # Run without persisting session files to disk + --ignore-user-config # Do not load `$CODEX_HOME/config.toml`; auth still uses `CODEX_HOME` + --ignore-rules # Do not load user or project execpolicy `.rules` files + --output-schema: path # Path to a JSON Schema file describing the model's final response shape + --json # Print events to stdout as JSONL + --output-last-message(-o): path # Specifies file where the last message from the agent should be written + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + session_id?: string # Conversation/session id (UUID) or thread name. UUIDs take precedence if it parses. If omitted, use --last to pick the most recent recorded session + prompt?: string # Prompt to send after resuming the session. If `-` is used, read from stdin + ] + + # Fork a previous session by id into a new session + export extern "codex exec fork" [ + --image(-i): path # Optional image(s) to attach to the prompt sent after forking + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --model(-m): string # Model the agent should use + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --skip-git-repo-check # Allow running Codex outside a Git repository + --ephemeral # Run without persisting session files to disk + --ignore-user-config # Do not load `$CODEX_HOME/config.toml`; auth still uses `CODEX_HOME` + --ignore-rules # Do not load user or project execpolicy `.rules` files + --output-schema: path # Path to a JSON Schema file describing the model's final response shape + --json # Print events to stdout as JSONL + --output-last-message(-o): path # Specifies file where the last message from the agent should be written + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + session_id: string # Conversation/session id (UUID) or thread name to fork + prompt?: string # Optional prompt to send after forking. If `-` is used, read from stdin + ] + + # Run a code review against the current repository + export extern "codex exec review" [ + --uncommitted # Review staged, unstaged, and untracked changes + --base: string # Review changes against the given base branch + --commit: string # Review the changes introduced by a commit + --title: string # Optional commit title to display in the review summary + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --model(-m): string # Model the agent should use + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --skip-git-repo-check # Allow running Codex outside a Git repository + --ephemeral # Run without persisting session files to disk + --ignore-user-config # Do not load `$CODEX_HOME/config.toml`; auth still uses `CODEX_HOME` + --ignore-rules # Do not load user or project execpolicy `.rules` files + --output-schema: path # Path to a JSON Schema file describing the model's final response shape + --json # Print events to stdout as JSONL + --output-last-message(-o): path # Specifies file where the last message from the agent should be written + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + prompt?: string # Custom review instructions. If `-` is used, read from stdin + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex exec help" [ + ] + + # Resume a previous session by id or pick the most recent with --last + export extern "codex exec help resume" [ + ] + + # Fork a previous session by id into a new session + export extern "codex exec help fork" [ + ] + + # Run a code review against the current repository + export extern "codex exec help review" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex exec help help" [ + ] + + # Run a code review non-interactively + export extern "codex review" [ + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --uncommitted # Review staged, unstaged, and untracked changes + --base: string # Review changes against the given base branch + --commit: string # Review the changes introduced by a commit + --title: string # Optional commit title to display in the review summary + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + prompt?: string # Custom review instructions. If `-` is used, read from stdin + ] + + # Manage login + export extern "codex login" [ + --with-api-key # Read the API key from stdin (e.g. `printenv OPENAI_API_KEY | codex login --with-api-key`) + --with-access-token # Read the access token from stdin (e.g. `printenv CODEX_ACCESS_TOKEN | codex login --with-access-token`) + --api-key: string # (deprecated) Previously accepted the API key directly; now exits with guidance to use --with-api-key + --device-auth + --experimental_issuer: string # EXPERIMENTAL: Use custom OAuth issuer base URL (advanced) Override the OAuth issuer base URL (advanced) + --experimental_client-id: string # EXPERIMENTAL: Use custom OAuth client ID (advanced) + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Show login status + export extern "codex login status" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex login help" [ + ] + + # Show login status + export extern "codex login help status" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex login help help" [ + ] + + # Remove stored authentication credentials + export extern "codex logout" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Manage external MCP servers for Codex + export extern "codex mcp" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + export extern "codex mcp list" [ + --json # Output the configured servers as JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + export extern "codex mcp get" [ + --json # Output the server configuration as JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + name: string # Name of the MCP server to display + ] + + def "nu-complete codex mcp add oauth_client_registration" [] { + [ "auto" "cimd" "dcr" ] + } + + export extern "codex mcp add" [ + --env: string # Environment variables to set when launching the server. Only valid with stdio servers + --url: string # URL for a streamable HTTP MCP server + --bearer-token-env-var: string # Optional environment variable to read for a bearer token. Only valid with streamable HTTP servers + --oauth-client-id: string # Optional OAuth client identifier to use for this MCP server + --oauth-client-registration: string@"nu-complete codex mcp add oauth_client_registration" # OAuth client-registration strategy for the immediate login only + --oauth-resource: string # Optional OAuth resource parameter to include during MCP login + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + name: string # Name for the MCP server configuration + ...command: string # Command to launch the MCP server. Use --url for a streamable HTTP server + ] + + export extern "codex mcp remove" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + name: string # Name of the MCP server configuration to remove + ] + + def "nu-complete codex mcp login oauth_client_registration" [] { + [ "auto" "cimd" "dcr" ] + } + + export extern "codex mcp login" [ + --scopes: string # Comma-separated list of OAuth scopes to request + --oauth-client-registration: string@"nu-complete codex mcp login oauth_client_registration" # OAuth client-registration strategy for this login only + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + name: string # Name of the MCP server to authenticate with oauth + ] + + export extern "codex mcp logout" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + name: string # Name of the MCP server to deauthenticate + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex mcp help" [ + ] + + export extern "codex mcp help list" [ + ] + + export extern "codex mcp help get" [ + ] + + export extern "codex mcp help add" [ + ] + + export extern "codex mcp help remove" [ + ] + + export extern "codex mcp help login" [ + ] + + export extern "codex mcp help logout" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex mcp help help" [ + ] + + # Manage Codex plugins + export extern "codex plugin" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Install a plugin from a configured marketplace snapshot + export extern "codex plugin add" [ + --marketplace(-m): string # Configured marketplace name to use when PLUGIN does not include @MARKETPLACE + --json # Output install result as JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + plugin: string # Plugin selector to install: either PLUGIN@MARKETPLACE or PLUGIN with --marketplace + ] + + # List plugins available from configured marketplace snapshots + export extern "codex plugin list" [ + --marketplace(-m): string # Only list plugins from this configured marketplace name + --json # Output plugin list as JSON + --available # Include uninstalled marketplace plugins in the JSON output + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Add, list, upgrade, or remove configured plugin marketplaces + export extern "codex plugin marketplace" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Add a local or Git marketplace to the configured marketplace sources + export extern "codex plugin marketplace add" [ + --ref: string # Git ref to fetch for Git marketplace sources + --sparse: string # Sparse checkout path for Git marketplace sources. Can be repeated + --json # Output add result as JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + source: string # Marketplace source: a local path, owner/repo[@ref], HTTPS Git URL, or SSH Git URL + ] + + # List plugin marketplaces Codex is currently considering and their roots + export extern "codex plugin marketplace list" [ + --json # Output marketplace list as JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Refresh configured Git marketplace snapshots + export extern "codex plugin marketplace upgrade" [ + --json # Output upgrade result as JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + marketplace_name?: string # Optional configured marketplace name to upgrade. Omit to upgrade all Git marketplaces + ] + + # Remove a configured marketplace source by name + export extern "codex plugin marketplace remove" [ + --json # Output remove result as JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + marketplace_name: string # Configured marketplace name to remove + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex plugin marketplace help" [ + ] + + # Add a local or Git marketplace to the configured marketplace sources + export extern "codex plugin marketplace help add" [ + ] + + # List plugin marketplaces Codex is currently considering and their roots + export extern "codex plugin marketplace help list" [ + ] + + # Refresh configured Git marketplace snapshots + export extern "codex plugin marketplace help upgrade" [ + ] + + # Remove a configured marketplace source by name + export extern "codex plugin marketplace help remove" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex plugin marketplace help help" [ + ] + + # Remove an installed plugin from local config and cache + export extern "codex plugin remove" [ + --marketplace(-m): string # Marketplace name to use when PLUGIN does not include @MARKETPLACE + --json # Output remove result as JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + plugin: string # Plugin selector to remove: either PLUGIN@MARKETPLACE or PLUGIN with --marketplace + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex plugin help" [ + ] + + # Install a plugin from a configured marketplace snapshot + export extern "codex plugin help add" [ + ] + + # List plugins available from configured marketplace snapshots + export extern "codex plugin help list" [ + ] + + # Add, list, upgrade, or remove configured plugin marketplaces + export extern "codex plugin help marketplace" [ + ] + + # Add a local or Git marketplace to the configured marketplace sources + export extern "codex plugin help marketplace add" [ + ] + + # List plugin marketplaces Codex is currently considering and their roots + export extern "codex plugin help marketplace list" [ + ] + + # Refresh configured Git marketplace snapshots + export extern "codex plugin help marketplace upgrade" [ + ] + + # Remove a configured marketplace source by name + export extern "codex plugin help marketplace remove" [ + ] + + # Remove an installed plugin from local config and cache + export extern "codex plugin help remove" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex plugin help help" [ + ] + + # Start Codex as an MCP server (stdio) + export extern "codex mcp-server" [ + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + def "nu-complete codex app-server ws_auth" [] { + [ "capability-token" "signed-bearer-token" ] + } + + # [experimental] Run the app server or related tooling + export extern "codex app-server" [ + --code-mode-host: string # Connect to a remote code-mode host instead of starting a local host + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --listen: string # Transport endpoint URL. Supported values: `stdio://` (default), `unix://`, `unix://PATH`, `ws://IP:PORT`, `off` + --stdio # Use stdio as the transport (equivalent to `--listen stdio://`) + --remote-control # Enable remote control for this app-server process without changing persistence + --analytics-default-enabled # Controls whether analytics are enabled by default + --ws-auth: string@"nu-complete codex app-server ws_auth" # Websocket auth mode for non-loopback listeners + --ws-token-file: path # Absolute path to the capability-token file + --ws-token-sha256: string # Hex-encoded SHA-256 digest of the capability token + --ws-shared-secret-file: path # Absolute path to the shared secret file for signed JWT bearer tokens + --ws-issuer: string # Expected issuer for signed JWT bearer tokens + --ws-audience: string # Expected audience for signed JWT bearer tokens + --ws-max-clock-skew-seconds: string # Maximum clock skew when validating signed JWT bearer tokens + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Manage the local app-server daemon + export extern "codex app-server daemon" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Install durable local app-server management for SSH-driven use + export extern "codex app-server daemon bootstrap" [ + --remote-control # Launch the managed app-server with remote control enabled + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Start the local app server daemon if it is not already running + export extern "codex app-server daemon start" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Restart the local app server daemon + export extern "codex app-server daemon restart" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Enable remote control for future starts and a currently running managed daemon + export extern "codex app-server daemon enable-remote-control" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Disable remote control for future starts and a currently running managed daemon + export extern "codex app-server daemon disable-remote-control" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Stop the local app server daemon + export extern "codex app-server daemon stop" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Print local CLI and running app-server versions as JSON + export extern "codex app-server daemon version" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # [internal] Run the detached pid-backed standalone updater loop + export extern "codex app-server daemon pid-update-loop" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex app-server daemon help" [ + ] + + # Install durable local app-server management for SSH-driven use + export extern "codex app-server daemon help bootstrap" [ + ] + + # Start the local app server daemon if it is not already running + export extern "codex app-server daemon help start" [ + ] + + # Restart the local app server daemon + export extern "codex app-server daemon help restart" [ + ] + + # Enable remote control for future starts and a currently running managed daemon + export extern "codex app-server daemon help enable-remote-control" [ + ] + + # Disable remote control for future starts and a currently running managed daemon + export extern "codex app-server daemon help disable-remote-control" [ + ] + + # Stop the local app server daemon + export extern "codex app-server daemon help stop" [ + ] + + # Print local CLI and running app-server versions as JSON + export extern "codex app-server daemon help version" [ + ] + + # [internal] Run the detached pid-backed standalone updater loop + export extern "codex app-server daemon help pid-update-loop" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex app-server daemon help help" [ + ] + + # Proxy stdio bytes to the running app-server control socket + export extern "codex app-server proxy" [ + --sock: string # Path to the app-server Unix domain socket to connect to + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # [experimental] Generate TypeScript bindings for the app server protocol + export extern "codex app-server generate-ts" [ + --out(-o): path # Output directory where .ts files will be written + --prettier(-p): path # Optional path to the Prettier executable to format generated files + --experimental # Include experimental methods and fields in the generated output + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # [experimental] Generate JSON Schema for the app server protocol + export extern "codex app-server generate-json-schema" [ + --out(-o): path # Output directory where the schema bundle will be written + --experimental # Include experimental methods and fields in the generated output + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # [internal] Generate internal JSON Schema artifacts for Codex tooling + export extern "codex app-server generate-internal-json-schema" [ + --out(-o): path # Output directory where internal JSON Schema artifacts will be written + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex app-server help" [ + ] + + # Manage the local app-server daemon + export extern "codex app-server help daemon" [ + ] + + # Install durable local app-server management for SSH-driven use + export extern "codex app-server help daemon bootstrap" [ + ] + + # Start the local app server daemon if it is not already running + export extern "codex app-server help daemon start" [ + ] + + # Restart the local app server daemon + export extern "codex app-server help daemon restart" [ + ] + + # Enable remote control for future starts and a currently running managed daemon + export extern "codex app-server help daemon enable-remote-control" [ + ] + + # Disable remote control for future starts and a currently running managed daemon + export extern "codex app-server help daemon disable-remote-control" [ + ] + + # Stop the local app server daemon + export extern "codex app-server help daemon stop" [ + ] + + # Print local CLI and running app-server versions as JSON + export extern "codex app-server help daemon version" [ + ] + + # [internal] Run the detached pid-backed standalone updater loop + export extern "codex app-server help daemon pid-update-loop" [ + ] + + # Proxy stdio bytes to the running app-server control socket + export extern "codex app-server help proxy" [ + ] + + # [experimental] Generate TypeScript bindings for the app server protocol + export extern "codex app-server help generate-ts" [ + ] + + # [experimental] Generate JSON Schema for the app server protocol + export extern "codex app-server help generate-json-schema" [ + ] + + # [internal] Generate internal JSON Schema artifacts for Codex tooling + export extern "codex app-server help generate-internal-json-schema" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex app-server help help" [ + ] + + # [experimental] Manage the app-server daemon with remote control enabled + export extern "codex remote-control" [ + --json # Emit machine-readable JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Start the app-server daemon with remote control enabled + export extern "codex remote-control start" [ + --json # Emit machine-readable JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Stop the app-server daemon + export extern "codex remote-control stop" [ + --json # Emit machine-readable JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Create and print a short-lived manual pairing code + export extern "codex remote-control pair" [ + --json # Emit machine-readable JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex remote-control help" [ + ] + + # Start the app-server daemon with remote control enabled + export extern "codex remote-control help start" [ + ] + + # Stop the app-server daemon + export extern "codex remote-control help stop" [ + ] + + # Create and print a short-lived manual pairing code + export extern "codex remote-control help pair" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex remote-control help help" [ + ] + + def "nu-complete codex completion shell" [] { + [ "bash" "elvish" "fish" "powershell" "zsh" "nushell" ] + } + + # Generate shell completion scripts + export extern "codex completion" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + shell?: string@"nu-complete codex completion shell" # Shell to generate completions for + ] + + # Update Codex to the latest version + export extern "codex update" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Diagnose local Codex installation, config, auth, and runtime health + export extern "codex doctor" [ + --json # Emit a redacted machine-readable report + --summary # Only show grouped check rows and the final count summary + --all # Expand long lists in detailed human output + --no-color # Disable ANSI color in human output + --ascii # Use ASCII status labels and separators in human output + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Run commands within a Codex-provided sandbox + export extern "codex sandbox" [ + --sandbox-state-json: string # JSON value from `codex/sandbox-state-meta` to apply directly + --sandbox-state-readable-root: string # Add a readable root to the supplied sandbox state. Repeat for multiple roots + --sandbox-state-disable-network # Disable direct network access in the supplied sandbox state + --permission-profile(-P): string # Named permissions profile to apply from the active configuration stack + --profile(-p): string # Layer $CODEX_HOME/.config.toml on top of the base user config + --cd(-C): path # Working directory used for profile resolution and command execution + --include-managed-config # Include managed requirements while resolving an explicit permissions profile + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ...command: string # Full command args to run under the Linux sandbox + ] + + # Debugging tools + export extern "codex debug" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Render the raw model catalog as JSON + export extern "codex debug models" [ + --bundled # Skip refresh and dump only the bundled catalog shipped with this binary + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Tooling: helps debug the app server + export extern "codex debug app-server" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + export extern "codex debug app-server send-message-v2" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + user_message: string + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex debug app-server help" [ + ] + + export extern "codex debug app-server help send-message-v2" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex debug app-server help help" [ + ] + + # Render the model-visible prompt input list as JSON + export extern "codex debug prompt-input" [ + --image(-i): path # Optional image(s) to attach to the user prompt + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + prompt?: string # Optional user prompt to append after session context + ] + + # Replay a rollout trace bundle and write reduced state JSON + export extern "codex debug trace-reduce" [ + --output(-o): path # Output path for reduced RolloutTrace JSON. Defaults to TRACE_BUNDLE/state.json + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + trace_bundle: path # Trace bundle directory containing manifest.json and trace.jsonl + ] + + # Internal: reset local memory state for a fresh start + export extern "codex debug clear-memories" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex debug help" [ + ] + + # Render the raw model catalog as JSON + export extern "codex debug help models" [ + ] + + # Tooling: helps debug the app server + export extern "codex debug help app-server" [ + ] + + export extern "codex debug help app-server send-message-v2" [ + ] + + # Render the model-visible prompt input list as JSON + export extern "codex debug help prompt-input" [ + ] + + # Replay a rollout trace bundle and write reduced state JSON + export extern "codex debug help trace-reduce" [ + ] + + # Internal: reset local memory state for a fresh start + export extern "codex debug help clear-memories" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex debug help help" [ + ] + + # Execpolicy tooling + export extern "codex execpolicy" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Check execpolicy files against a command + export extern "codex execpolicy check" [ + --rules(-r): path # Paths to execpolicy rule files to evaluate (repeatable) + --pretty # Pretty-print the JSON output + --resolve-host-executables # Resolve absolute program paths against basename rules, gated by any `host_executable()` definitions in the loaded policy files + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ...command: string # Command tokens to check against the policy + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex execpolicy help" [ + ] + + # Check execpolicy files against a command + export extern "codex execpolicy help check" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex execpolicy help help" [ + ] + + # Apply the latest diff produced by Codex agent as a `git apply` to your local working tree + export extern "codex apply" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + task_id: string + ] + + def "nu-complete codex resume sandbox_mode" [] { + [ "read-only" "workspace-write" "danger-full-access" ] + } + + def "nu-complete codex resume approval_policy" [] { + [ "untrusted" "on-request" "never" ] + } + + # Resume a previous interactive session (picker by default; use --last to continue the most recent) + export extern "codex resume" [ + --last # Continue the most recent session without showing the picker + --all # Show all sessions (disables cwd filtering and shows CWD column) + --include-non-interactive # Include non-interactive sessions in the resume picker and --last selection + --remote: string # Connect the TUI to a remote app server endpoint + --remote-auth-token-env: string # Name of the environment variable containing the bearer token to send to a remote app server websocket + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --image(-i): path # Optional image(s) to attach to the initial prompt + --model(-m): string # Model the agent should use + --oss # Use open-source provider + --local-provider: string # Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection + --profile(-p): string # Layer $CODEX_HOME/.config.toml on top of the base user config + --sandbox(-s): string@"nu-complete codex resume sandbox_mode" # Select the sandbox policy to use when executing model-generated shell commands + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --cd(-C): path # Tell the agent to use the specified directory as its working root + --add-dir: path # Additional directories that should be writable alongside the primary workspace + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --approve-for-me # Route approval requests through automatic review using the workspace-write sandbox + --ask-for-approval(-a): string@"nu-complete codex resume approval_policy" # Configure when the model requires human approval before executing a command + --search # Enable live web search. When enabled, the native Responses `web_search` tool is available to the model (no per‑call approval) + --no-alt-screen # Disable alternate screen mode + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + --version(-V) # Print version + session_id?: string # Session id (UUID) or session name. UUIDs take precedence if it parses. If omitted, use --last to pick the most recent recorded session + prompt?: string # Optional user prompt to start the session + ] + + def "nu-complete codex queue sandbox_mode" [] { + [ "read-only" "workspace-write" "danger-full-access" ] + } + + # Queue a message for an existing session + export extern "codex queue" [ + --thread: string # Session UUID or exact session name + --message: string # Message text to queue + --remote: string # Connect the TUI to a remote app server endpoint + --remote-auth-token-env: string # Name of the environment variable containing the bearer token to send to a remote app server websocket + --image(-i): path # Optional image(s) to attach to the initial prompt + --model(-m): string # Model the agent should use + --oss # Use open-source provider + --local-provider: string # Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection + --profile(-p): string # Layer $CODEX_HOME/.config.toml on top of the base user config + --sandbox(-s): string@"nu-complete codex queue sandbox_mode" # Select the sandbox policy to use when executing model-generated shell commands + --approve-for-me # Route approval requests through automatic review using the workspace-write sandbox + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --cd(-C): path # Tell the agent to use the specified directory as its working root + --add-dir: path # Additional directories that should be writable alongside the primary workspace + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + def "nu-complete codex archive sandbox_mode" [] { + [ "read-only" "workspace-write" "danger-full-access" ] + } + + # Archive a saved session by id or session name + export extern "codex archive" [ + --remote: string # Connect the TUI to a remote app server endpoint + --remote-auth-token-env: string # Name of the environment variable containing the bearer token to send to a remote app server websocket + --image(-i): path # Optional image(s) to attach to the initial prompt + --model(-m): string # Model the agent should use + --oss # Use open-source provider + --local-provider: string # Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection + --profile(-p): string # Layer $CODEX_HOME/.config.toml on top of the base user config + --sandbox(-s): string@"nu-complete codex archive sandbox_mode" # Select the sandbox policy to use when executing model-generated shell commands + --approve-for-me # Route approval requests through automatic review using the workspace-write sandbox + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --cd(-C): path # Tell the agent to use the specified directory as its working root + --add-dir: path # Additional directories that should be writable alongside the primary workspace + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + target: string # Session id (UUID) or session name. UUIDs take precedence if it parses + ] + + def "nu-complete codex delete sandbox_mode" [] { + [ "read-only" "workspace-write" "danger-full-access" ] + } + + # Permanently delete a saved session by id or session name + export extern "codex delete" [ + --remote: string # Connect the TUI to a remote app server endpoint + --remote-auth-token-env: string # Name of the environment variable containing the bearer token to send to a remote app server websocket + --image(-i): path # Optional image(s) to attach to the initial prompt + --model(-m): string # Model the agent should use + --oss # Use open-source provider + --local-provider: string # Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection + --profile(-p): string # Layer $CODEX_HOME/.config.toml on top of the base user config + --sandbox(-s): string@"nu-complete codex delete sandbox_mode" # Select the sandbox policy to use when executing model-generated shell commands + --approve-for-me # Route approval requests through automatic review using the workspace-write sandbox + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --cd(-C): path # Tell the agent to use the specified directory as its working root + --add-dir: path # Additional directories that should be writable alongside the primary workspace + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --config(-c): string # 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 + --force # Delete without prompting. SESSION must be a UUID + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + target: string # Session id (UUID) or session name. UUIDs take precedence if it parses + ] + + # Inspect or migrate legacy local sessions to paginated thread history + export extern "codex migrate-rollouts" [ + --apply # Publish the migration. Without this flag the command only reports eligible sessions + --thread: string # Restrict inspection or migration to one or more thread IDs + --max-mib-per-second: string # Limit aggregate rollout read and write throughput, in MiB per second + --json # Emit the complete per-thread report as JSON + --verbose # Print one line for every inspected rollout + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + def "nu-complete codex unarchive sandbox_mode" [] { + [ "read-only" "workspace-write" "danger-full-access" ] + } + + # Unarchive a saved session by id or session name + export extern "codex unarchive" [ + --remote: string # Connect the TUI to a remote app server endpoint + --remote-auth-token-env: string # Name of the environment variable containing the bearer token to send to a remote app server websocket + --image(-i): path # Optional image(s) to attach to the initial prompt + --model(-m): string # Model the agent should use + --oss # Use open-source provider + --local-provider: string # Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection + --profile(-p): string # Layer $CODEX_HOME/.config.toml on top of the base user config + --sandbox(-s): string@"nu-complete codex unarchive sandbox_mode" # Select the sandbox policy to use when executing model-generated shell commands + --approve-for-me # Route approval requests through automatic review using the workspace-write sandbox + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --cd(-C): path # Tell the agent to use the specified directory as its working root + --add-dir: path # Additional directories that should be writable alongside the primary workspace + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + target: string # Session id (UUID) or session name. UUIDs take precedence if it parses + ] + + def "nu-complete codex fork sandbox_mode" [] { + [ "read-only" "workspace-write" "danger-full-access" ] + } + + def "nu-complete codex fork approval_policy" [] { + [ "untrusted" "on-request" "never" ] + } + + # Fork a previous interactive session (picker by default; use --last to fork the most recent) + export extern "codex fork" [ + --last # Fork the most recent session without showing the picker + --all # Show all sessions (disables cwd filtering and shows CWD column) + --remote: string # Connect the TUI to a remote app server endpoint + --remote-auth-token-env: string # Name of the environment variable containing the bearer token to send to a remote app server websocket + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --image(-i): path # Optional image(s) to attach to the initial prompt + --model(-m): string # Model the agent should use + --oss # Use open-source provider + --local-provider: string # Specify which local provider to use (lmstudio or ollama). If not specified with --oss, will use config default or show selection + --profile(-p): string # Layer $CODEX_HOME/.config.toml on top of the base user config + --sandbox(-s): string@"nu-complete codex fork sandbox_mode" # Select the sandbox policy to use when executing model-generated shell commands + --dangerously-bypass-hook-trust # Run enabled hooks without requiring persisted hook trust for this invocation. DANGEROUS. Intended only for automation that already vets hook sources + --cd(-C): path # Tell the agent to use the specified directory as its working root + --add-dir: path # Additional directories that should be writable alongside the primary workspace + --dangerously-bypass-approvals-and-sandbox # Skip all confirmation prompts and execute commands without sandboxing. EXTREMELY DANGEROUS. Intended solely for running in environments that are externally sandboxed + --approve-for-me # Route approval requests through automatic review using the workspace-write sandbox + --ask-for-approval(-a): string@"nu-complete codex fork approval_policy" # Configure when the model requires human approval before executing a command + --search # Enable live web search. When enabled, the native Responses `web_search` tool is available to the model (no per‑call approval) + --no-alt-screen # Disable alternate screen mode + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + --version(-V) # Print version + session_id?: string # Conversation/session id (UUID). When provided, forks this session. If omitted, use --last to pick the most recent recorded session + prompt?: string # Optional user prompt to start the session + ] + + # [EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally + export extern "codex cloud" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + --version(-V) # Print version + ] + + # Submit a new Codex Cloud task without launching the TUI + export extern "codex cloud exec" [ + --env: string # Target environment identifier (see `codex cloud` to browse) + --attempts: string # Number of assistant attempts (best-of-N) + --branch: string # Git branch to run in Codex Cloud (defaults to current branch) + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + query?: string # Task prompt to run in Codex Cloud + ] + + # Show the status of a Codex Cloud task + export extern "codex cloud status" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + task_id: string # Codex Cloud task identifier to inspect + ] + + # List Codex Cloud tasks + export extern "codex cloud list" [ + --env: string # Filter tasks by environment identifier + --limit: string # Maximum number of tasks to return (1-20) + --cursor: string # Pagination cursor returned by a previous call + --json # Emit JSON instead of plain text + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Apply the diff for a Codex Cloud task locally + export extern "codex cloud apply" [ + --attempt: string # Attempt number to apply (1-based) + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + task_id: string # Codex Cloud task identifier to apply + ] + + # Show the unified diff for a Codex Cloud task + export extern "codex cloud diff" [ + --attempt: string # Attempt number to display (1-based) + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + task_id: string # Codex Cloud task identifier to display + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex cloud help" [ + ] + + # Submit a new Codex Cloud task without launching the TUI + export extern "codex cloud help exec" [ + ] + + # Show the status of a Codex Cloud task + export extern "codex cloud help status" [ + ] + + # List Codex Cloud tasks + export extern "codex cloud help list" [ + ] + + # Apply the diff for a Codex Cloud task locally + export extern "codex cloud help apply" [ + ] + + # Show the unified diff for a Codex Cloud task + export extern "codex cloud help diff" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex cloud help help" [ + ] + + # Internal: run the responses API proxy + export extern "codex responses-api-proxy" [ + --port: string # Port to listen on. If not set, an ephemeral port is used + --server-info: path # Path to a JSON file to write startup info (single line). Includes {"port": } + --http-shutdown # Enable HTTP shutdown endpoint at GET /shutdown + --upstream-url: string # Absolute URL the proxy should forward requests to (defaults to OpenAI) + --dump-dir: path # Directory where request/response dumps should be written as JSON + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Internal: relay stdio to a Unix domain socket + export extern "codex stdio-to-uds" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + socket_path: string # Path to the Unix domain socket to connect to + ] + + # [EXPERIMENTAL] Run the standalone exec-server service + export extern "codex exec-server" [ + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --concurrent-requests: string # Maximum number of requests to process concurrently on each connection + --listen: string # Transport endpoint URL. Supported values: `ws://IP:PORT` (default), `stdio`, `stdio://` + --remote: string # Register this exec-server as a remote environment using the given base URL + --environment-id: string # Environment id to attach to when registering remotely + --name: string # Human-readable environment name + --use-agent-identity-auth # Use Agent Identity auth from CODEX_ACCESS_TOKEN for remote registration + --exit-on-stdin-close # Exit when the parent-owned standard-input pipe closes + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Register an existing WebSocket exec-server as a remote environment + export extern "codex exec-server forward" [ + --connect: string # Destination exec-server WebSocket URL + --strict-config # Error out when config.toml contains fields that are not recognized by this version of Codex + --remote: string # Register this exec-server as a remote environment using the given base URL + --environment-id: string # Environment id to attach to when registering remotely + --name: string # Human-readable environment name + --use-agent-identity-auth # Use Agent Identity auth from CODEX_ACCESS_TOKEN for remote registration + --exit-on-stdin-close # Exit when the parent-owned standard-input pipe closes + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex exec-server help" [ + ] + + # Register an existing WebSocket exec-server as a remote environment + export extern "codex exec-server help forward" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex exec-server help help" [ + ] + + # Inspect feature flags + export extern "codex features" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # List known features with their stage and effective state + export extern "codex features list" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + ] + + # Enable a feature in config.toml + export extern "codex features enable" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + feature: string # Feature key to update (for example: unified_exec) + ] + + # Disable a feature in config.toml + export extern "codex features disable" [ + --config(-c): string # 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 + --enable: string # Enable a feature (repeatable). Equivalent to `-c features.=true` + --disable: string # Disable a feature (repeatable). Equivalent to `-c features.=false` + --help(-h) # Print help (see more with '--help') + feature: string # Feature key to update (for example: unified_exec) + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex features help" [ + ] + + # List known features with their stage and effective state + export extern "codex features help list" [ + ] + + # Enable a feature in config.toml + export extern "codex features help enable" [ + ] + + # Disable a feature in config.toml + export extern "codex features help disable" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex features help help" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex help" [ + ] + + # Browse all agent sessions on the shared local app-server daemon + export extern "codex help agents" [ + ] + + # Run Codex non-interactively + export extern "codex help exec" [ + ] + + # Resume a previous session by id or pick the most recent with --last + export extern "codex help exec resume" [ + ] + + # Fork a previous session by id into a new session + export extern "codex help exec fork" [ + ] + + # Run a code review against the current repository + export extern "codex help exec review" [ + ] + + # Run a code review non-interactively + export extern "codex help review" [ + ] + + # Manage login + export extern "codex help login" [ + ] + + # Show login status + export extern "codex help login status" [ + ] + + # Remove stored authentication credentials + export extern "codex help logout" [ + ] + + # Manage external MCP servers for Codex + export extern "codex help mcp" [ + ] + + export extern "codex help mcp list" [ + ] + + export extern "codex help mcp get" [ + ] + + export extern "codex help mcp add" [ + ] + + export extern "codex help mcp remove" [ + ] + + export extern "codex help mcp login" [ + ] + + export extern "codex help mcp logout" [ + ] -def "nu-complete codex sandbox" [] { - [read-only workspace-write danger-full-access] -} + # Manage Codex plugins + export extern "codex help plugin" [ + ] -def "nu-complete codex approval-policy" [] { - [untrusted on-request never] -} + # Install a plugin from a configured marketplace snapshot + export extern "codex help plugin add" [ + ] -def "nu-complete codex local-provider" [] { - [lmstudio ollama] -} + # List plugins available from configured marketplace snapshots + export extern "codex help plugin list" [ + ] -def "nu-complete codex color" [] { - [always never auto] -} + # Add, list, upgrade, or remove configured plugin marketplaces + export extern "codex help plugin marketplace" [ + ] -def "nu-complete codex shell" [] { - [bash elvish fish powershell zsh] -} + # Add a local or Git marketplace to the configured marketplace sources + export extern "codex help plugin marketplace add" [ + ] -def "nu-complete codex ws-auth" [] { - [none token shared-secret] -} + # List plugin marketplaces Codex is currently considering and their roots + export extern "codex help plugin marketplace list" [ + ] + + # Refresh configured Git marketplace snapshots + export extern "codex help plugin marketplace upgrade" [ + ] + + # Remove a configured marketplace source by name + export extern "codex help plugin marketplace remove" [ + ] + + # Remove an installed plugin from local config and cache + export extern "codex help plugin remove" [ + ] + + # Start Codex as an MCP server (stdio) + export extern "codex help mcp-server" [ + ] + + # [experimental] Run the app server or related tooling + export extern "codex help app-server" [ + ] + + # Manage the local app-server daemon + export extern "codex help app-server daemon" [ + ] + + # Install durable local app-server management for SSH-driven use + export extern "codex help app-server daemon bootstrap" [ + ] + + # Start the local app server daemon if it is not already running + export extern "codex help app-server daemon start" [ + ] + + # Restart the local app server daemon + export extern "codex help app-server daemon restart" [ + ] + + # Enable remote control for future starts and a currently running managed daemon + export extern "codex help app-server daemon enable-remote-control" [ + ] + + # Disable remote control for future starts and a currently running managed daemon + export extern "codex help app-server daemon disable-remote-control" [ + ] + + # Stop the local app server daemon + export extern "codex help app-server daemon stop" [ + ] + + # Print local CLI and running app-server versions as JSON + export extern "codex help app-server daemon version" [ + ] + + # [internal] Run the detached pid-backed standalone updater loop + export extern "codex help app-server daemon pid-update-loop" [ + ] + + # Proxy stdio bytes to the running app-server control socket + export extern "codex help app-server proxy" [ + ] + + # [experimental] Generate TypeScript bindings for the app server protocol + export extern "codex help app-server generate-ts" [ + ] + + # [experimental] Generate JSON Schema for the app server protocol + export extern "codex help app-server generate-json-schema" [ + ] + + # [internal] Generate internal JSON Schema artifacts for Codex tooling + export extern "codex help app-server generate-internal-json-schema" [ + ] + + # [experimental] Manage the app-server daemon with remote control enabled + export extern "codex help remote-control" [ + ] + + # Start the app-server daemon with remote control enabled + export extern "codex help remote-control start" [ + ] + + # Stop the app-server daemon + export extern "codex help remote-control stop" [ + ] + + # Create and print a short-lived manual pairing code + export extern "codex help remote-control pair" [ + ] + + # Generate shell completion scripts + export extern "codex help completion" [ + ] + + # Update Codex to the latest version + export extern "codex help update" [ + ] + + # Diagnose local Codex installation, config, auth, and runtime health + export extern "codex help doctor" [ + ] + + # Run commands within a Codex-provided sandbox + export extern "codex help sandbox" [ + ] + + # Debugging tools + export extern "codex help debug" [ + ] + + # Render the raw model catalog as JSON + export extern "codex help debug models" [ + ] + + # Tooling: helps debug the app server + export extern "codex help debug app-server" [ + ] + + export extern "codex help debug app-server send-message-v2" [ + ] + + # Render the model-visible prompt input list as JSON + export extern "codex help debug prompt-input" [ + ] + + # Replay a rollout trace bundle and write reduced state JSON + export extern "codex help debug trace-reduce" [ + ] + + # Internal: reset local memory state for a fresh start + export extern "codex help debug clear-memories" [ + ] + + # Execpolicy tooling + export extern "codex help execpolicy" [ + ] + + # Check execpolicy files against a command + export extern "codex help execpolicy check" [ + ] + + # Apply the latest diff produced by Codex agent as a `git apply` to your local working tree + export extern "codex help apply" [ + ] + + # Resume a previous interactive session (picker by default; use --last to continue the most recent) + export extern "codex help resume" [ + ] + + # Queue a message for an existing session + export extern "codex help queue" [ + ] + + # Archive a saved session by id or session name + export extern "codex help archive" [ + ] + + # Permanently delete a saved session by id or session name + export extern "codex help delete" [ + ] + + # Inspect or migrate legacy local sessions to paginated thread history + export extern "codex help migrate-rollouts" [ + ] + + # Unarchive a saved session by id or session name + export extern "codex help unarchive" [ + ] + + # Fork a previous interactive session (picker by default; use --last to fork the most recent) + export extern "codex help fork" [ + ] + + # [EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally + export extern "codex help cloud" [ + ] + + # Submit a new Codex Cloud task without launching the TUI + export extern "codex help cloud exec" [ + ] + + # Show the status of a Codex Cloud task + export extern "codex help cloud status" [ + ] + + # List Codex Cloud tasks + export extern "codex help cloud list" [ + ] + + # Apply the diff for a Codex Cloud task locally + export extern "codex help cloud apply" [ + ] + + # Show the unified diff for a Codex Cloud task + export extern "codex help cloud diff" [ + ] + + # Internal: run the responses API proxy + export extern "codex help responses-api-proxy" [ + ] + + # Internal: relay stdio to a Unix domain socket + export extern "codex help stdio-to-uds" [ + ] + + # [EXPERIMENTAL] Run the standalone exec-server service + export extern "codex help exec-server" [ + ] + + # Register an existing WebSocket exec-server as a remote environment + export extern "codex help exec-server forward" [ + ] + + # Inspect feature flags + export extern "codex help features" [ + ] + + # List known features with their stage and effective state + export extern "codex help features list" [ + ] + + # Enable a feature in config.toml + export extern "codex help features enable" [ + ] + + # Disable a feature in config.toml + export extern "codex help features disable" [ + ] + + # Print this message or the help of the given subcommand(s) + export extern "codex help help" [ + ] -def "nu-complete codex bool" [] { - [true false] } -# Start an interactive Codex session. -export extern codex [ - prompt?: string # Optional prompt to start the session - --config(-c): string # Override a configuration value - --enable: string # Enable a feature - --disable: string # Disable a feature - --remote: string # Connect to a remote app server endpoint - --remote-auth-token-env: string # Environment variable containing the remote bearer token - --strict-config # Reject unrecognized configuration fields - --image(-i): path # Attach an image to the prompt - --model(-m): string # Model to use - --oss # Use an open-source provider - --local-provider: string@"nu-complete codex local-provider" # Open-source provider - --profile(-p): string # Configuration profile - --sandbox(-s): string@"nu-complete codex sandbox" # Sandbox policy - --approve-for-me # Automatically review approval requests - --dangerously-bypass-approvals-and-sandbox # Disable approvals and sandboxing - --dangerously-bypass-hook-trust # Run hooks without persisted trust - --cd(-C): path # Working directory - --add-dir: path # Additional writable directory - --ask-for-approval(-a): string@"nu-complete codex approval-policy" # Approval policy - --search # Enable web search - --no-alt-screen # Disable alternate-screen mode - --help(-h) # Show help - --version(-V) # Show version -] - -# Run Codex non-interactively. -export extern "codex exec" [ - prompt?: string # Initial prompt, or read it from stdin - --image(-i): path # Attach an image - --profile(-p): string # Configuration profile - --sandbox(-s): string@"nu-complete codex sandbox" # Sandbox policy - --cd(-C): path # Working directory - --model(-m): string # Model to use - --output-last-message(-o): path # Write the final message to a file - --strict-config # Reject unrecognized configuration fields - --oss # Use an open-source provider - --local-provider: string@"nu-complete codex local-provider" # Open-source provider - --approve-for-me # Automatically review approval requests - --add-dir: path # Additional writable directory - --dangerously-bypass-approvals-and-sandbox # Disable approvals and sandboxing - --dangerously-bypass-hook-trust # Run hooks without persisted trust - --skip-git-repo-check # Allow running outside a Git repository - --ephemeral # Do not persist session files - --ignore-user-config # Ignore user configuration - --ignore-rules # Ignore repository instruction files - --output-schema: path # JSON Schema for the final response - --color: string@"nu-complete codex color" # Output color mode - --json # Emit JSONL events - --config(-c): string # Override a configuration value - --enable: string # Enable a feature - --disable: string # Disable a feature - --help(-h) # Show help - --version(-V) # Show version -] - -# Alias for `codex exec`. -export extern "codex e" [ - prompt?: string - --help(-h) -] - -# Resume a non-interactive session. -export extern "codex exec resume" [ - session_id?: string - prompt?: string - --last # Resume the most recent session - --all # Show all sessions - --image(-i): path - --model(-m): string - --output-last-message(-o): path - --strict-config - --dangerously-bypass-approvals-and-sandbox - --dangerously-bypass-hook-trust - --skip-git-repo-check - --ephemeral - --ignore-user-config - --ignore-rules - --output-schema: path - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Fork a non-interactive session. -export extern "codex exec fork" [ - session_id: string - prompt?: string - --image(-i): path - --model(-m): string - --output-last-message(-o): path - --strict-config - --dangerously-bypass-approvals-and-sandbox - --dangerously-bypass-hook-trust - --skip-git-repo-check - --ephemeral - --ignore-user-config - --ignore-rules - --output-schema: path - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Run a non-interactive code review. -export extern "codex exec review" [ - prompt?: string - --uncommitted # Review staged, unstaged, and untracked changes - --base: string # Review changes against a base branch - --commit: string # Review a commit - --title: string # Optional review title - --model(-m): string - --output-last-message(-o): path - --strict-config - --dangerously-bypass-approvals-and-sandbox - --dangerously-bypass-hook-trust - --skip-git-repo-check - --ephemeral - --ignore-user-config - --ignore-rules - --output-schema: path - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Run a code review non-interactively. -export extern "codex review" [ - prompt?: string - --strict-config - --uncommitted # Review all local changes - --base: string # Review against a base branch - --commit: string # Review a commit - --title: string # Review title - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Manage authentication. -export extern "codex login" [ - --with-api-key # Read an API key from stdin - --with-access-token # Read an access token from stdin - --api-key: string # API key - --device-auth # Use device-code authentication - --experimental_issuer: string # Experimental OAuth issuer - --experimental_client-id: string # Experimental OAuth client ID - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex login status" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex logout" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Manage MCP servers. -export extern "codex mcp" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex mcp list" [ - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex mcp get" [ - name: string - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex mcp add" [ - name: string - ...command: string # Command for a stdio server - --env: string # Environment variable (KEY=VALUE) - --url: string # URL for a streamable HTTP server - --bearer-token-env-var: string # Bearer-token environment variable - --oauth-client-id: string - --oauth-client-registration: string - --oauth-resource: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex mcp remove" [ - name: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex mcp login" [ - name: string - --scopes: string - --oauth-client-registration: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex mcp logout" [ - name: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Start Codex as an MCP server over stdio. -export extern "codex mcp-server" [ - --strict-config - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Manage Codex plugins. -export extern "codex plugin" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex plugin add" [ - plugin: string # PLUGIN[@MARKETPLACE] - --marketplace(-m): string - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex plugin list" [ - --marketplace(-m): string - --json - --available - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex plugin remove" [ - plugin: string # PLUGIN[@MARKETPLACE] - --marketplace(-m): string - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex plugin marketplace" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex plugin marketplace add" [ - source: string - --ref: string - --sparse: string - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex plugin marketplace list" [ - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex plugin marketplace upgrade" [ - marketplace_name?: string - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex plugin marketplace remove" [ - marketplace_name: string - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Run the experimental app server. -export extern "codex app-server" [ - --code-mode-host: string - --strict-config - --listen: string - --stdio - --remote-control - --analytics-default-enabled: string@"nu-complete codex bool" - --ws-auth: string@"nu-complete codex ws-auth" - --ws-token-file: path - --ws-token-sha256: string - --ws-shared-secret-file: path - --ws-issuer: string - --ws-audience: string - --ws-max-clock-skew-seconds: int - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server daemon" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server daemon bootstrap" [ - --remote-control - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server daemon start" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server daemon restart" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server daemon enable-remote-control" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server daemon disable-remote-control" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server daemon stop" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server daemon version" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server daemon pid-update-loop" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server proxy" [ - --sock: path - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server generate-ts" [ - --out(-o): path - --prettier(-p): path - --experimental - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server generate-json-schema" [ - --out(-o): path - --experimental - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex app-server generate-internal-json-schema" [ - --out(-o): path - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Manage the app-server daemon with remote control enabled. -export extern "codex remote-control" [ - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex remote-control start" [ - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex remote-control stop" [ - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex remote-control pair" [ - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Launch the Codex Desktop app. -export extern "codex app" [ - path?: path - --download-url: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Generate shell completion scripts. -export extern "codex completion" [ - shell?: string@"nu-complete codex shell" - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex update" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Diagnose the local Codex installation. -export extern "codex doctor" [ - --json - --summary - --all - --no-color - --ascii - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Run a command in a Codex-provided sandbox. -export extern "codex sandbox" [ - ...command: string - --sandbox-state-json: string - --sandbox-state-readable-root: path - --sandbox-state-disable-network - --permission-profile(-P): string - --profile(-p): string - --cd(-C): path - --include-managed-config - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Debugging tools. -export extern "codex debug" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex debug models" [ - --bundled - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex debug app-server" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex debug app-server send-message-v2" [ - user_message: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex debug prompt-input" [ - prompt?: string - --image(-i): path - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex debug trace-reduce" [ - trace_bundle: path - --output(-o): path - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex debug clear-memories" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Check a command against Codex execution-policy rules. -export extern "codex execpolicy" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex execpolicy check" [ - ...command: string - --rules(-r): path - --pretty - --resolve-host-executables - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Apply the latest diff produced by a Codex task. -export extern "codex apply" [ - task_id: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Alias for `codex apply`. -export extern "codex a" [ - task_id: string - --help(-h) -] - -# Resume an interactive session. -export extern "codex resume" [ - session_id?: string - prompt?: string - --last - --all - --include-non-interactive - --remote: string - --remote-auth-token-env: string - --strict-config - --image(-i): path - --model(-m): string - --oss - --local-provider: string@"nu-complete codex local-provider" - --profile(-p): string - --sandbox(-s): string@"nu-complete codex sandbox" - --dangerously-bypass-hook-trust - --cd(-C): path - --add-dir: path - --dangerously-bypass-approvals-and-sandbox - --approve-for-me - --ask-for-approval(-a): string@"nu-complete codex approval-policy" - --search - --no-alt-screen - --config(-c): string - --enable: string - --disable: string - --help(-h) - --version(-V) -] - -# Fork an interactive session. -export extern "codex fork" [ - session_id?: string - prompt?: string - --last - --all - --remote: string - --remote-auth-token-env: string - --strict-config - --image(-i): path - --model(-m): string - --oss - --local-provider: string@"nu-complete codex local-provider" - --profile(-p): string - --sandbox(-s): string@"nu-complete codex sandbox" - --dangerously-bypass-hook-trust - --cd(-C): path - --add-dir: path - --dangerously-bypass-approvals-and-sandbox - --approve-for-me - --ask-for-approval(-a): string@"nu-complete codex approval-policy" - --search - --no-alt-screen - --config(-c): string - --enable: string - --disable: string - --help(-h) - --version(-V) -] - -export extern "codex archive" [ - session: string - --remote: string - --remote-auth-token-env: string - --image(-i): path - --model(-m): string - --oss - --local-provider: string@"nu-complete codex local-provider" - --profile(-p): string - --sandbox(-s): string@"nu-complete codex sandbox" - --approve-for-me - --dangerously-bypass-approvals-and-sandbox - --dangerously-bypass-hook-trust - --cd(-C): path - --add-dir: path - --strict-config - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex unarchive" [ - session: string - --remote: string - --remote-auth-token-env: string - --image(-i): path - --model(-m): string - --oss - --local-provider: string@"nu-complete codex local-provider" - --profile(-p): string - --sandbox(-s): string@"nu-complete codex sandbox" - --approve-for-me - --dangerously-bypass-approvals-and-sandbox - --dangerously-bypass-hook-trust - --cd(-C): path - --add-dir: path - --strict-config - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex delete" [ - session: string - --force - --remote: string - --remote-auth-token-env: string - --image(-i): path - --model(-m): string - --oss - --local-provider: string@"nu-complete codex local-provider" - --profile(-p): string - --sandbox(-s): string@"nu-complete codex sandbox" - --approve-for-me - --dangerously-bypass-approvals-and-sandbox - --dangerously-bypass-hook-trust - --cd(-C): path - --add-dir: path - --strict-config - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex migrate-rollouts" [ - --apply - --thread: string - --max-mib-per-second: number - --json - --verbose - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Browse Codex Cloud tasks and apply changes locally. -export extern "codex cloud" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) - --version(-V) -] - -export extern "codex cloud exec" [ - query?: string - --env: string - --attempts: int - --branch: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex cloud status" [ - task_id: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex cloud list" [ - --env: string - --limit: int - --cursor: string - --json - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex cloud apply" [ - task_id: string - --attempt: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex cloud diff" [ - task_id: string - --attempt: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Run the standalone exec-server service. -export extern "codex exec-server" [ - --strict-config - --concurrent-requests: int - --listen: string - --remote: string - --environment-id: string - --name: string - --use-agent-identity-auth - --exit-on-stdin-close - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Inspect feature flags. -export extern "codex features" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex features list" [ - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex features enable" [ - feature: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex features disable" [ - feature: string - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -# Internal utility commands included by Codex's generated completion. -export extern "codex responses-api-proxy" [ - --port: int - --server-info: path - --http-shutdown - --upstream-url: string - --dump-dir: path - --config(-c): string - --enable: string - --disable: string - --help(-h) -] - -export extern "codex stdio-to-uds" [ - socket_path: path - --config(-c): string - --enable: string - --disable: string - --help(-h) -] +export use completions *