wer

Crates.iower
lib.rswer
version1.3.0
created_at2025-06-08 22:56:58.908912+00
updated_at2025-06-14 23:33:00.895524+00
descriptionA simple cli tool to find out who last edited files or directories of git repositories
homepagehttps://github.com/matsjfunke/wer
repositoryhttps://github.com/matsjfunke/wer
max_upload_size
id1705317
size448,735
Mats Julius Funke (matsjfunke)

documentation

README

Crates.io Tests Crates.io License

⁉️ wer ⁉️

wer (German "who") is a command-line tool for answering that everyday question:

Who touched this last?!

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.

Normal Mode

🚀 Quick Start

# install wer
cargo install wer

# Find who last edited any file
wer main.rs

# Show last 3 contributors to a directory
wer -l 3 src/

📚 Table of Contents

📦 Installation

From crates.io (Recommended)

#install cargo
curl https://sh.rustup.rs -sSf | sh
# install wer crate
cargo install wer

From Source

#install cargo
curl https://sh.rustup.rs -sSf | sh
# clone repository
git clone https://github.com/matsjfunke/wer
# install wer
cd wer
cargo install --path .

Usage

🏁 All Flags

Flag Description
-l, --last N Show last N contributors (normal mode only)
-b, --blame Show git blame for files with syntax highlighting
-d, --date-only Show dates only (mutually exclusive with -m)
-m, --commit-message Show commit messages on next line
--no-color Disable colors and syntax highlighting
-v, --version Print version information
-h, --help Show help information

✨ Smart Path Resolution

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

# Just type the filename - wer finds it automatically
wer main.rs                 # Finds src/main.rs
wer Cargo.toml             # Finds ./Cargo.toml

# Works with directories too
wer src/                   # Works from anywhere in the repository

# Relative paths work across repositories
wer ../other-project/file.rs    # Finds the git repo in ../other-project/
wer ./subdir/file.py           # Within current repository

# For absolute paths, use full paths to skip search
wer ~/Documents/file.txt   # Uses absolute path directly
wer /full/path/to/file     # No search, direct access

# Shows multiples matches in normal mode
wer config.toml
# → src/config.toml:
# → 61fcdda Mats Julius Funke - 07 Jun 2025: Update config
# →
# → tests/config.toml:
# → a1b2c3d Jane Doe - 05 Jun 2025: Add test config

Path Types Supported:

Path Type Example Behavior
Filename main.rs Searches recursively in current directory
Relative in current repo ./src/main.rs Checks path directly in current repository
Relative outside repo ../other-project/file.rs Resolves path and finds appropriate git repo
Absolute path /full/path/to/file Uses path directly
Home directory ~/Documents/file.txt Expands tilde and uses directly

🎮 Basic Usage

# Check who last edited a file
wer Cargo.toml
# → 61fcdda Mats Julius Funke - 07 Jun 2025: Initial commit

# Check who last edited a directory
wer src/
# → 61fcdda Mats Julius Funke - 07 Jun 2025: Added new module

# Check files in other repositories using relative paths
wer ../other-project/README.md
# → a1b2c3d Jane Doe - 05 Jun 2025: Update documentation

# Check current directory
wer
# → 61fcdda Mats Julius Funke - 07 Jun 2025: Latest changes

👥 Last Contributors

Last Mode

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

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

🫵 Blame Mode

Blame Mode

Show git blame with syntax highlighting for any file:

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

🎨 Display Options

Blame Mode date-only

# Show only dates
wer -d main.rs
# → 07 Jun 2025

wer -b -d main.rs          # Blame with dates only
# → 07 Jun |  1 | use anyhow::Result;
# → 07 Jun |  2 | use clap::Parser;

# Show commit messages on separate lines
wer -m main.rs
# → 61fcdda Mats Julius Funke - 07 Jun 2025
#     Initial commit
wer -b -m main.rs          # Blame with commit messages
# → 61fcdda (Mats Julius Fun - 07 Jun) |  1 | use anyhow::Result;
#     Initial commit

# Disable colors and syntax highlighting
wer --no-color -b main.rs

👨‍💻 Contributing

Contributions welcome! Please read CONTRIBUTING.md for guidelines.

📑 License

This project is licensed under the MIT License - see LICENSE.md for details.

Commit count: 41

cargo fmt