Appends a timestamped entry to a plain-text daily log file.
- Appends timestamped entries to today's log file
- Accepts piped input, so shell output can be logged without retyping
- Shows today's entries when run with no arguments
- Shows yesterday's log with
--yesterday - Shows this week's entries with
--week - Shows last N entries across all days with
--tail N - Shows a specific day's log with
--date YYYY-MM-DD - Appends to a specific day's log with
--on YYYY-MM-DD "text" - Searches all logs with
--search TERM - Prints today's file path with
--file - Lets you override the log directory with
--dir PATHorPLAINLOG_DIR
Files are plain text stored in ~/logs/ by default. One file per day, named YYYY-MM-DD.txt. No account, no database, no config required.
./install.shThat creates ~/bin/ if needed, symlinks plainlog.py there as plainlog, makes it executable, and warns if ~/bin is not on your PATH.
Manual install:
chmod +x plainlog.py
mkdir -p ~/bin
ln -sf "$(pwd)/plainlog.py" ~/bin/plainlog# append an entry to today's log
plainlog "finished the config work"
# append from stdin or a pipe
printf 'captured deploy output' | plainlog
plainlog - <<'EOF'
wrapped up notes from stdin
EOF
# show today's log
plainlog
# show yesterday's log
plainlog --yesterday
# show this week's entries
plainlog --week
# show last 10 entries across all days
plainlog --tail 10
# show a specific day
plainlog --date 2026-04-07
# append to a past day
plainlog --on 2026-04-07 "wrote the incident notes"
# search all logs for a term
plainlog --search deploy
# print today's log file path
plainlog --file
# use a different log directory for one command
plainlog --dir ~/work-logs "captured meeting notes"
# set a custom default location
PLAINLOG_DIR=~/journal plainlog "wrote the draft"Each day gets one file:
~/logs/2026-04-07.txt
Each entry is one line:
[14:38] shipped v1 docs
- Timestamps use local machine time
- Custom log directory support is local-only, via
--dirorPLAINLOG_DIR - Entries are stored exactly as typed after trimming outer whitespace
- Piped or stdin input is accepted, but multi-line input is stored as one raw block
--dateis read-only; use--onto append to a past date--tailscans back up to 90 days- Append locking uses POSIX file locks; concurrent-write protection is strongest on Unix-like systems