Skip to main content

Lines of code codecov CodeFactor CodeQL Continuous Integration Contributor Covenant GitHub contributors Documentation Status License Merged PRs OpenSSF Best Practices OpenSSF Scorecard Platforms pre-commit pre-commit.ci Status PyPI - Version PyPI - Downloads Python Version Ruff

NOTICE: After using this package for a few years, we realized we'd attempted to do too many things at once with it. It still provides tremendous functionality for a wide variety of use cases, but for particular corner cases, it became apparent that design decisions made early on were hampering forward progress, and we wouldn't recommend doing things the same way today. Certain aspects of its functionality have inspired more focused packages (reverse-argparse, staged-script), and we hope to do the same with more functionality in the future. For the time being, though, don't expect much development and maintenance here. That said, if you use shell-logger and are eager to contribute to its longevity, let us know.

shell-logger

The shell-logger Python package allows you to interact with the shell, while logging various metadata, statistics, and trace information. Any time you're tempted to write your own wrapper around things like subprocess.Popen() or subprocess.run(), consider using shell_logger.ShellLogger.log() instead. If you're familiar with the Unix script command, this is similar in principle, but with substantially more functionality. If you're familiar with Python's logging module, the motivation is similar, but this intends to capture what's happening in the shell rather than in Python itself.

Installation

To get up and running with shell-logger, simply:

python3 -m pip install shell-logger-sandialabs

Usage

Once the package is installed, you can simply

from shell_logger import ShellLogger
sl = ShellLogger("Title of Log File")
sl.log("Execute my first command in the shell.", "echo 'Hello World'")
sl.finalize()

For more detailed usage and API information, please see our documentation.

Where to Get Help

If you're having trouble with shell-logger, or just want to ask a question, head on over to our issue board. If a quick search doesn't yield what you're looking for, feel free to file an issue.

Contributing

If you're interested in contributing to the development of shell-logger, we'd love to have your help 😀 Check out our contributing guidelines for how to get started. Past contributors include:

See LICENSE.md and COPYRIGHT.md.

Credits

Special thanks to the EMPIRE project for investing in the initial development of this tool, and the GMS project for serving as a second user and contributing to its clean-up.

Metadata

Release files for shell-logger-sandialabs 3.0.4

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

Source distribution (sdist)

Source distribution for shell-logger-sandialabs 3.0.4
File Size Uploaded
shell_logger_sandialabs-3.0.4.tar.gz 173.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shell-logger-sandialabs 3.0.4
File Interpreter ABI Platform
shell_logger_sandialabs-3.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 356.4 kB

Release files / shell_logger_sandialabs-3.0.4.tar.gz

Download URL shell_logger_sandialabs-3.0.4.tar.gz
Size 173.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8b7ebeaf0395c594451ee6f97c29684e308bd29f130dbdee793aaa6d7f52a484
BLAKE2b-256 checksum
How to use checksums
abf645b627cf89177f8c0f5ed0e49fa9cc7e619575823155ff6f9367b05ab3de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 21, 2025.

Transparency log

Release files / shell_logger_sandialabs-3.0.4-py3-none-any.whl

Download URL shell_logger_sandialabs-3.0.4-py3-none-any.whl
Size 182.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2915307705386cf9f691a82efbcc64c99d9f21f125699f6a6db3f74db0158d25
BLAKE2b-256 checksum
How to use checksums
87296343bfc97a15b5f885a7c6d609a7a0768de35827d3038d297e646a3f998e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 21, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.4 This release

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

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