proc_cli/lib.rs
1#![warn(missing_docs)]
2//! # proc - Semantic Process Management CLI
3//!
4//! Semantic CLI tool for process management. Target by port, PID, name or path.
5//!
6//! ## Features
7//!
8//! - **Unified Targets**: `:port`, `PID`, and `name` work the same everywhere
9//! - **Multi-Target**: `proc kill :3000,:8080,node` - comma-separated targets
10//! - **Query Language**: `proc by node --in .` - composable filters
11//! - **Working Directory**: See which project folder a process is running from
12//! - **Terminal-Adaptive Tables**: Tables adjust to terminal width automatically
13//! - **Consistent Filters**: `--in`, `--by`, `--min-uptime`, `--parent`, `--range`, `--sort`, `--limit`
14//! - **Real-Time Monitoring**: `proc watch` / `proc top` - live process table with auto-refresh
15//! - **File Lookup**: `proc for ./script.py` - find by file path
16//! - **Cross-Platform**: macOS, Linux, and Windows
17//! - **Shell Completions**: bash, zsh, fish via `proc completions`
18//! - **Man Pages**: `proc manpage` generates documentation
19//!
20//! ## Quick Start
21//!
22//! ```bash
23//! # What's on port 3000?
24//! proc on :3000
25//!
26//! # What's running this file?
27//! proc for ./script.py
28//!
29//! # Kill multiple targets
30//! proc kill :3000,:8080,node
31//!
32//! # Node processes in current directory
33//! proc by node --in .
34//!
35//! # Preview before killing
36//! proc kill node --dry-run
37//!
38//! # Kill only node processes in current directory
39//! proc kill node --in .
40//!
41//! # Watch processes in real-time
42//! proc watch node --in .
43//!
44//! # Generate shell completions
45//! proc completions zsh > ~/.zsh/completions/_proc
46//! ```
47//!
48//! ## Commands
49//!
50//! **Discovery**: `on`, `for`, `by`, `in`, `list`, `info`, `ports`, `tree`, `stuck`, `watch`
51//!
52//! **Lifecycle**: `kill`, `stop`, `unstick`
53//!
54//! **Tooling**: `completions`, `manpage`
55
56pub mod commands;
57pub mod core;
58pub mod error;
59pub mod ui;
60
61pub use error::{ProcError, Result};
62
63/// Library version
64pub const VERSION: &str = env!("CARGO_PKG_VERSION");