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 audit;
21pub mod backup;
22pub mod boot;
23pub mod consolidate;
24pub mod crud;
25pub mod curator;
26pub mod doctor;
27pub mod forget;
28pub mod gc;
29pub mod governance;
30pub mod helpers;
31pub mod install;
32pub mod io;
33pub mod io_writer;
34pub mod link;
35pub mod logs;
36pub mod promote;
37pub mod recall;
38pub mod search;
39pub mod shell;
40pub mod store;
41pub mod sync;
42pub mod update;
43pub mod wrap;
44
45#[cfg(test)]
46pub mod test_utils;
47
48// Convenience re-export so callers can `use ai_memory::cli::CliOutput`
49// without a deeper path.
50pub use io_writer::CliOutput;