ship-score
v1.0.0
Published
CLI for SHIP Protocol - Score AI-generated code reliability
Downloads
118
Maintainers
Readme
SHIP Score
Score AI-generated code reliability from the command line.
Quick Start
# Score a repository
npx ship-score facebook/react
# With options
npx ship-score --repo vercel/next.js --language typescript --jsonInstallation
npm install -g ship-scoreUsage
CLI
# Basic usage
ship-score <owner/repo>
# With options
ship-score --repo microsoft/vscode --language typescript
ship-score facebook/react --json # JSON output
# CI/CD integration (exits with code 1 for high risk)
ship-score my-org/my-repo || echo "High risk detected!"Programmatic
import { scoreRepo, ScoreResult } from 'ship-score';
const result: ScoreResult = await scoreRepo('facebook/react');
console.log(result.grade); // 'B'
console.log(result.score); // 72
console.log(result.risk_level); // 'medium'
console.log(result.confidence); // 0.87Output
SHIP Score Report
Repository: facebook/react
Score: 72/100 (B)
Confidence: 87% (0.65-0.79)
Risk Level: MEDIUM
Sample Size: 101 commits analyzed
Recommendations:
- Consider additional code review for medium-risk commits
- Add comprehensive tests for AI-generated changes
Model: 2.2.0-liveCI/CD Integration
GitHub Actions
- name: SHIP Score Check
run: npx ship-score ${{ github.repository }}Pre-commit Hook
# .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: ship-score
name: SHIP Score
entry: npx ship-score
language: system
pass_filenames: falseAPI
The CLI uses the SHIP Protocol API at https://ship-protocol.dhruvaapi.workers.dev.
Learn More
License
MIT
