1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! # Gitcore: The Programmatic Engine for Git Identity Management
//!
//! Gitcore is a high-assurance Rust library designed to solve the complexity of
//! managing multiple Git identities on a single machine. It provides a
//! deterministic, secure, and automated way to isolate SSH keys, commit
//! authorship, and cryptographic signing across different environments.
//!
//! ## Core Philosophy
//! Traditional Git workflows rely on global configurations that lead to "identity
//! leakage" (e.g., using a personal email for a corporate commit). Gitcore
//! eliminates this by providing:
//! - **Cryptographic Isolation**: Every account is backed by its own unique Ed25519 keypair.
//! - **Automated Orchestration**: Seamless management of `~/.ssh/config` without touching existing manual entries.
//! - **Contextual Awareness**: Automatic detection and injection of identity metadata during `clone` or `remote` operations.
//!
//! ## Library vs. CLI
//! This crate serves as the underlying engine for the `gitcore` CLI. By exposing
//! this engine programmatically, Gitcore enables developers to:
//! - Build custom Git automation and CI/CD pipelines.
//! - Integrate identity management into IDEs or developer portals.
//! - Extend the core logic for specialized hosting providers.
//!
//! ## Getting Started
//! ```no_run
//! use gitcore::{Gitcore, AddAccountRequest, Platform};
//!
//! // Initialize the service with standard user paths
//! let service = Gitcore::new();
//!
//! // Provision and register a new identity
//! let request = AddAccountRequest {
//! name: "work".to_string(),
//! platform: Platform::Github,
//! username: "octocat".to_string(),
//! email: "octocat@example.com".to_string(),
//! ..Default::default()
//! };
//!
//! service.register_account(request)?;
//! # Ok::<(), gitcore::GitcoreError>(())
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;