A complete local command tracker, no Cloud involved. Feel free to try it, but keep in mind, that some things may break in following updates.
- A Shell prehook logs all commands into a logfile
- If the sync command is called the logfile entries are inserted into a Sqlite database
- Nix
- Systemd
- Cargo
- Systemd without Nix
- From Source
Add the following to your .zshrc
eval "$(termstat init --shell-type zsh)"cargo install termstatInstall nix and configure terstat via Homemanager
# flake.nix
# add input
inputs = {
termstat = {
url = "github:marc55s/termstat";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
}
# add overlay to your outputs
outputs = inputs@{self, nixpkgs, termstat ... }:
pkgs = import nixpkgs {
inherit system;
overlays = [ inputs.termstat.overlays.default];
}
# home.nix
{termstat, ...}:
{
programs.termstat = {
enable = true;
enableZshIntegration = true;
systemd = {
enable = true;
onCalendar = "DayOfWeek Year-Month-Day Hour:Minute:Second"; # defaults to daily
}
# Not supported yet
# enableBashIntegration = true;
# enableFishIntegration = true;
# enableIonIntegration = true;
# enableNushellIntegration = true;
};
# add the modules to your imports
imports = [termstat.homeManagerModules.default];
}After the initalization the following commands are available:
For the statistics these other commandflags are available:
termstat stats # default to termstat stats --daily/-d
termstat stats --weekly/-w
termstat stats --monthly/-m- Zsh
- Bash
- Fish
- ...
- sync
- stats --daily, --weekly, --monthly
- init --shell-type [SHELL]
- clean
- Switch from flags to subcommands
- List available Commands
- Systemd service for syncing automatically
- Nix Packaging / Module
- Publish to Crates.io
- Support multiple Shelltypes
- Display statistics in a fancy way with a TUI-Lib
- Write Installation Manual
- Far future: Support for multiple databases / Syncing across devices
- Most used command of the day|week|month
- Commands sorted by length
- Common command pipes
- Top exectued binaries


