Skip to main content

Simple Python library to return your shell history or dump to a nicely formatted JSON file.

Project description

Shhistory

Simple Python library to return your shell history or dump to a JSON file.

You can install this library via pip:

pip install shhistory

Example

A quick example to print the JSON data to stdout:

# test.py
from shhistory import ShellHistory

print(ShellHistory.get_shell_history())

You can also create a quick bash utility with this library by piping to jq for nicer formatting:

python3 test.py | jq

If you would like to analyze the data more securely, you can also dump to a file:

from shhistory import ShellHistory

print(ShellHistory.dump_shell_history())

NOTE: Windows is not currently supported. This may be added in a future update.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shhistory-0.1.9.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

shhistory-0.1.9-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page