Add codex app macOS launcher (#10418)

- Add `codex app <path>` to launch the Codex Desktop app.
- On macOS, auto-downloads the DMG if missing; non-macOS prints a link
to chatgpt.com/codex.
This commit is contained in:
Ahmed Ibrahim
2026-02-02 17:37:04 -08:00
committed by GitHub
parent 019d89ff86
commit d02db8b43d
6 changed files with 327 additions and 1 deletions

View File

@@ -31,6 +31,10 @@ use std::io::IsTerminal;
use std::path::PathBuf;
use supports_color::Stream;
#[cfg(target_os = "macos")]
mod app_cmd;
#[cfg(target_os = "macos")]
mod desktop_app;
mod mcp_cmd;
#[cfg(not(windows))]
mod wsl_paths;
@@ -98,6 +102,10 @@ enum Subcommand {
/// [experimental] Run the app server or related tooling.
AppServer(AppServerCommand),
/// Launch the Codex desktop app (downloads the macOS installer if missing).
#[cfg(target_os = "macos")]
App(app_cmd::AppCommand),
/// Generate shell completion scripts.
Completion(CompletionCommand),
@@ -564,6 +572,10 @@ async fn cli_main(codex_linux_sandbox_exe: Option<PathBuf>) -> anyhow::Result<()
)?;
}
},
#[cfg(target_os = "macos")]
Some(Subcommand::App(app_cli)) => {
app_cmd::run_app(app_cli).await?;
}
Some(Subcommand::Resume(ResumeCommand {
session_id,
last,