Skip to content

archpulse/codepulse-cli

Repository files navigation

🩺 CodePulse CLI

CodePulse Logo

🚀 Advanced Code Analysis with Surgical Precision

Architectural Intelligence • Semantic Analysis • Real-time Monitoring

Deep code structure analysis for large JavaScript/TypeScript and Python projects

CodePulse Health NPM Version License: MIT Node Version


🌍 Multi-Language Support

English | Українська | Русский | Čeština | 한국어 | Deutsch | Français


⚡ Quick Start

Installation

npm install -g @archpulse/codepulse

First Scan

# Analyze your project
codepulse scan .

# Watch mode with live dashboard
codepulse watch .

🏆 Competitive Advantage (Research Report by Mythos)

CodePulse is the only tool that seamlessly unifies AST static analysis, Git-based churn & coupling analytics, Time Machine for historical architectural tracking, Runtime Profiler correlation, and native MCP integration for AI-agent workflows. Unlike SonarQube, CodeClimate, or ESLint, CodePulse provides the unique combination of 'how it was, how it is, and what to do about it right now via AI'.

Feature Description
🏗️ Architectural Radar Define layers and catch boundary violations automatically
🧠 Semantic Duplication AST-based structural hashing finds identical logic, not just identical lines
🔄 Circular Dependency Breaker Automatically detect and break circular imports (A→B→A)
⚡ Real-time Watch Mode Interactive TUI dashboard that updates as you code
🎨 Beautiful CLI Enhanced with rich colors, ASCII art banners, and clear visualizations
🌐 7-Language Support Use --lang to switch between languages on the fly
📜 License Generator Generate 10+ types of open-source licenses instantly

📋 All Commands

Quick Reference

Command Description
codepulse scan [dir] Full analysis + HTML report + SARIF export
codepulse watch [dir] Interactive real-time TUI dashboard
codepulse plugins list List all available plugins with metadata
codepulse license <type> Generate LICENSE file (mit, apache, bsd, gpl, etc.)
codepulse stats [dir] Quick project statistics in console
codepulse explain [topic] Detailed explanation of specific issues

🏗️ Architecture Rules

Define your project structure and boundaries in .codepulse.json:

{
  "architecture": {
    "layers": [
      { 
        "name": "UI", 
        "pattern": "src/ui/.*", 
        "allowDependenciesFrom": ["Services", "Utils"] 
      },
      { 
        "name": "Services", 
        "pattern": "src/services/.*", 
        "allowDependenciesFrom": ["DB", "Utils"] 
      },
      { 
        "name": "DB", 
        "pattern": "src/db/.*", 
        "allowDependenciesFrom": ["Utils"] 
      }
    ],
    "strict": true
  }
}

🔌 Plugin System

Build custom analysis rules with CodePulse's powerful plugin system.

Creating a Plugin

Create a plugin in ~/.config/codepulse/plugins directory:

import { Rule, AnalysisContext, Issue } from '@archpulse/codepulse';

export default class MyAnalysisPlugin implements Rule {
  name = 'my-custom-plugin';
  description = 'My custom analysis plugin';
  version = '1.0.0';
  author = 'Your Name';
  category = 'code-quality';

  run(context: AnalysisContext): Issue[] {
    // Your analysis logic here
    return [];
  }
}

View Loaded Plugins

codepulse plugins list
codepulse plugins list --json

📚 Learn more about plugins →


📚 Documentation


📸 Visual Examples

See CodePulse in action:

HTML Report
HTML Report
Critical Nodes
Critical Dependencies
Complexity Analysis
Complexity Analysis
God Files
God File Detection
Code Duplication
Semantic Duplication
Vulnerabilities
Dependency Issues

🌐 Localization

Switch languages on the fly:

# French
codepulse --help --lang fr

# Ukrainian
codepulse scan . --lang ua

# German
codepulse watch . --lang de

Supported languages: English, Українська, Русский, Čeština, 한국어, Deutsch, Français


💡 Use Cases

🏢 Enterprise Applications

  • Enforce architectural boundaries across teams
  • Identify critical nodes that impact multiple services
  • Monitor code complexity trends

🎯 Performance Optimization

  • Find and refactor high-complexity functions
  • Detect and eliminate semantic code duplication
  • Analyze dependency chains for bottlenecks

🛡️ Code Quality

  • Continuous architecture monitoring in watch mode
  • Automatic license compliance checking
  • Plugin-based custom rules for your team's standards

📚 Team Collaboration

  • Generate visual architecture reports
  • Share SARIF reports with tools like GitHub Advanced Security
  • Multilingual support for international teams

📦 System Requirements

  • Node.js: 16.0.0 or higher
  • npm: 6.0.0 or higher (or yarn/pnpm)
  • OS: Linux, macOS, or Windows
  • RAM: 512MB minimum (1GB+ recommended for large projects)

🤝 Contributing

We love contributions! Whether it's bug reports, feature requests, or pull requests, your input helps make CodePulse better.

Getting Started

# Clone the repository
git clone https://github.com/archpulse/codepulse-cli.git
cd codepulse-cli

# Install dependencies
npm install

# Run tests
npm test

# Build
npm run build

# Try it locally
npm run dev -- scan .

📄 License

MIT License © 2024 ArchPulse

See LICENSE for details.


⭐ Love CodePulse? Give us a star on GitHub!

Made with ❤️ by archpulse

About

Lightweight architectural analyzer for JS/TS projects. Detect complexity, dead code, and structural decay — fully offline.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors