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;
15// Git projection lives in `heddle-git-projection`. Re-export under the
16// historical path so commands and integration tests keep working.
17// Always-compiled so light consumers (fsck, clone, fetch, remote,
18// checkpoint, operator_loop, gc) work in native-only builds without
19// fanning #[cfg] through their use blocks. User-visible separation is
20// enforced at the command surface: `Commands::GitOverlay` is gated
21// behind `git-overlay`.
22pub mod cli;
23pub mod client;
24pub mod exit;
25pub mod extensions;
26pub use heddle_git_projection as git_projection_engine;
27pub mod harness;
28pub mod operation_id;
29pub mod perf;
30#[cfg(feature = "semantic")]
31pub mod semantic;
32pub mod ts_codegen;
33pub mod util;
34
35// Shared types now live in cli-shared (so heddle-client can depend on
36// them without a cli ↔ heddle-client cycle). Re-export under the
37// historical paths so internal code keeps working.
38pub use cli_shared::{
39    LogFormat, LoggingConfig, LoggingGuard, OutputMode, config, init_logging, init_logging_default,
40    is_enabled, log_operation, log_repo_event, logging, remote,
41};
42pub use objects::{
43    error::{HeddleError, HeddleError as StoreError},
44    store::ObjectStore,
45};
46pub use repo::Repository;
47pub type StoreResult<T> = objects::error::Result<T>;
48
49#[cfg(test)]
50mod object_graph_tests;