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

@hasoftware/devradar

v1.1.0

Published

A CLI tool to analyze code projects: count lines of code, detect programming languages, and identify frameworks in use.

Downloads

314

Readme


What is DevRadar?

DevRadar is a command-line tool that scans any project directory and produces a detailed breakdown of:

  • Lines of code -- total, code-only, comments, and blanks
  • Programming languages -- detected from file extensions
  • Frameworks and libraries -- parsed from manifest files (package.json, requirements.txt, go.mod, Cargo.toml, and more)
  • Build tools, package managers, and databases -- identified from config files and dependencies

It is designed to be read-only: DevRadar never creates, modifies, or deletes any file in the project being analyzed.


Features

| Category | Details | |---|---| | Line Counting | Total lines, pure code (comments and blanks excluded), per-file breakdown | | Language Detection | 60+ languages via file extension mapping | | Framework Detection | Node.js, Python, Java, Go, Rust, PHP, Ruby, .NET, Dart/Flutter | | Monorepo Support | Detect and analyze npm/yarn/pnpm/Lerna workspaces separately | | Compare Mode | Diff current results against a previous JSON report | | Remote Analysis | Analyze any public Git repository by URL | | Interactive Mode | Guided terminal prompts -- no flags to memorize | | Visual Charts | ASCII bar chart for language distribution | | Multiple Engines | Auto-selects tokei, cloc, or built-in counter | | Export Formats | Terminal, JSON, CSV | | Config File | Project-level defaults via .devradarrc.json | | Sortable Output | Sort tables by name, lines, code, or file count |


Installation

From npm (recommended):

npm install -g @hasoftware/devradar

From source:

git clone https://github.com/hasoftware/DevRadar.git
cd DevRadar
npm install
npm install -g .

After installation, the devradar command is available system-wide.


Quick Start

# Analyze the current directory
devradar

# Analyze a specific path
devradar /path/to/project

# Pure code only (exclude comments and blank lines)
devradar . --pure-code

# Per-file breakdown
devradar . --advanced

# Analyze a remote GitHub repository
devradar https://github.com/expressjs/express

# Interactive mode -- let DevRadar guide you
devradar --interactive

Options Reference

| Flag | Short | Description | |---|---|---| | --pure-code | -p | Exclude comments and blank lines from totals | | --advanced | -a | Include per-file statistics | | --tech-only | | Only show language and framework detection | | --output <file> | -o | Write report to a file | | --format <fmt> | -f | Output format: terminal, json, csv | | --exclude <pattern> | | Additional exclude pattern (repeatable) | | --sort <field> | -s | Sort tables: name, lines, code, files | | --monorepo | | Detect and analyze workspaces separately | | --compare <file> | | Diff against a previous JSON report | | --interactive | -i | Launch guided interactive mode | | --tokei | | Force the tokei engine | | --cloc | | Force the cloc engine | | --builtin | | Force the built-in engine | | --version | -v | Show version | | --help | -h | Show help |


Example Output

DevRadar Analysis
Project: /home/dev/my-app
Scanned: 2026-05-27T08:30:00Z
Engine:  tokei

Technologies
Frameworks       : Express, React
Package managers : npm
Build tools      : Vite
Databases        : PostgreSQL

Summary
Files:    142
Total:    8,432 lines
Code:     6,210
Comments: 1,022
Blank:    1,200

Language Distribution

  JavaScript  ██████████████████████████████   62.3%  (3,200 lines)
  TypeScript  ████████████░░░░░░░░░░░░░░░░░░   24.1%  (1,500 lines)
  CSS         ████░░░░░░░░░░░░░░░░░░░░░░░░░░    8.2%    (510 lines)
  HTML        ███░░░░░░░░░░░░░░░░░░░░░░░░░░░    5.4%    (335 lines)

By Language
┌────────────┬───────┬───────┬───────┬──────────┬───────┐
│ Language   │ Files │ Total │  Code │ Comments │ Blank │
├────────────┼───────┼───────┼───────┼──────────┼───────┤
│ JavaScript │    80 │ 4,500 │ 3,200 │      600 │   700 │
│ TypeScript │    32 │ 2,100 │ 1,500 │      280 │   320 │
│ CSS        │    18 │ 1,032 │   510 │       92 │   130 │
│ HTML       │    12 │   800 │   335 │       50 │    50 │
└────────────┴───────┴───────┴───────┴──────────┴───────┘

Line Counting Engines

DevRadar auto-selects the best available engine in this order:

| Priority | Engine | Description | |---|---|---| | 1 | tokei | Fast, Rust-based (recommended) | | 2 | cloc | Mature, Perl-based | | 3 | Built-in | Zero-dependency fallback |

You can force a specific engine with --tokei, --cloc, or --builtin. The active engine is always printed in the report header.


Compare Mode

Save a report as JSON, then compare it later to see what changed:

# Save baseline
devradar . -o baseline.json

# ... make changes to the project ...

# Compare
devradar . --compare baseline.json

Output shows deltas for files, lines, languages added/removed, and framework changes.


Monorepo Support

devradar . --monorepo

DevRadar detects workspaces from:

  • package.json workspaces (npm / yarn)
  • pnpm-workspace.yaml
  • lerna.json

Each workspace is analyzed separately with an aggregate summary at the end.


Config File

Place a .devradarrc.json in your project root to set default options:

{
  "pureCode": true,
  "sort": "code",
  "exclude": ["test/**", "docs/**"]
}

CLI flags always take precedence over config file values.


Supported Languages

JavaScript, TypeScript, Python, Java, C, C++, C#, Go, Rust, PHP, Ruby, Swift, Kotlin, Dart, Scala, Groovy, R, Julia, Lua, Perl, Shell, PowerShell, SQL, HTML, CSS, SCSS, Sass, Less, Vue, Svelte, Haskell, Elixir, Erlang, Clojure, F#, Nim, Zig, Crystal, Ada, TeX, and more (60+ total).

Supported Frameworks

| Ecosystem | Detected | |---|---| | Node.js | React, Vue, Angular, Next.js, Nuxt, Svelte, Express, NestJS, Fastify, Hono, Electron | | Python | Django, Flask, FastAPI, PyTorch, TensorFlow, scikit-learn | | Java | Spring Boot, Quarkus, Micronaut, Hibernate | | Go | Gin, Echo, Fiber, Chi, GORM | | Rust | Actix Web, Rocket, Axum, Tokio | | PHP | Laravel, Symfony, CodeIgniter | | Ruby | Rails, Sinatra | | .NET | ASP.NET Core, NuGet projects | | Dart | Flutter, Dart |


Environment Variables

| Variable | Description | |---|---| | DEVRADAR_DEBUG=1 | Print full stack trace on errors |


Contributing

Contributions are welcome via pull requests. By submitting code you agree that it may be redistributed under the HASOFTWARE Custom License.

  1. Fork the repository
  2. Create a feature branch
  3. Open a pull request with a clear description

Bug reports and feature requests can be filed as GitHub Issues.


License

DevRadar is released under the HASOFTWARE Custom License. See the LICENSE file for full terms.

Permitted: Personal use, lawful commercial use, contributions via pull requests, forking for learning and research.

Prohibited: Creating derivative products without permission, use in malware or illegal activities, redistribution under a different name without credit.


Contact

| Channel | Link | |---|---| | Telegram | @hasoftware | | GitHub | hasoftware/DevRadar | | npm | @hasoftware/devradar |