https://github.com/jacek-kurlit/pik
Process Interactive Kill
https://github.com/jacek-kurlit/pik
rust terminal tui
Last synced: 2 months ago
JSON representation
Process Interactive Kill
- Host: GitHub
- URL: https://github.com/jacek-kurlit/pik
- Owner: jacek-kurlit
- License: mit
- Created: 2024-02-10T14:59:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-05T17:55:43.000Z (2 months ago)
- Last Synced: 2025-02-05T18:55:06.168Z (2 months ago)
- Topics: rust, terminal, tui
- Language: Rust
- Homepage: https://crates.io/crates/pik
- Size: 6.47 MB
- Stars: 217
- Watchers: 5
- Forks: 8
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-rust - jacek-kurlit/pik - A TUI command line tool that helps to find and kill processes (Applications / System tools)
- awesome-rust - jacek-kurlit/pik - A TUI command line tool that helps to find and kill processes (Applications / System tools)
- awesome-rust-tools - pik
- awesomeness - jacek-kurlit/pik - Process Interactive Kill (🛠️ Productivity / ☸️ Kubernetes)
README
Pik
[](https://github.com/jacek-kurlit/pik/actions)
[](https://github.com/jacek-kurlit/pik/releases/latest)Process Interactive Kill is a command line tool that helps to find and kill process.
It works like pkill command but search is interactive.
This tool is still under development
## Table of Contents
- [Features](#features)
- [Installation](#installation)
- [Configuration](#configuration)
- [Caveats](#caveats)
- [Development](#development)## Features
Pik allows to **fuzzy** search processes by:
- Name - No prefix is required, just type process name, for example 'firefox'

- Cmd Path - Prefix search with '/', for example '/firefox'

- Arguments - Prefix search with '-' for example '-foo'. Please note that if you want to use this feature in cli you must add `--`, for example `pik -- -foo`

- Ports - Prefix search with ':' for example ':8080'

- Everywhere - Prefix search with '~' for example '~firefox'

- Select exact process by id - Prefix with '!' for example '!1234'
- Select process family (process + it's children) - Prefix with '@' for example '@1234'After selecting process you can kill it with Ctrl + X
## Installation
**[Archives of precompiled binaries for pik are available for Linux and macOS.](https://github.com/jacek-kurlit/pik/releases)**
On **Arch Linux**
```sh
pacman -S pik
```On **Fedora**
```sh
sudo dnf copr enable rusty-jack/pik
sudo dnf install pik
```On **Tumbleweed**
```sh
sudo zypper install pik
```On **Gentoo**
It is available via `lamdness` overlay
```sh
sudo eselect repository enable lamdness
sudo emaint -r lamdness sync
sudo emerge -av sys-process/pik
```With **[dra](https://github.com/devmatteini/dra)**
```sh
dra download --install jacek-kurlit/pik
```If you're a **Rust programmer**, pik can be installed with `cargo`.
```sh
cargo install pik
```Alternatively, one can use [`cargo binstall`](https://github.com/cargo-bins/cargo-binstall) to install a pik
binary directly from GitHub:```sh
cargo binstall pik
```## Configuration
### Application configuration
You may set your preferences in `config.toml` file located in:
| Platform | Config dir |
| -------------------------- | ---------------------- |
| Linux | /home/_:username_/.config/pik|
| MacOS | /Users/_:username_/Library/Application Support/pik|
| Windows | C:\Users\\_:username_\AppData\Roaming\pik|All options are optional, if skipped default values will be used.
Most of config fields have cli arg equivalent. If both are set cli arg is preferred.
Run `pik -- --help` to see cli optionsYou can find default values below
``` toml
# Size of the viewport
screen_size = { height = 20 } # run pik in 20 lines of the terminal
# screen_size = "fullscreen" # run pik in fullscreen# Icons require nerd fonts v3
use_icons = false[ignore]
# ignore processes that path matches any of given regex
paths = []
# paths = ["/System/.*", "Applications/.*"]
# ignore other users processes
other_users = true
# ignore thread processes (on linux)
threads = true
```### Key maps
| Key(s) | Action |
| -------------------------- | ---------------------- |
| `Esc` \| `Ctrl + C` | Quit |
| `Ctrl + X` | Kill process |
| `Ctrl + R` | Refresh processes list |
| `Ctrl + F` | Details forward |
| `Ctrl + B` | Details backward |
| `Tab` \| `Shift + Tab` | Select next/previous |
| `Arrow Down` \| `Arrow Up` | Select next/previous |
| `Ctrl + J` \| `Ctrl + K` | Select next/previous |
| `Ctrl + Arrow Down` \| `Ctrl + Arrow Up` | Select last/first |
| `Alt + P` | Select parent process |
| `Alt + F` | Select familly processes |
| `Alt + S` | Select siblings processes |## Caveats
- Process name on linux system it is not always exe name also it is limited to 15 chars
- In linux process may appear on list but you are not allowed to get information about ports it uses. In such situations you need to run pik with root privileges## Development
### Supported Systems
In theory pik is using coross compliant lib that allows to run it on all major platforms.
In pratice I'm using linux and development is performed based on this OS.
Pik will probably work on MacOs and Windows but that must be tested by community since I don't own computers with these OS'es.
If you are able to test it on windows or macos please create issue to let me know.### Setup
- Rust 1.79+
- Cargo make [link](https://github.com/sagiegurari/cargo-make)
- Cargo nextest [link](https://github.com/nextest-rs/nextest)
- VHS [link](https://github.com/charmbracelet/vhs)### Building
```sh
git clone https://github.com/jacek-kurlit/pik
cd pik
cargo build --release
./target/release/pik --version
```