Skip to main content

codex_commit/
lib.rs

1//! Restricted, generation-only commit messages from caller-supplied public diffs.
2//! No repository discovery or Git operations are performed. Unix only.
3//!
4//! Paths and model are explicit. Only the current access credentials are copied;
5//! source OAuth refresh credentials, user configuration and instructions are never
6//! passed to the generation process. Expired credentials require source CLI
7//! reauthentication. Generation never writes back to the source authentication home.
8//!
9//! ```no_run
10//! use codex_commit::{generate_message, GenerationOptions, GenerationRequest};
11//! let options = GenerationOptions::new(
12//!     "/absolute/path/to/codex".into(),
13//!     "/absolute/path/to/auth-home".into(),
14//!     "gpt-6.1-sol".into(),
15//! );
16//! let message = generate_message(GenerationRequest { diff: "public diff" }, &options)?;
17//! let rendered = message.render()?;
18//! # Ok::<(), codex_commit::Error>(())
19//! ```
20mod generation;
21pub use generation::*;