feat: add --merge flag to combine JSON exports - #10
Open
pasrom wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
2 issues found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/cli/src/cli.ts">
<violation number="1" location="packages/cli/src/cli.ts:311">
P1: `--merge` is documented as single-flag variadic (`<files...>`), but `parseArgs` is configured in a way that rejects the second bare filename, causing documented usage to fail at parse time.</violation>
<violation number="2" location="packages/cli/src/cli.ts:356">
P2: Single-summary providers skip merge normalization/recomputation, causing inconsistent derived values versus providers that go through `mergeUsageSummaries`.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Allows merging slopmeter JSON exports from different computers into a single heatmap. Usage: slopmeter --merge machine-a.json --merge machine-b.json -o merged.png Also handles sparse JSON exports where daily entries only contain displayValue without full token breakdowns.
pasrom
force-pushed
the
feat/merge-json-exports
branch
from
March 12, 2026 06:40
53da926 to
17a996c
Compare
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
--mergeCLI flag to combine multiple JSON exports into a single heatmapdisplayValuewithout full token breakdownsUsage
Test plan
displayValue, no token fields) without errors--mergewith--dark,--format, and--outputflagsSummary by cubic
Adds a new
--mergeflag to theslopmeterCLI to combine multiple JSON exports from different machines into one output. Merges per provider into a single heatmap or a merged JSON export.--merge <files...>reads JSON exports, groups by provider, and merges daily totals across files (sparse entries supported; missing token fields default to 0).--dark,-f/--format, and-o/--output.Written for commit 17a996c. Summary will update on new commits.