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