si_git_commit/lib.rs
1//! # si-git-commit — Super Intelligent Git Commit
2//!
3//! **AI-powered git commit messages and workflow automation** (`ghsi` CLI).
4//!
5//! Analyzes staged changes with a current AI model and writes
6//! Conventional Commits messages, then stages, commits, and pushes in a
7//! single streamlined command. Built with modern provider parameters
8//! (`max_completion_tokens` for OpenAI) so current models keep working.
9//!
10//! ## CLI quick start
11//!
12//! ```bash
13//! ghsi config init # create the settings TOML (path shown for you)
14//! ghsi config model # view / change your model interactively
15//! ghsi # stage all → generate → confirm → commit → push
16//! ghsi stage # stage + generate only (no commit)
17//! ghsi generate # generate for staged changes only
18//! ```
19//!
20//! The settings file location is always discoverable with
21//! `ghsi config path` — no hunting for dotfiles.
22//!
23//! ## Library usage
24//!
25//! ```no_run
26//! use si_git_commit::{Config, Workflow, WorkflowOptions};
27//!
28//! # async fn run() -> si_git_commit::Result<()> {
29//! let config = Config::load()?;
30//! let workflow = Workflow::new(config);
31//! workflow
32//! .commit_workflow(vec![], WorkflowOptions { yes: false, ..Default::default() })
33//! .await?;
34//! # Ok(())
35//! # }
36//! ```
37
38pub mod cli;
39pub mod config;
40pub mod error;
41pub mod git;
42pub mod llm;
43pub mod prompt;
44pub mod workflow;
45
46pub use config::{Config, MessageLevel, Provider};
47pub use error::{Result, SiError};
48pub use llm::Llm;
49pub use workflow::{Workflow, WorkflowOptions};