Skip to main content

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//! - **Terminal-Adaptive Tables**: Tables adjust to terminal width automatically
12//! - **Consistent Filters**: `--in`, `--by`, `--min-uptime`, `--parent`, `--range`, `--sort`, `--limit`
13//! - **File Lookup**: `proc for ./script.py` - find by file path
14//! - **Cross-Platform**: macOS, Linux, and Windows
15//! - **Shell Completions**: bash, zsh, fish via `proc completions`
16//! - **Man Pages**: `proc manpage` generates documentation
17//!
18//! ## Quick Start
19//!
20//! ```bash
21//! # What's on port 3000?
22//! proc on :3000
23//!
24//! # What's running this file?
25//! proc for ./script.py
26//!
27//! # Kill multiple targets
28//! proc kill :3000,:8080,node -y
29//!
30//! # Node processes in current directory
31//! proc by node --in .
32//!
33//! # Preview before killing
34//! proc kill node --dry-run
35//!
36//! # Kill only node processes in current directory
37//! proc kill node --in .
38//!
39//! # Generate shell completions
40//! proc completions zsh > ~/.zsh/completions/_proc
41//! ```
42//!
43//! ## Commands
44//!
45//! **Discovery**: `on`, `for`, `by`, `in`, `list`, `info`, `ports`, `tree`, `stuck`
46//!
47//! **Lifecycle**: `kill`, `stop`, `unstick`
48//!
49//! **Tooling**: `completions`, `manpage`
50
51pub mod commands;
52pub mod core;
53pub mod error;
54pub mod ui;
55
56pub use error::{ProcError, Result};
57
58/// Library version
59pub const VERSION: &str = env!("CARGO_PKG_VERSION");