mirror of
https://github.com/openai/codex.git
synced 2026-04-26 23:55:25 +00:00
26 lines
758 B
Rust
26 lines
758 B
Rust
use clap::Parser;
|
|
use tracing_subscriber::EnvFilter;
|
|
|
|
#[derive(Debug, Parser)]
|
|
struct ExecServerArgs {
|
|
/// Transport endpoint URL. Supported values: `ws://IP:PORT` (default).
|
|
#[arg(
|
|
long = "listen",
|
|
value_name = "URL",
|
|
default_value = codex_exec_server::DEFAULT_LISTEN_URL
|
|
)]
|
|
listen: String,
|
|
}
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
|
let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("warn"));
|
|
let _ = tracing_subscriber::fmt()
|
|
.with_env_filter(env_filter)
|
|
.with_target(false)
|
|
.try_init();
|
|
|
|
let args = ExecServerArgs::parse();
|
|
codex_exec_server::run_main_with_listen_url(&args.listen).await
|
|
}
|