Skip to content

ludo-technologies/jscan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

93 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

jscan

A code quality analyzer for JavaScript/TypeScript vibe coders.

Building with Cursor, Claude, or ChatGPT? jscan performs structural analysis to keep your codebase maintainable.

CI npm Downloads Go License

Working with Python? Check out pyscn

Quick Start

# Run analysis without installation
npx jscan analyze src/

Demo

jscan-demo.mp4

Features

One command scores your whole codebase (0-100 with an A-F grade) and generates an HTML report that shows what to fix first.

jscan looks at your code from five angles:

  • 🧹 Dead code - unreachable code, unused imports/exports, and orphan files you can safely delete
  • πŸ“‹ Duplicate code - copy-pasted and structurally similar code worth merging (Type 1-4 clone detection)
  • πŸŒ€ Complexity - functions that are hard to read and test (cyclomatic complexity)
  • πŸ—οΈ Dependencies - circular imports and unstable module dependencies (Martin metrics, DOT graph export)
  • 🧩 Class design - classes that depend on too much (CBO coupling)

Parallel execution β€’ Built with Go + tree-sitter

AI Agent Integration

jscan ships Agent Skills that teach AI coding agents when and how to run each analysis: health checks, refactoring, architecture review, and CI-friendly reports.

Agent Skills (Recommended)

uvx add-skills ludo-technologies/jscan

This installs the Skills into your project. They work with Claude Code, Cursor, Codex, Gemini CLI, and many other agents (add --agent cursor etc. to target one, --global for all projects).

Then just ask your agent:

  1. "Analyze the code quality of the src/ directory"

  2. "Find duplicate code and help me refactor it"

  3. "Show me complex code and help me simplify it"

Claude Code Plugin (Optional)

claude plugin marketplace add ludo-technologies/jscan
claude plugin install jscan@jscan-marketplace

The plugin installs the same Agent Skills through Claude Code's plugin system.

Installation

# Install globally with npm (recommended)
npm install -g jscan
Alternative installation methods

Build from source

git clone https://github.com/ludo-technologies/jscan.git
cd jscan
go build -o jscan ./cmd/jscan

Go install

go install github.com/ludo-technologies/jscan/cmd/jscan@latest

Common Commands

jscan analyze

Run comprehensive analysis with HTML report

jscan analyze src/                              # All analyses with HTML report
jscan analyze --format json src/                # Generate JSON report
jscan analyze --select complexity src/          # Only complexity analysis
jscan analyze --select deadcode src/            # Only dead code analysis
jscan analyze --select complexity,deadcode,clone src/  # Multiple analyses

jscan check

Fast CI-friendly quality gate

jscan check src/                         # Quick pass/fail check

jscan init

Create configuration file

jscan init                               # Generate jscan.config.json

jscan deps

Dependency visualization

jscan deps src/ --format dot | dot -Tsvg -o deps.svg

πŸ’‘ Run jscan --help or jscan <command> --help for complete options

Configuration

Create a jscan.config.json or .jscanrc.json in your project root:

{
  "complexity": {
    "low_threshold": 10,
    "medium_threshold": 20,
    "enabled": true
  },
  "dead_code": {
    "enabled": true,
    "min_severity": "warning"
  },
  "output": {
    "format": "text",
    "show_details": true
  }
}

βš™οΈ Run jscan init to generate a configuration file with core options

Roadmap

  • TypeScript-specific analysis features (type-aware dead code, generic complexity)
  • Vue / JSX single-file component support
  • IDE / editor integrations
  • Watch mode for continuous analysis

Documentation

πŸ“š Development Guide β€’ Architecture β€’ Testing β€’ Contributing

Enterprise Support

For commercial support, custom integrations, or consulting services, contact us at contact@ludo-tech.org

License

MIT License β€” see LICENSE


Built with ❀️ using Go and tree-sitter

About

A Code Quality Analyzer for JavaScript/TypeScript

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

10 stars

Watchers

1 watching

Forks

Contributors

Languages