Skip to main content

kautolog

PyPI version

Auto-log everything you see in every terminal tab on Kali/Linux using script(1). Captures prompt, commands, output, ANSI colors, and ncurses apps with optional timing/replay, tmux per-pane logs, logrotate, and rclone cloud sync.

Install

Recommended:

pipx install kautolog
kautolog install

This will:

  • Hook into both ~/.bashrc and ~/.zshrc for Zsh and Bash auto-logging.
  • Install kautolog-replay script into ~/.local/bin.

kautolog install Options

Flag Default Description
--logdir PATH ~/terminal-logs Custom log output directory
--with-tmux False Add autologging to ~/.tmux.conf
--with-logrotate / --no-logrotate True Install user-level logrotate config
--with-sync remote:path (none) Enable rclone sync (e.g. gdrive:kautolog-logs)
--interval N 10 Sync interval in minutes for systemd timer

Replaying logs

To replay a session with timing:

kautolog replay ~/terminal-logs/2025/08/10/kali-33608-203123

To instantly dump the log without delay:

kautolog replay -i ~/terminal-logs/2025/08/10/kali-33608-203123

kautolog replay Options

Flag / Arg Description Notes
<log_base> Path to .log file or base name (no extension) Required
-i Instant dump (no timing) Just prints the .log file
-d <num> Speed divisor (multiplier) -d 2 = 2× faster, -d 10 = 10× faster, -d 0.5 = 2× slower
-m <secs>, --maxdelay <secs> Maximum delay between lines Clamps long pauses (e.g. -m 0.1)
--target <secs> Normalize total replay to target duration Auto-computes divisor; also sets --maxdelay 0.12 if not provided

Log Format

Logs are saved to:

~/terminal-logs/YYYY/MM/DD/hostname-PID-TIMESTAMP.log
~/terminal-logs/YYYY/MM/DD/hostname-PID-TIMESTAMP.timing

If --with-tmux is used, each tmux pane logs independently.

Enabling Automatic Log Cleanup (Optional)

By default, kautolog install places a logrotate config at:

~/.config/logrotate.d/terminal-logs

Most systems do not run logrotate from this location.
To enable automatic log cleanup, copy it to the system logrotate directory:

sudo cp ~/.config/logrotate.d/terminal-logs /etc/logrotate.d/terminal-logs

This will:

  • Rotate logs daily
  • Keep 14 days of logs
  • Compress old logs
  • Prevent unlimited disk usage

Uninstall

kautolog uninstall

Removes all shell hooks and scripts cleanly.

If you installed using pipx:

pipx uninstall kautolog

License

The scripts and documentation in this project are released under the MIT License

Metadata

Release files for kautolog 1.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kautolog 1.1.14
File Size Uploaded Provenance Actions
kautolog-1.1.14.tar.gz 10.1 kB With provenance Details for kautolog-1.1.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kautolog 1.1.14
File Interpreter ABI Platform Actions
kautolog-1.1.14-py3-none-any.whl Python 3 none any Details for kautolog-1.1.14-py3-none-any.whl

Total release size: 21.4 kB

Release files / kautolog-1.1.14.tar.gz

Download URL kautolog-1.1.14.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3094dc46b448070d58a05b5b00bf791d8285654ba420b1cdc2469676ee8f459e
BLAKE2b-256 checksum
How to use checksums
06f32b339beb85a3e5da3bceb5aa7ff4a08408329a0cf6ee2098daf156874983
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2025.

Transparency log

Release files / kautolog-1.1.14-py3-none-any.whl

Download URL kautolog-1.1.14-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ff89791bf26d43527efed621411f4b96154a2e8d633b8a660a84978a5b4ec54
BLAKE2b-256 checksum
How to use checksums
a8c13de4ed4197d004c201c4625ba98656ef650fda3362419a6606653ecfaf51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2025.

Transparency log

Security for kautolog 1.1.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kautolog-1.1.14.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 17, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page