pub struct CodexHomeLayout { /* private fields */ }Expand description
Describes the on-disk layout used by the Codex CLI when CODEX_HOME is set.
Files are rooted next to config.toml, auth.json, .credentials.json, and
history.jsonl; conversations/ holds transcript JSONL files and logs/
holds codex-*.log outputs. Call Self::materialize to create the
directories when standing up an app-scoped home.
Implementations§
Source§impl CodexHomeLayout
impl CodexHomeLayout
Sourcepub fn config_path(&self) -> PathBuf
pub fn config_path(&self) -> PathBuf
Path to config.toml under CODEX_HOME.
Sourcepub fn credentials_path(&self) -> PathBuf
pub fn credentials_path(&self) -> PathBuf
Path to .credentials.json under CODEX_HOME.
Sourcepub fn history_path(&self) -> PathBuf
pub fn history_path(&self) -> PathBuf
Path to history.jsonl under CODEX_HOME.
Sourcepub fn conversations_dir(&self) -> PathBuf
pub fn conversations_dir(&self) -> PathBuf
Directory containing conversation transcripts.
Sourcepub fn materialize(&self, create_home_dirs: bool) -> Result<(), CodexError>
pub fn materialize(&self, create_home_dirs: bool) -> Result<(), CodexError>
Creates the CODEX_HOME root and its known subdirectories when
create_home_dirs is true. No-op when disabled.
Sourcepub fn seed_auth_from(
&self,
seed_home: impl AsRef<Path>,
options: AuthSeedOptions,
) -> Result<AuthSeedOutcome, AuthSeedError>
pub fn seed_auth_from( &self, seed_home: impl AsRef<Path>, options: AuthSeedOptions, ) -> Result<AuthSeedOutcome, AuthSeedError>
Copies login artifacts (auth.json and .credentials.json) from a trusted seed home into
this layout. History and logs are intentionally excluded.
This is opt-in and leaves defaults untouched. Missing files raise errors only when marked
as required in options; otherwise they are skipped. Target directories are created when
create_target_dirs is true.
Trait Implementations§
Source§impl Clone for CodexHomeLayout
impl Clone for CodexHomeLayout
Source§fn clone(&self) -> CodexHomeLayout
fn clone(&self) -> CodexHomeLayout
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodexHomeLayout
impl Debug for CodexHomeLayout
Source§impl PartialEq for CodexHomeLayout
impl PartialEq for CodexHomeLayout
impl Eq for CodexHomeLayout
impl StructuralPartialEq for CodexHomeLayout
Auto Trait Implementations§
impl Freeze for CodexHomeLayout
impl RefUnwindSafe for CodexHomeLayout
impl Send for CodexHomeLayout
impl Sync for CodexHomeLayout
impl Unpin for CodexHomeLayout
impl UnsafeUnpin for CodexHomeLayout
impl UnwindSafe for CodexHomeLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.