Expand description
§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/configwithout touching existing manual entries. - Contextual Awareness: Automatic detection and injection of identity metadata during
cloneorremoteoperations.
§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
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)?;Structs§
- Account
- A persisted identity record for a Git hosting platform.
- AddAccount
Request - Input required to register a new Gitcore account.
- Audit
Report - Security audit report for a Gitcore installation.
- Backup
Report - Summary of a created encrypted backup.
- Clone
Report - Outcome of an identity-aware clone operation.
- Clone
Request - Input required to clone or attach a repository for an account.
- File
Audit - Permission status for an audited file.
- Gitcore
- High-level service facade for Gitcore operations.
- Gitcore
Config - Root configuration object containing all managed accounts.
- Gitcore
Paths - Filesystem locations used by the Gitcore library.
- GpgKey
- KeyAudit
- Audit result for a managed SSH keypair.
- KeyDeletion
Report - Outcome of deleting managed SSH key files for an account.
- KeyProvision
Report - Outcome of generating a managed SSH key before account registration.
- Registered
Account - Normalized account details produced during registration.
- Remote
AddRequest - Input required to add or replace the origin remote for a repository.
- Remote
Report - Outcome of a remote add or switch operation.
- Remote
Switch Request - Input required to switch an existing repository to a different account.
- Restore
Report - Outcome of restoring persisted state from a vault or JSON file.
- Rotation
Report - Outcome of rotating an account SSH key.
- SshTest
Report - Outcome of testing SSH connectivity for an account.
- Update
Account Request - Input required to update an existing Gitcore account.
Enums§
- Gitcore
Error - Typed error surface for library consumers.
- Host
KeyStatus - Platform
- Supported Git hosting platforms.
Functions§
Type Aliases§
- Result
- Standard result type for Gitcore library operations.