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