🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@buzzr/dfs-cli

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buzzr/dfs-cli

Command-line wrapper around @buzzr/dfs-engine — grade a DFS entry from JSON fixtures without writing code.

latest
Source
npmnpm
Version
5.0.1
Version published
Maintainers
2
Created
Source

@buzzr/dfs-cli

npm version npm downloads CI types license

Grade a DFS pick'em entry from two JSON files — no code required. This is a command-line wrapper around @buzzr/dfs-engine, with bounded inputs, effective-dated compatibility tables, policy metadata, and a full audit trail.

The operator-named built-ins are independent estimates: PrizePicks is experimental and partially verified; Underdog is experimental and unverified. Displayed entry terms are authoritative. Treat output as an audit aid, inspect policyStatus, policyVerification, payoutTable, confidence, sourceRefs, and explanationCodes, and confirm DNP, reboot, tie, rescue, void, and correction rulings with the operator.

30-second quick start

npm install -g @buzzr/dfs-cli

Create entry.json (the slip you want to grade):

{
  "entryId": "entry-001",
  "bookId": "prizepicks",
  "playTypeId": "power",
  "stake": 10,
  "displayedMultiplier": 3,
  "legs": [
    {
      "legId": "leg-1",
      "playerName": "Jayson Tatum",
      "playerId": "athlete-a",
      "league": "NBA",
      "propType": "Points",
      "line": 26.5,
      "direction": "over",
      "actual": null,
      "status": "pending",
      "gameDate": "2026-05-07T00:00:00.000Z"
    }
  ]
}

And gamelogs.json (what the players actually did, keyed by legId):

{
  "leg-1": [
    {
      "date": "2026-05-07T00:00:00.000Z",
      "minutes": "38:00",
      "points": "31",
      "rebounds": "8",
      "assists": "5",
      "steals": "1",
      "blocks": "0",
      "turnovers": "2",
      "threeP": "4"
    }
  ]
}

Then grade it:

dfs-grade entry.json --gamelogs gamelogs.json

The full DfsSettlementResult prints to stdout as JSON — status, payout split, per-leg decisions with provider provenance, a validation report, and an audit trail:

{
  "entryId": "entry-001",
  "bookId": "prizepicks",
  "status": "won",
  "effectiveMultiplier": 3,
  "payout": { "total": 30, "withdrawable": 30, "bonus": 0 },
  "legs": [{ "legId": "leg-1", "status": "won", "actual": 31, "...": "..." }],
  "auditTrail": [{ "code": "settlement.won", "...": "..." }]
}

Exit code is 0 on success and 1 on any error (bad JSON, invalid entry, unknown book policy), so it drops straight into shell scripts and CI pipelines.

Programmatic API

The same grading path is exported as plain async functions:

import { runGrade, runGradeFromFiles } from '@buzzr/dfs-cli';

// From in-memory objects
const result = await runGrade({
  entry, // DfsEntryInput
  gameLogsByLegId: { 'leg-1': [gameLogRow] },
});

// Or straight from files
const fromFiles = await runGradeFromFiles({
  entryPath: './entry.json',
  gameLogsPath: './gamelogs.json',
});
ExportPurpose
dfs-grade (bin)Grade an entry JSON against a gamelogs JSON, print settlement
runGrade()Grade an in-memory DfsEntryInput against a legId → gamelog[] map
runGradeFromFiles()Same, reading both inputs from file paths

When to use this vs siblings

You want to…Reach for
Grade entries from the shell, CI, or a cron jobthis package
Grade entries inside a TypeScript/JavaScript app@buzzr/dfs-engine
Render results in a UI@buzzr/dfs-react
Build fixtures for your own tests@buzzr/dfs-testkit
Replay versioned engine regression cases@buzzr/dfs-engine-test-vectors

Compatibility and support

Node.js >= 22 is supported. Use the dfs-grade executable for the command line. Import the supported API from @buzzr/dfs-cli. Deep src/* and dist/* imports are unsupported.

Report vulnerabilities privately through SECURITY.md. The versioning and support policy defines the supported runtime and SemVer contract.

License

MIT

Keywords

dfs

FAQs

Package last updated on 16 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts