Skip to content

JSON Output

Pass --json to any scan command to get a structured report on stdout. This is the primary integration point for CI pipelines, custom dashboards, and third-party tools.

bash
sickbay --path . --json > report.json

Report Structure

SickbayReport

The top-level object returned by a single-project scan.

FieldTypeDescription
overallScorenumberWeighted health score from 0 to 100
checksCheckResult[]Results for every check that ran
summaryobjectIssue counts: { critical, warnings, info }
projectInfoProjectInfoDetected project metadata
projectPathstringAbsolute path to the analyzed project
timestampstringISO 8601 timestamp of the scan
quoteQuote?Optional personality quote based on overall health

ProjectInfo

Metadata about the scanned project, detected automatically.

FieldTypeDescription
namestringPackage name from package.json
versionstringPackage version
hasTypeScriptbooleanWhether TypeScript is configured
hasESLintbooleanWhether ESLint is configured
hasPrettierbooleanWhether Prettier is configured
frameworkstringDetected framework: react, next, vite, cra, express, fastify, koa, hapi, hono, node, or unknown
packageManagerstringnpm, pnpm, yarn, or bun
totalDependenciesnumberCombined count of dependencies and devDependencies
dependenciesobjectProduction dependencies (name to version)
devDependenciesobjectDevelopment dependencies (name to version)
overridesobject?Dependency overrides, if any

CheckResult

One entry per health check that was executed.

FieldTypeDescription
idstringUnique check identifier (e.g. knip, npm-audit)
namestringHuman-readable check name
categorystringOne of: dependencies, performance, code-quality, security, git
scorenumberCheck score from 0 to 100
statusstringpass, warning, fail, or skipped
issuesIssue[]Problems found by this check
toolsUsedstring[]Underlying tools that powered this check
durationnumberExecution time in milliseconds
metadataobject?Check-specific extra data

Issue

An individual problem found during a check.

FieldTypeDescription
messagestringHuman-readable description of the problem
severitystringcritical, warning, or info
filestring?File path where the issue was found, if applicable
reportedBystring[]Names of the tools that flagged this issue
fixFixSuggestion?Suggested fix, if available

FixSuggestion

An optional remediation hint attached to an issue.

FieldTypeDescription
descriptionstringWhat the fix does
commandstring?Shell command to apply the fix
modifiesSourceboolean?Whether the fix changes source files
nextStepsstring?Follow-up instructions after applying
codeChangeobject?Before/after code snippet: { before, after }

MonorepoReport

Returned instead of SickbayReport when scanning a monorepo root.

FieldTypeDescription
isMonorepotrueAlways true — use this to distinguish from a single-project report
rootPathstringAbsolute path to the monorepo root
monorepoTypestringpnpm, npm, yarn, turbo, nx, or lerna
packageManagerstringnpm, pnpm, yarn, or bun
packagesPackageReport[]Per-package scan results
overallScorenumberAggregate score across all packages
summaryobjectCombined issue counts: { critical, warnings, info }
timestampstringISO 8601 timestamp
quoteQuote?Optional personality quote

PackageReport

One entry per workspace package in a monorepo scan.

FieldTypeDescription
namestringPackage name
pathstringAbsolute path to the package
relativePathstringPath relative to the monorepo root
frameworkstringDetected framework
runtimestringbrowser, node, edge, or unknown
checksCheckResult[]Check results for this package
scorenumberPackage health score
summaryobjectIssue counts: { critical, warnings, info }
dependenciesobjectProduction dependencies
devDependenciesobjectDevelopment dependencies

Example Report

A truncated example showing the overall structure:

json
{
  "timestamp": "2026-03-29T14:30:00.000Z",
  "projectPath": "/home/user/my-app",
  "projectInfo": {
    "name": "my-app",
    "version": "1.0.0",
    "hasTypeScript": true,
    "hasESLint": true,
    "hasPrettier": false,
    "framework": "react",
    "packageManager": "pnpm",
    "totalDependencies": 42,
    "dependencies": { "react": "^19.0.0", "react-dom": "^19.0.0" },
    "devDependencies": { "typescript": "^5.7.0", "vite": "^6.0.0" }
  },
  "overallScore": 74,
  "summary": {
    "critical": 1,
    "warnings": 5,
    "info": 12
  },
  "checks": [
    {
      "id": "npm-audit",
      "name": "Security Audit",
      "category": "security",
      "score": 55,
      "status": "fail",
      "issues": [
        {
          "severity": "critical",
          "message": "lodash@4.17.20 has a prototype pollution vulnerability (CVE-2021-23337)",
          "file": "package-lock.json",
          "reportedBy": ["npm-audit"],
          "fix": {
            "description": "Update lodash to 4.17.21 or later",
            "command": "pnpm update lodash",
            "modifiesSource": false
          }
        }
      ],
      "toolsUsed": ["npm audit"],
      "duration": 2340,
      "metadata": { "totalVulnerabilities": 3 }
    },
    {
      "id": "knip",
      "name": "Unused Dependencies",
      "category": "dependencies",
      "score": 85,
      "status": "warning",
      "issues": [
        {
          "severity": "warning",
          "message": "Unused dependency: moment",
          "reportedBy": ["knip"],
          "fix": {
            "description": "Remove moment from dependencies",
            "command": "pnpm remove moment"
          }
        }
      ],
      "toolsUsed": ["knip"],
      "duration": 1820
    }
  ],
  "quote": {
    "text": "Your code has a mild fever. Nothing some refactoring won't cure.",
    "source": "Dr. Sickbay",
    "severity": "warning"
  }
}

Distinguishing Report Types

When parsing JSON output, check for the isMonorepo field to determine which shape you're working with:

bash
IS_MONO=$(jq '.isMonorepo // false' report.json)

if [ "$IS_MONO" = "true" ]; then
  echo "Monorepo with $(jq '.packages | length' report.json) packages"
  jq -r '.packages[] | "\(.name): \(.score)"' report.json
else
  echo "Single project score: $(jq '.overallScore' report.json)"
fi

Released under the MIT License.