kora-d-explorer
v0.2.5
Published
Fast interactive CLI tool and library to scan codebase metrics, tech stack, dependencies, LOC, code smells, and technical debt
Maintainers
Readme
⚡ kora-d-explorer
Fast codebase intelligence, architecture radar, and quality gate in your terminal. Scan LOC, dependencies, circular imports, dead code, test coverage density, licenses, code smells, and technical debt in milliseconds.
npx kora-d-explorerZero configuration required. Drop into any repository and run it.
🚀 Quick Start
1. Instant Run (Zero Install)
npx kora-d-explorer2. Global Install
npm install -g kora-d-explorer
# Launch interactive terminal explorer
kora
# Scan a specific directory
kora /path/to/project🌟 Key Features
- ⚡ Blazing Fast & Ultra-Lightweight: Instant scanning across thousands of files (<50KB download size).
- 🔄 Deep Architecture Radar: Detect circular dependency loops (
/cycles) and unimported orphaned modules (/deadcode). - 🧪 Test Suite Radar: Calculate Test-to-Code ratio (%) and highlight untested source modules (
/tests). - 📜 License Risk Scanner: Audit open-source dependencies and copyleft compliance risk (
/licenses). - 🌲 Codebase Visual Tree Explorer: Interactive hierarchical directory tree with rolled-up LOC badges and issue indicators (
/tree). - 🎯 Code Quality Gate: SonarQube-style rating grades (
A–E) for Security, Reliability, Maintainability, and Duplication with developer remediation time estimates. - 🔍 Instant Issue Inspection & AI Prompts:
/inspect <ID>contextual source viewer and/fix <ID>copy-paste AI refactoring prompt generator. - 🖱️ Mouse & Keyboard Navigation: Smooth mouse wheel/trackpad scrolling alongside keyboard navigation with 0% Cumulative Layout Shift (CLS).
- 📊 Visual Dark-Mode HTML Report: Standalone dashboard with interactive Chart.js graphs, collapsible tree tab, and editor integration (
vscode://file/...). - 📝 Clickable Markdown Exports: Formatted reports with clickable file anchors for documentation and CI pull requests.
⌨️ Interactive Slash Commands
When launched in your terminal, Kora provides a modern interactive visual REPL with live auto-completion and mouse/keyboard navigation:
🏛️ Architecture & Health Radar
| Command | Description |
| :--- | :--- |
| /cycles | Detect circular dependency chains & architecture import loops |
| /deadcode | Scan orphaned files unreferenced anywhere in the project graph |
| /tests | Test suite radar, Test-to-Code ratio (%), & untested source modules |
| /licenses | Audit dependency licenses and copyleft compliance risks |
| /tree [dir] | Hierarchical directory tree visualizer with LOC rollup & issue counts |
| /tree --issues | Directory tree filtered exclusively to files containing code smells |
🎯 Quality Gate & Code Smells
| Command | Description |
| :--- | :--- |
| /overview | High-level summary card, quality ratings, LOC & repository vitals |
| /quality | Full technical debt breakdown & prioritized code smells table |
| /inspect <ID> | Expandable code drawer with line context & remediation steps |
| /fix <ID> | Generate ready-to-copy AI refactoring prompt for Claude, Cursor, ChatGPT |
| /dups | Duplication radar identifying copy-pasted blocks and line ranges |
📊 Metrics & Dependencies
| Command | Description |
| :--- | :--- |
| /loc | Lines of code matrix (code, comments, blanks) across 40+ languages |
| /stack | Detected frameworks, runtimes, UI libraries, & database layers |
| /deps | Multi-ecosystem packages (npm, pip, cargo, go, composer, maven) |
| /files | Top largest source files sorted by LOC density and disk footprint |
| /git | Branch info, latest commits, authors & total contributors |
⚙️ Utilities & Navigation
| Command | Description |
| :--- | :--- |
| /open | Generate and open the interactive visual HTML report in your browser |
| /export <fmt> | Export full report to html, markdown, or json |
| /rescan | Hot-rescan the codebase on the fly after editing code |
| /cd <path> | Switch target repository directory |
| /help | Display all available commands and keyboard shortcuts |
| /exit | Exit Kora explorer |
💡 Natural Keyword Search: Type any search term directly into the prompt (e.g.,
auth,react,docker,TODO) to query across issues, files, dependencies, and tech stack simultaneously.
📊 Interactive HTML Report & Charts
Generate a standalone dark-mode dashboard with tabbed navigation and interactive Chart.js graphs:
# Export and automatically launch in default browser
kora -f html -o report.html --openOr type /open directly inside the interactive terminal REPL.
🛠️ CLI Options & Flags
# Print one-shot terminal summary (ideal for CI / headless environments)
kora --static
# Export report directly to Markdown or JSON
kora -f markdown -o report.md
kora -f json > report.json
# Scan a subpath with custom exclusions
kora ./src --ignore "fixtures/**" "dist/**"
# Verbose breakdown
kora -v| Flag | Short | Description | Default |
| :--- | :--- | :--- | :--- |
| --interactive | -i | Run in interactive visual mode | auto (in TTY) |
| --static | -s | Print one-shot terminal report | false |
| --format <type>| -f | Output format: text, json, markdown, html | text |
| --output <path>| -o | Save scan report to specified file path | stdout |
| --open | | Automatically open generated HTML report in browser | false |
| --verbose | -v | Show full language breakdown and dependency details | false |
| --ignore <glob>| -p | Additional glob patterns to ignore | [] |
💻 Programmatic Node / TypeScript API
Kora can be imported as a library in your own Node.js or TypeScript tools:
npm install kora-d-explorerimport {
scanCodebase,
renderHtmlReport,
renderMarkdownReport,
buildMarkdownTree,
} from 'kora-d-explorer';
// 1. Scan codebase
const result = await scanCodebase('./my-project');
console.log(`Quality Gate: ${result.qualityGate.status}`);
console.log(`Technical Debt: ${result.qualityGate.technicalDebt.formattedDebt}`);
console.log(`Total Code LOC: ${result.loc.totalCode.toLocaleString()}`);
if (result.cycles) {
console.log(`Circular Loops: ${result.cycles.totalCycles}`);
}
// 2. Generate self-contained reports
const htmlReport = renderHtmlReport(result);
const mdReport = renderMarkdownReport(result);📜 Changelog
See CHANGELOG.md for full release history and notes.
📄 License
MIT © Shahbaaz
