Sprinno
Home
Documentation

CLI Reference

The complete guide to @sprinno/scan — the open-source code quality scanner that produces a standardized quality score for any codebase.

Installation

No installation required — run directly with npx:

Terminal
npx @sprinno/scan

Or install globally:

Terminal
npm install -g @sprinno/scan
Terminal
sprinno

Quick Start

Navigate to any project directory and run the scanner. On first run, you’ll be asked a few context questions (funding stage, sector, team size) that take about 30 seconds. These are used to benchmark you against similar companies.

Terminal
cd /path/to/your/project
Terminal
npx @sprinno/scan

The scan typically completes in 10–30 seconds and outputs:

  • A terminal report with scores and findings
  • A .sprinno.json machine-readable quality manifest

Commands

scan(default)

Run a full quality scan on the current directory. Since scan is the default command, you can omit it entirely:

Run a scan
npx @sprinno/scan

Add any flags directly after the command:

With flags
npx @sprinno/scan --ci --fail-below 60 --card

setup

Re-run the onboarding wizard. Use this to change your stage, sector, or team size context after initial setup.

Usage
npx @sprinno/scan setup

connect

Displays instructions on how to link your CLI to Sprinno Cloud. Once connected, your scans unlock additional capabilities that require a larger calibration dataset:

  • LCS-calibrated scores — more accurate than the hand-tuned CLI weights
  • Cohort percentiles — “65th among seed-stage fintech peers”
  • Trend tracking — see your score over time
  • Badge eligibility — earn quality badges for your README
Usage
npx @sprinno/scan connect

This prints a URL to sign up or log in. Authentication is handled via the Sprinno web dashboard, not the CLI.

Flags Reference

All flags are used with the scan command (or the default command).

--jsonboolean

Output only the .sprinno.json file (suppress the terminal table report). Useful for piping to other tools or CI artifacts.

npx @sprinno/scan --json
--cardboolean

Export a shareable SVG score card image (.sprinno-score.svg). The image can be embedded in READMEs, shared on social media, or included in presentations.

npx @sprinno/scan --card
--ciboolean

Enable CI mode. The scanner will exit with code 1 if the overall score falls below the threshold (set with --fail-below). Reads context from environment variables instead of interactive prompts.

npx @sprinno/scan --ci --fail-below 60
--fail-below <score>numberdefault: 60

Set the minimum acceptable overall score (0-100). Used with --ci. If the scan produces a score below this threshold, the process exits with code 1.

npx @sprinno/scan --ci --fail-below 70
--stage <stage>string

Override the company stage for this scan. Valid values: pre-seed, seed, series-a, series-b-plus, oss, enterprise. This affects which scoring expectations apply.

npx @sprinno/scan --stage series-a
--format <format>stringdefault: terminal

Set the output format. Options: terminal (colored table), json (raw JSON to stdout), sarif (Static Analysis Results Interchange Format for IDE integrations).

npx @sprinno/scan --format json
--version-Vboolean

Print the CLI version number and exit.

npx @sprinno/scan --version
--help-hboolean

Display the help message with all available commands and flags.

npx @sprinno/scan --help

Output Files

.sprinno.json

Generated on every scan. A machine-readable quality manifest that AI tools, CI pipelines, and dashboards can consume.

.sprinno.json
{
  "$schema": "https://schema.sprinno.com/quality/v1",
  "version": 1,
  "overall": 67.4,
  "pillars": {
    "codeHealth": { "score": 72.8 },
    "processMaturity": { "score": 61.3 },
    "architecture": { "score": 68.0 },
    "resilience": { "score": 54.9 },
    "documentation": { "score": 70.1 }
  },
  "context": {
    "stage": "seed",
    "sector": "fintech",
    "teamSize": "small"
  }
}

.sprinno-score.svg

Generated when using --card. A shareable SVG score card image that can be embedded in your README, shared on social media, or included in presentations.

README.md
# Embed in your README:
![Sprinno Quality Score](.sprinno-score.svg)

Configuration

Configuration is stored in ~/.sprinnorc (created during first-run setup). You can also set configuration via environment variables for CI/CD.

Configuration File

~/.sprinnorc
{
  "termsAccepted": true,
  "context": {
    "stage": "seed",
    "sector": "fintech",
    "teamSize": "small"
  },
  "reporting": true
}

Environment Variables

Override context in CI without interactive setup:

SPRINNO_STAGECompany stage (pre-seed, seed, series-a, series-b-plus, oss, enterprise)
SPRINNO_SECTORIndustry sector (fintech, healthtech, saas, devtools, ecommerce, edtech, etc.)
SPRINNO_TEAM_SIZETeam size category (solo, small, medium, large)
SPRINNO_TOKENSprinno Cloud auth token (for connected accounts)

Disabling Telemetry

Set reporting: false in your .sprinnorc to opt out of anonymous score reporting. Scanning continues to work fully offline.

CI/CD Integration

GitHub Actions

.github/workflows/quality.yml
name: Quality Gate
on: [push, pull_request]

jobs:
  quality:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - run: npx @sprinno/scan --ci --fail-below 60
        env:
          SPRINNO_STAGE: seed
          SPRINNO_SECTOR: fintech
          SPRINNO_TEAM_SIZE: small

GitHub Action (Marketplace)

.github/workflows/quality.yml
- uses: sprinno/scan-action@v1
  with:
    fail-below: 60
    stage: seed
    sector: fintech
    team-size: small

GitLab CI

.gitlab-ci.yml
quality-gate:
  image: node:20
  script:
    - npx @sprinno/scan --ci --fail-below 60
  variables:
    SPRINNO_STAGE: seed
    SPRINNO_SECTOR: fintech
    SPRINNO_TEAM_SIZE: small

CI Mode Behavior

When using --ci, the scanner:

  • Exits with code 0 if score ≥ threshold (pass)
  • Exits with code 1 if score < threshold (fail)
  • Reads context from environment variables (no interactive prompts)
  • Still generates .sprinno.json for downstream consumption

What Gets Scanned

The scanner assesses your codebase across five engineering pillars. Each pillar contains multiple sub-metrics that are weighted by their empirical discrimination power (via Latent Capability Scoring).

01

Code Health

Fundamental quality of the source code itself — security, testing, and complexity.

Secrets detectionCVE scanningCrypto hygieneInput validationTest coverageTest-to-code ratioCyclomatic complexityDuplication rateLarge files
02

Process Maturity

How disciplined and automated the development workflow is.

CI/CD presencePipeline depthPre-commit hooksLinter configCode review signalsBranch protectionIssue templatesCommit frequency
03

Architecture

Structural quality of the system design and dependency management.

Dependency countLock file presenceIaC maturityDocker/K8sTerraformEngine version pinningSeparation of concerns
04

Resilience

How well the system handles failure and is prepared for production incidents.

Health check endpointsGraceful shutdownMonitoring integrationAlerting configError handling patternsRetry logicCircuit breakers
05

Documentation

Quality and completeness of documentation for developers and contributors.

README presence & depthCONTRIBUTING.mdCHANGELOGAPI documentationArchitecture docsOnboarding guideInline doc ratio

Score Interpretation

Score
Rating
Meaning
80–100
Excellent
Top-tier engineering. Production-ready, well-maintained, strong processes.
65–79
Good
Solid foundation. Minor gaps in process or documentation, but fundamentally healthy.
50–64
Fair
Average. Functional but with notable gaps in testing, process, or architecture.
35–49
Needs Work
Below average. Significant gaps that increase technical risk for investors or team scaling.
0–34
Critical
Major concerns. Fundamental engineering practices are missing or broken.

Telemetry & Privacy

By default, Sprinno sends anonymous quality scores (numeric only) to improve the LCS calibration model for everyone. Source code is never sent.

What’s Sent
  • • Numeric scores (0-100)
  • • Language & framework IDs
  • • Boolean pattern flags
  • • Repo shape (file count, LOC)
  • • Stage/sector context
Never Sent
  • • Source code (zero bytes)
  • • File paths or names
  • • Commit messages
  • • Developer names/emails
  • • Repo name or org identity

Opt-out: Set "reporting": false in ~/.sprinnorc. Full details in our Terms and Privacy Policy.

Troubleshooting

"Permission denied" when running npx

Try running with sudo (Linux/Mac) or ensure your npm global directory has the correct permissions. Alternatively, install locally: npm install @sprinno/scan && npx sprinno

Scan takes longer than expected

Large monorepos (>100K files) may take longer. The scanner uses glob patterns to find relevant files. Ensure node_modules, .git, and build directories are properly gitignored.

Low score but code feels good

The scanner measures observable signals — if your tests aren't in a standard test/ directory, or your CI config uses an uncommon format, some scanners may not detect them. Run with --json to see which sub-metrics scored low.

"Cannot find module" error

Clear your npx cache: npx --yes @sprinno/scan. If using a global install, ensure you're on Node 18+.

Want to re-run setup

Run npx @sprinno/scan setup to change your stage, sector, or team size. Or delete ~/.sprinnorc to start fresh.