Skip to main content

cli/
lib.rs

1// SPDX-License-Identifier: Apache-2.0
2//! Heddle: An AI-native version control system
3//!
4//! Heddle provides content-addressed storage, immutable history with stable change
5//! identifiers, and explicit agent attribution for AI-augmented development.
6
7#[cfg(not(any(feature = "git-overlay", feature = "native")))]
8compile_error!(
9    "At least one of the `git-overlay` or `native` features must be enabled. \
10     The OSS CLI ships as git-overlay-only, native-only, or both."
11);
12
13pub(crate) mod attribution;
14pub mod bench;
15pub mod cli;
16pub mod client;
17pub mod exit;
18pub mod extensions;
19pub mod harness;
20mod hosted_failure;
21#[cfg(feature = "client")]
22mod hosted_runtime;
23pub mod operation_id;
24pub mod perf;
25#[cfg(feature = "semantic")]
26pub mod semantic;
27pub mod ts_codegen;
28pub mod util;
29
30// Shared CLI configuration and credential contracts live in cli-shared.
31pub use cli_shared::{
32    LogFormat, LoggingConfig, LoggingGuard, OutputMode, config, init_logging, init_logging_default,
33    is_enabled, log_operation, log_repo_event, logging, remote,
34};
35pub use objects::{
36    error::{HeddleError, HeddleError as StoreError},
37    store::ObjectStore,
38};
39pub use repo::Repository;
40pub type StoreResult<T> = objects::error::Result<T>;
41
42/// Register factories needed to reopen CLI-owned lazy hosted repositories.
43#[cfg(feature = "client")]
44pub fn register_hosted_factory() {
45    hosted_runtime::hosted::register_hosted_factory();
46}
47
48#[cfg(test)]
49mod object_graph_tests;