core-agent-ide/codex-rs/core
Michael Bolin b0ba65a936
fix: write logs to ~/.codex/log instead of /tmp (#669)
Previously, the Rust TUI was writing log files to `/tmp`, which is
world-readable and not available on Windows, so that isn't great.

This PR tries to clean things up by adding a function that provides the
path to the "Codex config dir," e.g., `~/.codex` (though I suppose we
could support `$CODEX_HOME` to override this?) and then defines other
paths in terms of the result of `codex_dir()`.

For example, `log_dir()` returns the folder where log files should be
written which is defined in terms of `codex_dir()`. I updated the TUI to
use this function. On UNIX, we even go so far as to `chmod 600` the log
file by default, though as noted in a comment, it's a bit tedious to do
the equivalent on Windows, so we just let that go for now.

This also changes the default logging level to `info` for `codex_core`
and `codex_tui` when `RUST_LOG` is not specified. I'm not really sure if
we should use a more verbose default (it may be helpful when debugging
user issues), though if so, we should probably also set up log rotation?
2025-04-25 17:37:41 -07:00
..
src fix: write logs to ~/.codex/log instead of /tmp (#669) 2025-04-25 17:37:41 -07:00
tests feat: add ZDR support to Rust implementation (#642) 2025-04-25 12:08:18 -07:00
Cargo.toml fix: remove dependency on expanduser crate (#667) 2025-04-25 14:20:21 -07:00
prompt.md feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629) 2025-04-24 13:31:40 -07:00
README.md feat: initial import of Rust implementation of Codex CLI in codex-rs/ (#629) 2025-04-24 13:31:40 -07:00

codex-core

This crate implements the business logic for Codex. It is designed to be used by the various Codex UIs written in Rust.

Though for non-Rust UIs, we are also working to define a protocol for talking to Codex. See:

You can use the proto subcommand using the executable in the cli crate to speak the protocol using newline-delimited-JSON over stdin/stdout.