autom8/commands/list.rs
1//! List command handler.
2//!
3//! Shows a tree view of all projects with their status.
4
5use crate::error::Result;
6use crate::output::print_project_tree;
7
8/// Display a tree view of all projects.
9///
10/// Shows each project with its subdirectories and status indicators
11/// using box-drawing characters for visual tree structure.
12///
13/// # Returns
14///
15/// * `Ok(())` on success
16/// * `Err(Autom8Error)` if reading project information fails
17pub fn list_command() -> Result<()> {
18 let projects = crate::config::list_projects_tree()?;
19 print_project_tree(&projects);
20 Ok(())
21}