Repository navigation
chore: consolidate dev tasks behind just - #1238
Conversation
just becomes the single task entry point for the repo, so expose its binary in the pinned development shell.
Introduce a root justfile plus per-package justfiles (apps/ccusage, docs, rust) imported as just modules, following the arto layout. Root recipes aggregate the modules (build, typecheck) or own whole-repo nix jobs (fmt, check, schema) and release. pnpm policy inside just: call dev-shell tools directly (cargo, tsgo, nix), use `pnpm exec` for package-scoped node binaries (vitest, vitepress, wrangler), and delegate `pnpm run build` only where npm prepack and Cloudflare invoke that script by name.
Call `cargo set-version` directly with operation.state.newVersion instead of shelling out to the `sync:rust-version` pnpm script via the $npm_package_version env var. This removes a layer of indirection and lets the root package.json drop the script entirely.
Remove scripts that are redundant or superseded: - root: keep only preinstall; build/typecheck/test/lint/format/release moved to just, sync:rust-version inlined into bump.config.ts - apps/ccusage: drop format/lint (treefmt + flake check own these), the test cluster (run via just), prerelease (folded into the release recipe), and the unused stage:native-package wrapper (CI calls the script directly) - docs: drop format/lint plus typecheck/preview/deploy (just calls the tools directly); keep build/dev since wrangler invokes pnpm run build
Replace the direct pnpm script invocations with the just recipes (`just typecheck`, `just test`, `just test-vitest`), which now own the fan-out and run inside the dev shell.
Update AGENTS.md, CONTRIBUTING, the package READMEs, the installation guide, and the repo-local skills to use `just fmt|typecheck|test` and the `just <module>::<recipe>` form instead of the removed pnpm scripts.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR migrates the repository's task orchestration from npm/pnpm scripts to ChangesJust Task Orchestration Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ccusage-guide | bad2e8d | Commit Preview URL Branch Preview URL |
Jun 08 2026, 11:25 PM |
Feed git's own tracked file list into the post-bump checkout instead of a shell glob. `git ls-files '*package.json'` enumerates only version-managed package.json files, so node_modules copies can never be matched, and the shell no longer decides what the glob expands to.
ccusage
@ccusage/ccusage-darwin-arm64
@ccusage/ccusage-darwin-x64
@ccusage/ccusage-linux-arm64
@ccusage/ccusage-linux-x64
@ccusage/ccusage-win32-arm64
@ccusage/ccusage-win32-x64
commit: |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the PR package against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |
ccusage performance comparisonPR SHA: This compares the Rust PR release binary against the configured base package on the same CI runner. Package runner startupExecution setup measures any pre-benchmark package materialization used by the execution benchmark. Bunx temp cache measures one
Cached bunx execution performanceRuns the same large fixture through Fixtures: Claude
Package runtime diagnosticsCompares the PR package wrapper, the installed native optional dependency binary, and the workspace release binary on the same large fixture. This identifies whether slow package results come from JavaScript wrapper overhead, the published native binary build, or the Rust core itself. Fixtures: Claude
Committed fixture performanceCommitted small fixtures for stable PR-to-PR feedback and explicit Claude/Codex command coverage. Fixtures: Claude
Large real-world-shaped fixture performanceGenerated fixtures shaped from aggregate local log statistics: thousands of JSONL files, many small sessions, and a long tail of larger sessions. No real prompts, paths, or outputs are stored in the fixtures. Fixtures: Claude
Artifact size
Lower medians and smaller artifacts are better. CI runner noise still applies; use same-run ratios as directional PR feedback, not release guarantees. |

Summary
Make
justthe single entry point for development and release tasks, withper-package justfiles (arto-style modules) aggregated at the root. The pnpm
workspace and the Nix flake stay as the execution backends;
justonly routesto them. This removes redundant/duplicated package.json scripts and the
implicit npm
pre/postrelease lifecycle in favour of an explicit recipe.What changed
justfilewithmod ccusage/docs/rust, plusapps/ccusage/justfile,docs/justfile,rust/justfile. Root recipesaggregate modules (
build,typecheck), own whole-repo Nix jobs (fmt,check,schema), andrelease.just testruns Rust + Vitest via the[parallel]attribute.cargo,tsgo,nix); package-scoped node binaries usepnpm exec(vitest,vitepress,wrangler);pnpm run buildis delegated only where npmprepackand Cloudflare invoke that script by name.preinstall.apps/ccusageanddocsdrop scripts that are redundant (format/lint, owned by treefmt +flake check) or superseded by just (test cluster,
prerelease,typecheck/preview/deploy, unusedstage:native-packagewrapper).docs build/devare kept becausewrangler.jsonccallspnpm run build.bump.config.tsnow syncs the Rust workspace version fromoperation.state.newVersioninstead of thesync:rust-versionscript +$npm_package_version, so that script could be removed.lint-check/testjobs calljust typecheck/just test/just test-vitest(insidenix develop) instead of pnpm scripts;justis added to the dev shell.
guide, and the repo-local skills now reference
just.Testing
just typecheck(tsgo across both packages) — passjust test(parallel: cargo workspace + Vitest) — passjust fmt(treefmt, 0 changes),oxlint .,oxfmt --check— cleanjust --dry-run release— expands to typecheck → build → bumpp → checkoutSummary by cubic
Make
justthe single entry point for dev and release tasks. This removes redundantpackage.jsonscripts, standardizes CI, and simplifies the release flow.Refactors
justfileand per-package modules forapps/ccusage,docs, andrust; root aggregatesbuild/typecheck, ownsfmt/check/schema, andrelease.just testusing[parallel](Rust +Vitest);just test-vitestruns JS tests only.cargo,tsgo,nix); usepnpm execfor Node CLIs; delegatepnpm run buildonly where tools require it.apps/ccusage, anddocs; kept docsbuild/devas they are invoked by name.bump.config.tscallscargo set-versionwithoperation.state.newVersion; after bump, restore only trackedpackage.jsonfiles viagit checkout -- $(git ls-files '*package.json')to avoid touchingnode_modules.nix develop --command just typecheck|test|test-vitest;justis included in the dev shell.Migration
just fmt,just typecheck,just test,just build,just check, andjust releaseinstead ofpnpmscripts.just docs::dev,just docs::build,just ccusage::build,just rust::test.nix developsojustand tools are on PATH; runjust --listto see all recipes.Written for commit bad2e8d. Summary will update on new commits.
Summary by CodeRabbit
New Features
justtask runner as the unified entry point for development workflows.Documentation
justcommands (e.g.,just fmt,just test,just typecheck) instead of pnpm scripts.Refactor
justrecipes across root, docs, and apps modules.just.