Terminal session logger with full-text search
See the codeSearch what your terminal printed, not just what you typed.
Most shell-history tools (Atuin, hishtory) only save the command. keeplog records the full output too, via a PTY, and indexes it. So keeplog search postgres finds the docker ps you ran last week, because "postgres" appeared in what it printed.

pip install keeplog
keeplog setup # auto-start on every terminal
# restart your terminal — it's already recording
pip install keeplog
Or with Homebrew (macOS/Linux):
brew tap rathinadev/keeplog https://github.com/rathinadev/keeplog
brew install keeplog
Or one-liner (installs pip package + sets up auto-start):
curl -fsSL https://raw.githubusercontent.com/rathinadev/keeplog/main/install.sh | sh
# Initialize database
keeplog init
# Start recording manually
keeplog record
# (type commands, then exit)
# Set up auto-start (adds to .zshrc/.bashrc/config.fish)
keeplog setup
# Restart your terminal — recording starts automatically
# Search recorded commands
keeplog search docker
keeplog search "npm install"
# Browse recent
keeplog recent
keeplog get 1 # show full output of command #1
# Stats
keeplog status
| Command | Description |
|---|---|
record | Start recording session |
setup | Add auto-start hook to shell rc |
remove | Remove auto-start hook |
search <query> | Interactive search (fzf if available) |
recent | Show recent commands |
get <id> | Show full command details + output |
status | Show stats |
last | Show last session |
export | Export all data as JSON |
clear <days> | Clear data older than N days |
config [key val] | Get/set configuration |
init | Initialize database |
keeplog auto-detects your shell ($SHELL) and installs the matching hook:
ZDOTDIR + preexec/precmdPROMPT_COMMAND + the DEBUG trapfish_preexec/fish_postexec eventsIt works inside tmux and screen: each pane gets its own terminal, so each pane is recorded as its own session.
# Set mode to light (metadata only, no output)
keeplog config mode light
# Set retention to 7 days
keeplog config retention_days 7
# View current config
keeplog config
Config file location:
~/Library/Application Support/keeplog/config.json~/.config/keeplog/config.jsonkeeplog record spawns your shell inside a pseudo-terminal (PTY)keeplog search queries the FTS index and pipes results into fzfTerminal → keeplog record → PTY → your shell
↓
SQLite DB → fzf search
Data is stored locally — no cloud, no servers:
~/Library/Application Support/keeplog/logs.db~/.local/share/keeplog/logs.dbThe database and config file are created with 0600 permissions (owner read/write only).
In full mode (the default), keeplog records everything that appears in your terminal — including anything you type or that gets printed back, unfiltered. That means:
logs.db.keeplog export dumps this data as JSON with no redaction.logs.db directly with sqlite3.If this matters to you:
keeplog config mode light to record only the command, directory, exit code, and timestamp — no output — for a safer default.retention_days so sensitive data doesn't linger (keeplog config retention_days 7).full-mode session is active, or switch to light mode first.keeplog does not send data anywhere — everything stays in your local SQLite file — but it does not currently redact secrets on your behalf.
pip uninstall keeplog
keeplog remove
git clone https://github.com/rathinadev/keeplog
cd keeplog
pip install -e .
python -m pytest tests/
MIT
62 commits
Python
91.9%
Shell
6.7%
Ruby
1.4%
Terminal session logger with full-text search
See the codeSearch what your terminal printed, not just what you typed.
Most shell-history tools (Atuin, hishtory) only save the command. keeplog records the full output too, via a PTY, and indexes it. So keeplog search postgres finds the docker ps you ran last week, because "postgres" appeared in what it printed.

pip install keeplog
keeplog setup # auto-start on every terminal
# restart your terminal — it's already recording
pip install keeplog
Or with Homebrew (macOS/Linux):
brew tap rathinadev/keeplog https://github.com/rathinadev/keeplog
brew install keeplog
Or one-liner (installs pip package + sets up auto-start):
curl -fsSL https://raw.githubusercontent.com/rathinadev/keeplog/main/install.sh | sh
# Initialize database
keeplog init
# Start recording manually
keeplog record
# (type commands, then exit)
# Set up auto-start (adds to .zshrc/.bashrc/config.fish)
keeplog setup
# Restart your terminal — recording starts automatically
# Search recorded commands
keeplog search docker
keeplog search "npm install"
# Browse recent
keeplog recent
keeplog get 1 # show full output of command #1
# Stats
keeplog status
| Command | Description |
|---|---|
record | Start recording session |
setup | Add auto-start hook to shell rc |
remove | Remove auto-start hook |
search <query> | Interactive search (fzf if available) |
recent | Show recent commands |
get <id> | Show full command details + output |
status | Show stats |
last | Show last session |
export | Export all data as JSON |
clear <days> | Clear data older than N days |
config [key val] | Get/set configuration |
init | Initialize database |
keeplog auto-detects your shell ($SHELL) and installs the matching hook:
ZDOTDIR + preexec/precmdPROMPT_COMMAND + the DEBUG trapfish_preexec/fish_postexec eventsIt works inside tmux and screen: each pane gets its own terminal, so each pane is recorded as its own session.
# Set mode to light (metadata only, no output)
keeplog config mode light
# Set retention to 7 days
keeplog config retention_days 7
# View current config
keeplog config
Config file location:
~/Library/Application Support/keeplog/config.json~/.config/keeplog/config.jsonkeeplog record spawns your shell inside a pseudo-terminal (PTY)keeplog search queries the FTS index and pipes results into fzfTerminal → keeplog record → PTY → your shell
↓
SQLite DB → fzf search
Data is stored locally — no cloud, no servers:
~/Library/Application Support/keeplog/logs.db~/.local/share/keeplog/logs.dbThe database and config file are created with 0600 permissions (owner read/write only).
In full mode (the default), keeplog records everything that appears in your terminal — including anything you type or that gets printed back, unfiltered. That means:
logs.db.keeplog export dumps this data as JSON with no redaction.logs.db directly with sqlite3.If this matters to you:
keeplog config mode light to record only the command, directory, exit code, and timestamp — no output — for a safer default.retention_days so sensitive data doesn't linger (keeplog config retention_days 7).full-mode session is active, or switch to light mode first.keeplog does not send data anywhere — everything stays in your local SQLite file — but it does not currently redact secrets on your behalf.
pip uninstall keeplog
keeplog remove
git clone https://github.com/rathinadev/keeplog
cd keeplog
pip install -e .
python -m pytest tests/
MIT
62 commits
Python
91.9%
Shell
6.7%
Ruby
1.4%