Keystroke Counter
A privacy-focused CLI tool that counts your keyboard activity without storing any actual keypress data. Perfect for tracking typing productivity and habits!

Getting Started
If you face installation issues on Debian/Ubuntu, do the Prerequisites
- Only counts keystrokes - no actual key data is captured or stored
- Fully transparent - all data stored locally
- Open source - audit the code yourself
- No network access - everything stays on your machine
Features
- Track total, daily, weekly, and monthly keystroke counts
- Runs in detached background mode
- Export statistics to text files
- Beautiful colored terminal output
- Simple configuration in your config directory
Prerequisites
Linux (Ubuntu/Debian)
Linux (Fedora/RHEL/CentOS)
Linux (Arch)
Installation
- Clone the repository:
- Build the project:
# or
- (Optional) Install globally:
# or
Or copy the binary to your PATH:
📖 Usage
Initialize
Set up the configuration directory and data files:
Start Monitoring
Start the background daemon (runs in detached mode):
The daemon will run in the background and count keystrokes silently.
Check Status
Check if monitoring is currently running:
Stop Monitoring
Stop the background daemon:
View Statistics
Show all statistics (default shows daily for last 7 days):
Show daily statistics:
Show weekly statistics:
Show monthly statistics:
Combine flags:
Export Statistics
Export statistics to a text file:
Custom output file:
Reset Statistics
Clear all statistics (requires confirmation):
📁 Configuration
All data is stored in your system's config directory:
- Linux:
~/.config/keystr/ - macOS:
~/Library/Application Support/keystr/ - Windows:
C:\Users\<User>\AppData\Roaming\keystr\
Files:
data.json- Stores keystroke counts and statisticsdaemon.pid- Process ID of running daemon (when active)
🐛 Troubleshooting
"Permission denied" errors on Linux
The daemon might need elevated permissions to monitor keyboard events. Try:
Daemon won't start
- Check if it's already running:
keystr status - Check system logs for errors
- Try stopping and starting again:
Build fails with X11 errors
Make sure you've installed the X11 development libraries (see Prerequisites section).
📊 Example Output
===
)
)
)
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
⚠️ Disclaimer
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.