Save logs of claude code, and convert them into HTML
Project description
Claude Logging
Automatically keep logs of "claude code" sessions, and convert them to HTML.
Features
- Automatically log
claudesessions in~/.claude/logs - Convert logged session into HTML files
- Strips control characters and preserves text formatting
- Converts terminal output to styled HTML
- Supports syntax highlighting, bold text, and colors
- Includes line numbering and theme toggling in the HTML output
Installation
pip install claude-logging
It is also possible to run it directly using uxv:
uvx claude-logging
For automatic logging of every invocation of claude, you can put an alias
in your ~/.bashrc or equivalent:
alias claude="uxv claude-logging"
Usage
Default Mode: Record Claude Sessions
When you run the command claude-logging, it will:
- Create a log directory at
~/.claude/logs/if it doesn't exist - Generate a unique log filename based on your current directory and timestamp
- Run the
claudecommand with all provided arguments - Record the entire session to the log file
# Run claude with logging
claude-logging
# Pass arguments to claude
claude-logging --help
claude-logging path/to/your/file.py
HTML Conversion Mode
Convert existing log files to HTML:
# Convert a log file to HTML
claude-logging dump path/to/logfile.log
# Output to a specific file
claude-logging dump path/to/logfile.log -o output.html
# Use stdin/stdout
cat logfile.log | claude-logging dump - > output.html
License
MIT License
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_logging-0.3.1.tar.gz.
File metadata
- Download URL: claude_logging-0.3.1.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d39c8293b45ec12762e82fdd4d0c1635057efada46854a5133ff588dc23379af
|
|
| MD5 |
c4d4af0c216b25db0045a5898f337b78
|
|
| BLAKE2b-256 |
4979183f5291bdf73adfc171df7b7cb1c65ed14695ceabc9d0d54a977ca59111
|
Provenance
The following attestation bundles were made for claude_logging-0.3.1.tar.gz:
Publisher:
build-and-publish.yml on antocuni/claude-logging
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_logging-0.3.1.tar.gz -
Subject digest:
d39c8293b45ec12762e82fdd4d0c1635057efada46854a5133ff588dc23379af - Sigstore transparency entry: 180967520
- Sigstore integration time:
-
Permalink:
antocuni/claude-logging@fd322edd34189e420db537a560a2ceb970e46341 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/antocuni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yml@fd322edd34189e420db537a560a2ceb970e46341 -
Trigger Event:
release
-
Statement type:
File details
Details for the file claude_logging-0.3.1-cp38-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: claude_logging-0.3.1-cp38-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 26.5 kB
- Tags: CPython 3.8+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acfc17b0dacb07e342cb543537f118cdc137fc61a8c778630e69b719c1d6ddea
|
|
| MD5 |
e9296da18755b935255a8b2d8d3f6d81
|
|
| BLAKE2b-256 |
c0dbc45049c1e2d48bef1e5501f916869be82dfe0d44eb7cf7b5ba2aa5d2305c
|
Provenance
The following attestation bundles were made for claude_logging-0.3.1-cp38-abi3-musllinux_1_2_x86_64.whl:
Publisher:
build-and-publish.yml on antocuni/claude-logging
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_logging-0.3.1-cp38-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
acfc17b0dacb07e342cb543537f118cdc137fc61a8c778630e69b719c1d6ddea - Sigstore transparency entry: 180967521
- Sigstore integration time:
-
Permalink:
antocuni/claude-logging@fd322edd34189e420db537a560a2ceb970e46341 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/antocuni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yml@fd322edd34189e420db537a560a2ceb970e46341 -
Trigger Event:
release
-
Statement type:
File details
Details for the file claude_logging-0.3.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: claude_logging-0.3.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 28.5 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae40d2512ab2f9c9508e608afda2900ce7f85b7d5bbd2775cd8ffb30eabee9a2
|
|
| MD5 |
839e49d19d64bd6b108ea8b68b3644ef
|
|
| BLAKE2b-256 |
697e5089462e7fecc17d030e1c0fc59d407547c45b3e67c11526b4015d87fc74
|
Provenance
The following attestation bundles were made for claude_logging-0.3.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
build-and-publish.yml on antocuni/claude-logging
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_logging-0.3.1-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl -
Subject digest:
ae40d2512ab2f9c9508e608afda2900ce7f85b7d5bbd2775cd8ffb30eabee9a2 - Sigstore transparency entry: 180967523
- Sigstore integration time:
-
Permalink:
antocuni/claude-logging@fd322edd34189e420db537a560a2ceb970e46341 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/antocuni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-publish.yml@fd322edd34189e420db537a560a2ceb970e46341 -
Trigger Event:
release
-
Statement type: