npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

plagiarism-detector-pro

v1.0.4

Published

Academic text-similarity, citation, writing-pattern, and coaching CLI and MCP server

Readme

⚡ Plagiarism Detector Pro

An open-source lexical-similarity scanner, writing-pattern heuristic, and student writing coach.

Available as an Interactive Web Dashboard, 100% Offline CLI, NPM Package, and Native Claude/Codex MCP Server.

CI npm version Live Demo Node.js Python Docker MCP Compatible License

🚀 Live Demo • 📦 NPM & Standalone CLI • 🤖 Claude & Codex MCP Setup • 🌐 Run Web Server • 🎓 Key Features • 📡 REST API


🌟 Why Plagiarism Detector Pro?

Most open-source plagiarism checkers rely on basic string searching or single-word keyword matching, causing massive false-positive keyword collisions (e.g. flagging common nouns like "diamonds", "seaborn", or "price").

Plagiarism Detector Pro finds contiguous lexical overlap in the sources it can retrieve and adds statistical writing-pattern diagnostics. It does not reproduce the private corpora or scoring methods used by Blackboard SafeAssign or Turnitin.

┌──────────────────────────────────────────────────────────────────────────────────┐
│                             PLAGIARISM DETECTOR PRO                              │
├─────────────────────────┬──────────────────────────────┬─────────────────────────┤
│   🌐 Web Application    │    📦 Standalone CLI & NPM   │   🤖 Claude & Codex MCP │
│  • Interactive split-UI │  • 100% offline local engine │  • Native JSON-RPC MCP  │
│  • Batch ZIP gradebook  │  • Zero server dependency    │  • 1-click citation bot │
│  • PDF / Cert export    │  • Fast terminal feedback    │  • Real-time coach tool │
└─────────────────────────┴──────────────────────────────┴─────────────────────────┘

📦 NPM Package & Standalone CLI (100% Offline)

The CLI and NPM package operate completely offline and standalone with built-in embedded benchmark corpora. Zero Python or web server required!

1. Installation

# Global installation
npm install -g plagiarism-detector-pro

# Or run instantly with npx (no install needed)
npx plagiarism-detector-pro --help

2. CLI Command Suite

# 🔍 1. Scan a document for text similarity and AI-pattern signals
plag scan thesis_draft.md
plag scan essay.docx --verbose   # Shows side-by-side matching passages
plag scan paper.tex --json       # Outputs machine-readable JSON

# 🧑‍🎓 2. Student Writing & Integrity Coach
# Scans unsupported empirical claims, formal vocabulary boosts, and thesis strength
plag coach manuscript.docx

# 🔬 3. PhD Research & Conference Double-Blind Pre-Flight Auditor
# Audits anonymity compliance, isolates LaTeX math, and profiles section cadence
plag audit neurips_paper.pdf

# ✍️ 4. Smart Academic Paraphraser & Attribution Helper
# Generates 3 academic restructuring options (Active Inversion, Methodological, Conceptual)
plag paraphrase "Deep neural networks learn rich representations from massive text corpora." --source "Vaswani2017"

# 📚 5. Instant DOI, arXiv & Scientific Citation Generator
# Resolves DOIs/arXiv IDs into copy-ready BibTeX, APA 7th, MLA 9th, and IEEE
plag cite 10.1038/s41586-020-2649-2
plag cite 1706.03762

# 🔤 6. Reference List Alphabetizer & Clean Formatter
# Auto-sorts unorganized bibliographies by primary author, validates years & DOIs
plag alphabetize unorganized_references.txt

# 📑 7. Draft-to-Draft Revision Comparator
# Evaluates revision percentage, newly added sections, and retained text between drafts
plag diff draft_v1.txt draft_v2.txt

# 📦 8. Class Gradebook Batch Processor
# Ingests an entire folder of student assignments and prints an aggregated gradebook table
plag batch ./student_submissions/

# 📜 9. Advisory Pre-Submission Analysis Summary
# Generates an unsigned advisory summary with a SHA-256 analysis reference
plag certificate essay.md --name "Jane Doe" --title "Deep Learning Study"

# 🤖 10. Start Model Context Protocol (MCP) Server for Claude & Codex
plag mcp

🤖 Claude Desktop, Claude Code & Codex MCP Integration

Plagiarism Detector Pro implements the Model Context Protocol (MCP), allowing Claude Desktop, Claude Code, OpenAI Codex, Antigravity, and Cursor to inspect lexical overlap, check citation syntax, and restructure text.

Claude Desktop Setup

Add this configuration to your Claude Desktop config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "plagiarism-detector-pro": {
      "command": "npx",
      "args": ["-y", "plagiarism-detector-pro", "mcp"]
    }
  }
}

Claude Code CLI Setup

claude mcp add plagiarism-detector-pro npx -y plagiarism-detector-pro mcp

Available MCP Tools for AI Assistants:

| Tool Name | Parameters | Purpose | | :--- | :--- | :--- | | plag_scan_text | text, exclude_quotes, exclude_bibliography | Measures lexical overlap and reports advisory writing-pattern diagnostics | | plag_scan_file | file_path, exclude_quotes, exclude_bibliography | Ingests .docx, .pdf, .tex, .ipynb, .md, or .txt from disk | | plag_academic_coach | text | Scans unsupported claims, tone booster formal synonyms, and thesis score | | plag_paraphrase | sentence, source_title | Restructures overlapping text into 3 scholarly formulations with attribution | | plag_generate_citation| query | Resolves DOI / arXiv / Paper Title to BibTeX, APA, MLA, and IEEE | | plag_alphabetize_references| references_text | Auto-sorts and validates reference lists alphabetically | | plag_compare_drafts | draft_v1, draft_v2 | Computes draft continuity %, added content %, and word delta |


🌐 Running as a Web Server

If you wish to host your own web platform instance with the interactive dashboard, PDF report generator, and class gradebook:

Option A: Docker Compose (Recommended)

# 1. Clone repository
git clone https://github.com/scalesynthai/Plagiarism-Detector-Pro.git
cd Plagiarism-Detector-Pro

# 2. Start container
docker compose up -d --build

Open http://localhost:5001 in your browser.

Option B: Local Python Setup

# 1. Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate   # On Windows: venv\Scripts\activate

# 2. Install dependencies
pip install -r requirements.txt

# 3. Launch development server
python app.py

Environment Configuration

Export these variables before running Python. Docker Compose reads a local .env; direct Python execution does not load that file automatically.

FLASK_ENV=production
SECRET_KEY=your-secure-random-secret-key
ADMIN_PIN=replace-with-a-long-random-secret # Required for corpus uploads and deletions
PORT=5001
MAX_CONTENT_LENGTH=33554432 # 32 MB request limit; each document is limited to 8 MB

🎓 Key Features & Capabilities

1. 🛡️ Student "Private Draft Shield"

  • Scans do not add submitted manuscripts to the local corpus. With web search enabled, search terms derived from the manuscript are sent to external providers. Set include_web to false for local-only checks. The private_draft flag does not disable web requests. This project does not provide access to proprietary Turnitin/SafeAssign databases or guarantee external submission outcomes.

2. 🧑‍🎓 Student Academic Writing & Integrity Coach

  • 🔍 Unsupported Claim Finder: Detects empirical and statistical assertions ("studies show", "85% of", "research demonstrates") lacking a parenthetical citation, with a 1-click (Author, Year) citation placeholder.
  • ✍️ Scholarly Tone Booster: Identifies conversational phrases ("a lot of", "basically", "big impact") and provides instant formal replacements (numerous, fundamentally, significant effect).
  • 🎯 Thesis Statement & Abstract Evaluator: Evaluates scientific completeness (Hypothesis, Methodology, Significance) with a /100 score and actionable recommendations.

3. 🔬 PhD Research & Conference Pre-Flight Auditor

  • 🔒 Double-Blind Anonymity Compliance: Detects self-identifying author references or unblinded repository links before conference submission (NeurIPS, ICML, ICLR, IEEE).
  • 📐 Mathematical & LaTeX Isolation: Isolates LaTeX equations ($...$, \begin{equation}) and code cells from false similarity flags.

4. ↔️ Interactive Side-by-Side Split Diff Comparison

  • Clicking any highlighted sentence opens a split-screen viewer comparing the student submission on the left with the verbatim original source on the right.

5. 🤖 Writing-Pattern Heuristic

  • Computes syntactic burstiness and lexical entropy as review signals. These scores do not identify authorship or prove AI use.

6. 📦 Whole-Class Batch Submissions Gradebook

  • Upload a .zip archive or multiple files to scan all submissions concurrently and produce an aggregated Instructor Gradebook Table.

📡 REST API Reference

| Method | Endpoint | Description | | :--- | :--- | :--- | | POST | /check | Scan text (query) or document (file) for lexical overlap and writing-pattern signals | | POST | /check/batch | Scan whole-class .zip archive or multiple files | | POST | /check/compare-drafts | Compare Draft v1 vs Draft v2 revision deltas | | POST | /api/paraphrase | Generate 3 academic restructurings for a sentence | | POST | /api/cite | Auto-generate BibTeX, APA, MLA, and IEEE citations | | POST | /api/student-coach/tone-and-claims | Scan unsupported claims and formal tone boosts | | POST | /api/student-coach/alphabetize-references | Alphabetize and validate reference list | | POST | /api/student-coach/evaluate-thesis | Evaluate opening abstract / thesis statement | | POST | /reports/certificate | Generate an unsigned advisory analysis summary | | GET | /sources | List institutional repository documents | | POST | /sources/upload | Add new document to institutional repository | | DELETE | /sources/<filename> | Delete document from institutional repository (Requires Admin PIN) | | GET | /docs | Interactive Swagger UI API playground |


🧪 Testing & Quality Assurance

Plagiarism Detector Pro includes comprehensive test suites across both Python and Node.js:

# Run Node.js & CLI test suite (12 tests)
npm test

# Run Python & Web test suite (28 tests)
pytest tests/ -v
# Or: ./venv/bin/python -m unittest discover tests -v

# Run all test suites
make test

⚖️ Institutional Academic Advisory & Disclaimer

[!IMPORTANT] Advisory & Formative Purpose: Similarity metrics, uncalibrated writing-pattern scores, thesis-structure scores, and writing-coach diagnostics are intended for pre-submission review and academic coaching. They do not establish plagiarism, authorship, or AI use.

Official academic integrity determinations, final course grades, and institutional submission clearances are governed exclusively by your university's specific Honor Code, academic policies, course syllabus, and faculty review. No automated scoring tool constitutes a final institutional endorsement.


🤝 Contributing & Security

Contributions are warmly welcomed! Please read our Contributing Guide and Code of Conduct before submitting pull requests.

If you discover a security vulnerability, please consult our Security Policy or report it privately to [email protected].


📄 License

This project is open-source software licensed under the MIT License.


Reliability and deployment notes

See HARDENING.md for verified fixes, supported limits, and remaining production work. Similarity and AI scores are heuristics, not proof of plagiarism or authorship. Certificates are advisory summaries of supplied scores and are not signed attestations.

Corpus uploads and deletions require X-Admin-PIN. Without a configured ADMIN_PIN, corpus mutations are disabled. Uploads reject empty or malformed documents and existing filenames; delete an existing source explicitly before replacing it. Configure both SECRET_KEY and ADMIN_PIN before starting Docker Compose.

Run python -m unittest discover tests -v and npm test before release. CI runs both language suites; automated deployment runs only after successful push CI.

Passage scoring and accuracy checks

The Python API and Node engine now use exact-word-spans-v1: four-word contiguous seeds (at least two non-function words) extend through identical neighboring words. Unique matched query words determine coverage; overlapping sources cannot inflate the overall score. Semantic paraphrases and very short fragments may be missed. A citation identifies attribution and does not automatically erase similarity.

exclude_quotes / Node excludeQuotes excludes only quoted word spans. exclude_bibliography / Node excludeBibliography excludes a standalone References/Bibliography section. Excluded words leave both numerator and denominator. Responses include the selected score, raw whole-document score, body-only score, bibliography and quotation scores, matched spans, and the eligible word count. Body-only means excluding the bibliography, not automatically removing the title page. Bibliography/quotation scores are within their own sections and do not sum to the overall score. Source percentages can overlap. Offsets reference normalized_text (Python Unicode code points; Node UTF-16 code units).

CLI JSON and human-readable scans accept --exclude-quotes and --exclude-bibliography. The browser provides both switches. Citation, thesis, and anonymity diagnostics are structural screening aids, not verification of sources, writing quality, or conference acceptance.

See benchmark documentation and machine-readable baseline. Run python benchmarks/run.py in the checkout to compare Python and Node against fixed labels without network requests.