Skip to main content

ai_memory/cli/
mod.rs

1// Copyright 2026 AlphaOne LLC
2// SPDX-License-Identifier: Apache-2.0
3
4//! CLI command modules. Wave 5a (v0.6.3) extracted these out of
5//! `main.rs` so each handler can be unit-tested by capturing output
6//! into a `Vec<u8>` via `CliOutput` instead of literal `println!`s.
7//!
8//! ## Public surface
9//!
10//! - `CliOutput` (re-exported at `cli::CliOutput`): output abstraction.
11//! - `helpers::{id_short, auto_namespace, human_age}`: pure helpers.
12//! - `store::run`, `update::run`, `io::{export, import, mine}`:
13//!   handler entry points called by `main.rs`'s dispatch arm.
14//!
15//! Each handler takes `&mut CliOutput<'_>` and routes every emit
16//! through `writeln!` so tests can assert on captured bytes.
17
18pub mod agents;
19pub mod archive;
20pub mod backup;
21pub mod consolidate;
22pub mod crud;
23pub mod curator;
24pub mod forget;
25pub mod gc;
26pub mod governance;
27pub mod helpers;
28pub mod io;
29pub mod io_writer;
30pub mod link;
31pub mod promote;
32pub mod recall;
33pub mod search;
34pub mod shell;
35pub mod store;
36pub mod sync;
37pub mod update;
38
39#[cfg(test)]
40pub mod test_utils;
41
42// Convenience re-export so callers can `use ai_memory::cli::CliOutput`
43// without a deeper path.
44pub use io_writer::CliOutput;