Back to Compendiums

wer

wer (german "who") is a CLI tool to find out: Who touched this last?!

by matsjfunke

A part of engineering is bugs fixing โ†’ which means jumping into code you havenโ€™t seen before.

Which for me translates to wondering who touched this last ...

Sure, thereโ€™s git blame, but looking line by line doesnโ€™t always tell the whole story, a bug on one line could be caused by changes elsewhere in the file or even in a different file in the directory.

Which is why I created wer , a CLI tool that makes it effortless to find out who last edited a file or directory as it finds files / directories by name, relative or absolute paths. This helps you pinpoint the person with the most recent context about changes.

No more complex git log commands, no more hunting for exact file paths. wer gives you context aware file / directory search. wer offers both file-level recency and line-specific history through its blame mode, bridging the gap between git blame and git-who plus offering features like smart file finding and syntax highlighting.

Checkout the public github repository (maybe even leave a star if you find it helpful)

๐Ÿš€ Quick Start

bash
1# install wer
2cargo install wer
3
4# Find who last edited any file
5wer main.rs
6
7# Show last 3 contributors to a directory
8wer -l 3 src/
9

๐Ÿ“ฆ Installation

From crates.io (Recommended)

bash
1#install cargo
2curl https://sh.rustup.rs -sSf | sh
3# install wer crate
4cargo install wer
5

From Source

bash
1#install cargo
2curl https://sh.rustup.rs -sSf | sh
3# clone repository
4git clone https://github.com/matsjfunke/wer
5# install wer
6cd wer
7cargo install --path .
8

๐Ÿ All Flags

FlagDescription
-l, --last NShow last N contributors (normal mode only)
-b, --blameShow git blame for files with syntax highlighting
-d, --date-onlyShow dates only (mutually exclusive with -m)
-m, --commit-messageShow commit messages on next line
--no-colorDisable colors and syntax highlighting
-v, --versionPrint version information
-h, --helpShow help information

๐Ÿง Smart Path Resolution

wer automatically finds files and directories by name and intelligently handles different path types:

bash
1# Just type the filename - wer finds it automatically
2wer main.rs                 # Finds src/main.rs
3wer Cargo.toml             # Finds ./Cargo.toml
4
5# Works with directories too
6wer src/                   # Works from anywhere in the repository
7
8# Relative paths work across repositories
9wer ../other-project/file.rs    # Finds the git repo in ../other-project/
10wer ./subdir/file.py           # Within current repository
11
12# For absolute paths, use full paths to skip search
13wer ~/Documents/file.txt   # Uses absolute path directly
14wer /full/path/to/file     # No search, direct access
15
16# Shows multiples matches in normal mode
17wer config.toml
18# โ†’ src/config.toml:
19# โ†’ 61fcdda Mats Julius Funke - 07 Jun 2025: Update config
20# โ†’
21# โ†’ tests/config.toml:
22# โ†’ a1b2c3d Jane Doe - 05 Jun 2025: Add test config
23

Path Types Supported:

Path TypeExampleBehavior
Filenamemain.rsSearches recursively in current directory
Relative in current repo./src/main.rsChecks path directly in current repository
Relative outside repo../other-project/file.rsResolves path and finds appropriate git repo
Absolute path/full/path/to/fileUses path directly
Home directory~/Documents/file.txtExpands tilde and uses directly

๐ŸŽฎ Basic Usage

bash
1# Check who last edited a file
2wer Cargo.toml
3# โ†’ 61fcdda Mats Julius Funke - 07 Jun 2025: Initial commit
4
5# Check who last edited a directory
6wer src
7# โ†’ 61fcdda Mats Julius Funke - 07 Jun 2025: Added new module
8
9# Check files in other repositories using relative paths
10wer ../other-project/README.md
11# โ†’ a1b2c3d Jane Doe - 05 Jun 2025: Update documentation
12
13# Check current directory
14wer
15# โ†’ 61fcdda Mats Julius Funke - 07 Jun 2025: Latest changes
16

๐Ÿ‘ฅ Last Contributors

Find the last N unique people who touched a file or directory:

bash
1# Show last 5 contributors
2wer -l 5 src/
3# โ†’ a1b2c3d George Boole - 1854: feat: introduce Boolean algebra and logical foundations
4# โ†’ e4f5g6h Alan Turing - 30 Nov 1936: feat: develop theoretical computing foundations
5# โ†’ i7j8k9l Claude Shannon - Jul 1948: feat: establish information theory and digital communication
6# โ†’ m0n1o2p Steve Wozniak - Jul 1976: feat: launch personal computing revolution
7# Searched for 5 but only 4 contributed  # (if fewer found)
8

๐Ÿซต Blame Mode

Show git blame with syntax highlighting for any file:

bash
1# Show blame with full commit info and syntax highlighting
2wer -b main.rs              # Automatically finds src/main.rs
3# โ†’ 61fcdda (Mats Julius Fun - 07 Jun) |  1 | use anyhow::Result;
4# โ†’ 6b70ffb (Mats Julius Fun - 07 Jun) |  2 | use clap::Parser;
5

๐ŸŽจ Display Options

bash
1# Show only dates
2wer -d main.rs
3# โ†’ 07 Jun 2025
4
5wer -b -d main.rs          # Blame with dates only
6# โ†’ 07 Jun |  1 | use anyhow::Result;
7# โ†’ 07 Jun |  2 | use clap::Parser;
8
9# Show commit messages on separate lines
10wer -m main.rs
11# โ†’ 61fcdda Mats Julius Funke - 07 Jun 2025
12#     Initial commit
13wer -b -m main.rs          # Blame with commit messages
14# โ†’ 61fcdda (Mats Julius Fun - 07 Jun) |  1 | use anyhow::Result;
15#     Initial commit
16
17# Disable colors and syntax highlighting
18wer --no-color -b main.rs
19