Nix flake for packaging ccusage CLI tool with embedded Node.js runtime.
nix run github:tnmt/ccusage-flakenix shell github:tnmt/ccusage-flake
ccusage --help{
inputs = {
ccusage.url = "github:tnmt/ccusage-flake";
};
}nix build
./result/bin/ccusage --helpnix runccusage is a CLI tool for tracking cloud costs and usage metrics. This flake packages ccusage with Node.js 22 runtime for reproducible deployments.
- Mechanism:
scripts/update-ccusage.shfetches the latest version and SRI hash from npm and updatesversion/url/sha256inflake.nix. - CI:
.github/workflows/update-ccusage.ymlruns weekly and, if changes exist, validates withnix buildand opens a PR.
# Requires jq and Nix
./scripts/update-ccusage.sh
nix build # validate the change- Change schedule: edit the
cronin.github/workflows/update-ccusage.yml. - Disable auto PRs: remove the workflow or comment out the
Create PRstep.