feat(claude-trace): add --no-html flag to skip HTML generation#49
Open
JonKrone wants to merge 3 commits intobadlogic:mainfrom
Open
feat(claude-trace): add --no-html flag to skip HTML generation#49JonKrone wants to merge 3 commits intobadlogic:mainfrom
JonKrone wants to merge 3 commits intobadlogic:mainfrom
Conversation
Add --no-html CLI flag to disable HTML report generation while preserving JSONL logging. This is useful for reducing file size when archiving conversations or when HTML viewing is not needed. Implementation: - Add --no-html flag parsing in cli.ts - Wire flag through CLAUDE_TRACE_GENERATE_HTML env var - Read env var in interceptor.ts constructor to set enableRealTimeHTML - Update help text and output messages Follows existing --no-open pattern for consistency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--no-htmlCLI flag to disable HTML report generation while preserving JSONL logging. This is useful for reducing file size when archiving conversations or when HTML viewing is not needed.Use Case
When using claude-trace for conversation archival over extended periods, HTML files consume ~60% more storage than JSONL files. For users who primarily need the raw data (JSONL) and rarely view the HTML reports, this flag enables significant storage savings.
Storage Impact Example:
--no-html): 4.2 GB total (58% reduction)Implementation
Follows the existing
--no-htmlpattern established by the--no-openflag:CLI flag parsing (
cli.ts)--no-htmlflag detectiontrue(generate HTML) for backwards compatibilityCLAUDE_TRACE_GENERATE_HTMLenvironment variableInterceptor config (
interceptor.ts)enableRealTimeHTMLconfig based on flagChanges
apps/claude-trace/src/cli.ts: Add flag parsing and help textapps/claude-trace/src/interceptor.ts: Read env var and conditionally generate HTMLDiff stats: 2 files changed, 16 insertions(+), 3 deletions(-)
Testing
--no-open)Example Usage
Documentation
Help text updated to include:
Output message updated to show: