Skip to main content

Crate chronogit

Crate chronogit 

Source
Expand description

Reusable layers for the ChronoGit terminal application.

ChronoGit is a Git history and working-tree source explorer with explicit local-branch switching. This crate exposes the domain model, the bounded Git adapter, the application state machine, and the terminal presentation layer used by the chronogit binary.

The modules follow a one-way dependency flow:

  • domain owns validated values and has no process or terminal I/O.
  • git translates Git output into domain values and performs explicit branch switches.
  • lsp owns optional language-server process and protocol boundaries.
  • app turns user intent into state transitions and typed Git/LSP effects.
  • tui maps terminal input to actions and renders application state.

Most embedders start at git::GitService when they need repository data, or at app::AppState and tui::run when constructing the complete TUI.

§Example

use std::path::Path;

use chronogit::git::{GitService, SystemGitRunner};

let repository = GitService::discover(SystemGitRunner, Path::new("."))?;
for change in repository.changes()? {
    println!("{} {}", change.kind().label(), change.path());
}

Modules§

app
Application state, user intent, asynchronous effects, and state transitions.
cli
Command-line parsing and conversion into application startup values.
config
User-level display settings loaded before terminal initialization.
domain
Validated, I/O-free values shared by the application and Git adapter.
error
Errors returned by top-level application startup and the terminal loop.
git
Bounded repository access, including explicit local-branch switching.
lsp
Optional, profile-driven Language Server Protocol client support.
tui
Terminal input, rendering, lifecycle management, and the interactive loop.