| Crates.io | keystr |
| lib.rs | keystr |
| version | 0.1.1 |
| created_at | 2025-10-07 22:28:21.85569+00 |
| updated_at | 2025-10-17 15:40:37.693893+00 |
| description | A keystroke monitor for Unix OSs using Rust, and tracks the number of key strokes made when active |
| homepage | https://github.com/thembinkosimkhonta01/keystr |
| repository | https://github.com/thembinkosimkhonta01/keystr |
| max_upload_size | |
| id | 1872895 |
| size | 49,582 |
A privacy-focused CLI tool that counts your keyboard activity without storing any actual keypress data. Perfect for tracking typing productivity and habits!

cargo install keystr
keystr init
keystr start
If you face installation issues on Debian/Ubuntu, do the Prerequisites
sudo apt-get update
sudo apt-get install libx11-dev libxtst-dev libevdev-dev libxcb1-dev
sudo dnf install libX11-devel libXtst-devel libevdev-devel libxcb-devel
sudo pacman -S libx11 libxtst libevdev libxcb
git clone https://github.com/thembinkosimkhonta01/keystr
cd keystr
make build
# or
cargo build --release
make install
# or
cargo install --path .
Or copy the binary to your PATH:
sudo cp target/release/keystr /usr/local/bin/
Set up the configuration directory and data files:
keystr init
Start the background daemon (runs in detached mode):
keystr start
The daemon will run in the background and count keystrokes silently.
Check if monitoring is currently running:
keystr status
Stop the background daemon:
keystr stop
Show all statistics (default shows daily for last 7 days):
keystr stats
Show daily statistics:
keystr stats --daily
Show weekly statistics:
keystr stats --weekly
Show monthly statistics:
keystr stats --monthly
Combine flags:
keystr stats --daily --weekly --monthly
Export statistics to a text file:
keystr export
Custom output file:
keystr export --output my_stats.txt
Clear all statistics (requires confirmation):
keystr reset
All data is stored in your system's config directory:
~/.config/keystr/~/Library/Application Support/keystr/C:\Users\<User>\AppData\Roaming\keystr\Files:
data.json - Stores keystroke counts and statisticsdaemon.pid - Process ID of running daemon (when active)The daemon might need elevated permissions to monitor keyboard events. Try:
sudo keystr start
keystr statuskeystr stop
keystr start
Make sure you've installed the X11 development libraries (see Prerequisites section).
=== Keystroke Statistics ===
Total Keystrokes: 45,782
📅 Daily Stats (Last 7 Days):
2025-10-07 8,234 keystrokes
2025-10-06 7,891 keystrokes
2025-10-05 6,543 keystrokes
2025-10-04 9,012 keystrokes
2025-10-03 5,678 keystrokes
2025-10-02 4,321 keystrokes
2025-10-01 4,103 keystrokes
📊 Weekly Stats (Last 7 Days):
45,782 keystrokes
📈 Monthly Stats (Last 30 Days):
45,782 keystrokes
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is designed for personal productivity tracking only. Always respect privacy laws and obtain proper consent before monitoring any keyboard activity that isn't your own.