Skip to content

Cost Estimation (--cost-estimate)

--cost-estimate adds a directional planning estimate to flaglint audit output. It is a planning guide — not a savings calculation, ROI projection, billing analysis, or LaunchDarkly contract cost estimate.

Terminal window
npx flaglint audit ./src --cost-estimate
Terminal window
npx flaglint audit ./src --cost-estimate --hourly-rate 125
✓ Audit complete: 13 flags — 3 high risk, 10 medium risk
Migration readiness: 50/100 · moderate
[█████████████░░░░░░░░░░░░] 50%
10 safely automatable · 10 require manual review
Estimated migration effort: 22.8h – 43.9h
Estimates are directional. See the report for assumptions.

The estimate is derived from the number of automatable and manual-review call sites detected in the scanned directory.

Phase: automation

automationLow = automatableCalls × 0.25
automationHigh = automationLow × 1.5

Phase: manual review

manualLow = manualReviewCalls × 1.5
manualHigh = manualLow × 2

Phase: validation

validationLow = (automationLow + manualLow) × 0.3
validationHigh = (automationHigh + manualHigh) × 0.3

Totals

Totals are computed from unrounded phase values, then rounded to one decimal place, then floored to a minimum of 4 hours for very small codebases:

totalLow = max(4, round1(automationLow + manualLow + validationLow))
totalHigh = max(4, round1(automationHigh + manualHigh + validationHigh))

Default assumptions

ParameterDefaultMeaning
automationHoursPerCall0.25Hours per automatable call site
manualReviewHoursPerCall1.5Hours per manual-review call site
validationMultiplier0.3Validation overhead as a fraction of automation + manual total
minimumHours4Floor applied to both low and high totals

These defaults are planning heuristics, not observed industry benchmarks.

Supplying --hourly-rate <number> adds costLow and costHigh fields to the top-level estimate object in JSON output. These fields are also included in markdown and HTML report output. --hourly-rate is valid only when --cost-estimate is also specified.

Terminal window
npx flaglint audit ./src --cost-estimate --hourly-rate 125

When no direct LaunchDarkly calls are detected, the estimate is null and no estimate line is printed. This matches the not-applicable readiness score state.

Estimates are directional planning guides based on call-site complexity. Actual effort depends on test coverage, team familiarity, and provider setup. FlagLint does not access runtime data or LaunchDarkly billing.