null_e/lib.rs
1//! # null-e 🤖
2//!
3//! The Friendly Disk Cleanup Robot - Send your cruft to /dev/null!
4//!
5//! null-e helps developers reclaim disk space by finding and cleaning
6//! development artifacts like `node_modules`, `target`, `.venv`, and 30+ more.
7//!
8//! ## Features
9//!
10//! - **Multi-language support**: Node.js, Rust, Python, Go, Java, .NET, Swift, and more
11//! - **Git integration**: Protects uncommitted changes
12//! - **Trash support**: Safe deletion with recovery option
13//! - **Parallel scanning**: Fast directory traversal
14//! - **Interactive TUI**: Beautiful terminal interface
15//! - **Docker support**: Clean dangling images and volumes
16//!
17//! ## Quick Start
18//!
19//! ```no_run
20//! use null_e::prelude::*;
21//!
22//! // Create a scanner with default plugins
23//! let registry = PluginRegistry::with_builtins();
24//! let scanner = ParallelScanner::new(std::sync::Arc::new(registry));
25//!
26//! // Scan a directory
27//! let config = ScanConfig::new("/path/to/projects");
28//! let result = scanner.scan(&config).unwrap();
29//!
30//! println!("Found {} projects with {} cleanable",
31//! result.projects.len(),
32//! humansize::format_size(result.total_cleanable, humansize::BINARY)
33//! );
34//! ```
35//!
36//! ## Architecture
37//!
38//! null-e uses a plugin-based architecture where each language/framework
39//! is handled by a dedicated plugin. Plugins implement the `Plugin` trait
40//! and register themselves with the `PluginRegistry`.
41//!
42//! ```text
43//! .---.
44//! |o o|
45//! | ^ | ┌─────────────────┐
46//! | === | │ CLI/TUI │
47//! `-----' └────────┬────────┘
48//! /| |\ │
49//! ┌────────▼────────┐
50//! │ Core Engine │
51//! │ - Scanner │
52//! │ - Cleaner │
53//! └────────┬────────┘
54//! │
55//! ┌────────▼────────┐
56//! │ Plugin Registry │
57//! │ - Node.js │
58//! │ - Rust │
59//! │ - Python │
60//! │ - ... │
61//! └─────────────────┘
62//! ```
63
64// Documentation warnings - relaxed for CLI tool
65#![allow(missing_docs)]
66#![warn(rustdoc::missing_crate_level_docs)]
67
68pub mod analysis;
69pub mod cache;
70pub mod caches;
71pub mod cleaners;
72pub mod config;
73pub mod core;
74pub mod docker;
75pub mod error;
76pub mod git;
77pub mod plugins;
78pub mod scanner;
79pub mod trash;
80pub mod tui;
81
82/// Prelude module for convenient imports
83pub mod prelude {
84 pub use crate::core::{
85 Artifact, ArtifactKind, ArtifactMetadata, ArtifactStats,
86 CleanConfig, CleanProgress, CleanResult, CleanSafety, CleanSummary, CleanTarget, Cleaner,
87 Project, ProjectId, ProjectKind,
88 ScanConfig, ScanProgress, ScanResult, Scanner,
89 };
90 pub use crate::config::Config;
91 pub use crate::error::{DevSweepError, Result, ResultExt};
92 pub use crate::git::{ProtectionLevel, get_git_status};
93 pub use crate::plugins::{Plugin, PluginRegistry};
94 pub use crate::scanner::ParallelScanner;
95 pub use crate::trash::{DeleteMethod, delete_path, delete_artifact};
96}
97
98/// Version information
99pub const VERSION: &str = env!("CARGO_PKG_VERSION");
100
101/// Package name
102pub const NAME: &str = env!("CARGO_PKG_NAME");