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 🙏

© 2025 – Pkg Stats / Ryan Hefner

manasx

v2.0.1

Published

Enterprise code governance and AI audit platform. Detects AI drift, enforces organizational standards, and audits AI-generated code with continuous monitoring.

Downloads

39

Readme

ManasX - Enterprise Code Governance & AI Integration Platform

Real-time code governance monitoring for modern development teams and AI-powered workflows

ManasX is an enterprise-grade code governance platform that continuously monitors your codebase for organizational compliance, detects AI-generated code, and provides real-time feedback to development teams and AI coding assistants.

npm version License: MIT


🚀 What Makes ManasX Different

Unlike traditional linters that focus on syntax, ManasX understands your organizational context and helps maintain consistency as your codebase evolves. It's designed for the AI era where code is generated by humans and AI assistants working together.

✨ Key Differentiators

  • 🧠 Pattern Learning: Automatically learns your codebase's established patterns
  • 🤖 AI Detection & Auditing: Identifies and applies special rules to AI-generated code
  • ⚡ Real-time Monitoring: Continuous governance monitoring, not just PR checks
  • 🔌 AI Tool Integration: Feeds organizational context to Cursor, Claude Code CLI, and other AI assistants
  • 📊 Enterprise Reporting: Organization-wide compliance dashboards and metrics

🏗️ Core Capabilities

🎯 Continuous Code Governance

# Start real-time monitoring
manasx watch src/
# → src/components/Button.js 2 critical, 1 high
# ● eval() usage is prohibited for security reasons :42
# ● Synchronous file operations block the event loop :18
  • Real-time violation detection as you code
  • Clean CLI interface - only shows what matters
  • Severity-based alerts: Critical, High, Medium, Low
  • Silent monitoring for clean files (zero noise)

🧠 Organizational Pattern Learning

# Learn your codebase patterns
manasx learn src/
# ✓ Analyzed 847 files, learned 23 patterns
# ✓ Naming conventions, import styles, architecture patterns detected
  • Automatic pattern detection from existing codebase
  • Naming convention learning (camelCase, kebab-case, etc.)
  • Import style analysis (relative vs absolute paths)
  • Architecture pattern recognition (component structure, file organization)

🤖 AI Code Detection & Auditing

# Detect AI-generated code
manasx ai-detect src/ai-component.js
# ◉ AI-generated code detected (87.3% confidence)
# ● Missing human review comment
# ● No unit tests for AI-generated code
  • AI pattern recognition (GPT, Claude, Copilot signatures)
  • Confidence scoring with detailed evidence
  • Special auditing rules for AI-generated code
  • Human review requirements for critical AI code

🏢 Enterprise Rule Engine

{
  "rules": {
    "security/require-company-fetch": {
      "severity": "high",
      "message": "Use companyFetch instead of raw fetch",
      "description": "All API calls must use the company fetch wrapper"
    },
    "security/no-eval": {
      "severity": "critical",
      "message": "eval() usage is prohibited",
      "autofix": false
    }
  }
}
  • Custom organizational rules beyond standard linting
  • Contextual enforcement (company-specific requirements)
  • Exception management with justification and expiry
  • Configurable severity levels and auto-fix options

📊 AI Tool Integration & Context Feeding

# MCP server for AI assistants
manasx mcp-server --port 3001
# ✓ Context server running - AI tools can now access organizational patterns
  • Model Context Protocol (MCP) server for AI tool integration
  • Real-time context feeding to Cursor, Claude Code CLI
  • Organizational knowledge sharing with AI assistants
  • Violation history and compliance insights for AI tools

📈 Enterprise Monitoring & Reporting

# Generate compliance dashboard
manasx status
# 📊 ManasX Governance Dashboard
# 📁 Files Monitored: 1,247
# 🚨 Active Violations: 23 (3 critical, 8 high, 12 medium)
# 🤖 AI Code Detected: 156 files (12.5%)
# ⏱️ Monitoring Uptime: 2d 14h 32m
  • Organization-wide metrics and compliance scoring
  • Daily violation reports with trend analysis
  • AI code usage tracking across teams
  • Team performance dashboards with actionable insights

🚀 Quick Start

Installation

# Install globally for CLI access
npm install -g manasx

# Get started quickly
manasx --help

🎯 One-Command Setup (Recommended)

# Complete guided setup - learns patterns, configures rules, validates setup
manasx init src/
# 📚 Step 1/4: Learning Codebase Patterns...
# ⚙️  Step 2/4: Configuring Organizational Rules...
# 🔍 Step 3/4: Validating Setup...
# 👀 Step 4/4: Ready for Continuous Monitoring!

Manual Setup (Advanced)

1. Learn Your Codebase

# Analyze existing code to learn organizational patterns
manasx learn src/
# ✓ Analyzed 847 files
# ✓ Learned naming conventions: camelCase variables, PascalCase files
# ✓ Import styles: relative paths with explicit extensions
# ✓ Architecture patterns: default exports, feature folders

2. Configure Rules

# Initialize organizational rule configuration
manasx rules init
# ✓ Created manasx-rules.json with enterprise security and performance rules

3. Start Comprehensive Monitoring

# Start real-time monitoring with all features
manasx watch src/
# 👀 Starting ManasX Continuous Monitoring
# 📁 Watching: src/
# 🔍 Monitoring for:
#    • Pattern drift detection
#    • Organizational rule violations  
#    • AI-generated code auditing
#    • Real-time AI tool integration
# ✅ Monitor started! File changes will be analyzed in real-time.

# Example output when violations detected:
# 📄 watch-test.js
#    ⚠️  3 violations found:
#       CRITICAL Line 6: [SECURITY] eval() usage is prohibited for security reasons
#       HIGH Line 10: [SECURITY] Direct innerHTML manipulation can lead to XSS vulnerabilities
#       HIGH Line 16: [PERFORMANCE] Avoid synchronous file operation: readFileSync

4. AI Tool Integration

# Start MCP server for AI coding assistants (Cursor, Claude Code CLI)
manasx mcp-server --port 3001
# ✓ MCP server running on port 3001
# ✓ AI tools can now access organizational context

🏗️ Enhanced Enterprise Workflow

🎯 Streamlined Setup (One-time)

# Single command does everything:
manasx init src/
# ✅ Learns your codebase patterns automatically
# ✅ Creates organizational rule configuration
# ✅ Validates complete setup
# ✅ Ready for continuous monitoring

🔄 Daily Development Workflow

# Start monitoring (all analyses enabled by default)
manasx watch src/
# Real-time analysis shows:
# 📊 Compliance scores
# 🤖 AI detection with confidence levels
# 💡 Actionable insights
# ⚠️ Violations categorized by severity
# ✨ Smart recommendations

Enhanced Features:

  • Centralized Logging: All output through unified logger system
  • Clean Interface: No duplicate messages, professional formatting
  • Setup Validation: Checks for missing configuration files
  • Comprehensive Analysis: Pattern drift + rule violations + AI detection simultaneously
  • Smart Recommendations: Context-aware suggestions for fixes

📊 Team Management & Reporting

# Comprehensive status dashboard
manasx status
# Organization-wide compliance metrics
# AI code usage tracking across teams
# Historical trend analysis

🔧 Advanced Commands

# Individual analysis commands
manasx compliance src/     # Full governance audit with enhanced reporting
manasx drift src/file.js   # Pattern drift analysis
manasx ai-detect src/      # AI-generated code detection

🔧 Complete Command Reference

🚀 Setup & Initialization

manasx init [directory]           # 🎯 Complete guided setup (RECOMMENDED)
  --skip-patterns                 # Skip pattern learning step
  --skip-rules                    # Skip rule configuration step
  --skip-validation              # Skip setup validation step
  --patterns-file <file>         # Custom patterns file name
  --rules-file <file>            # Custom rules file name

👀 Real-time Monitoring

manasx watch [directory]         # Start comprehensive continuous monitoring
  --patterns <file>              # Use custom patterns file
  --rules <file>                 # Use custom rules file
  --no-ai-detection             # Disable AI code detection
  --no-drift-detection          # Disable pattern drift detection  
  --no-rule-checking            # Disable organizational rule checking
  --no-mcp                      # Disable MCP server for AI integration
  --mcp-port <number>           # Custom MCP server port (default: 8765)

📚 Pattern Learning

manasx learn [directory]         # Learn organizational patterns from codebase
  --output <file>                # Save patterns to custom file
  --max-files <number>          # Limit files to analyze

🔍 Analysis Commands

manasx compliance [directory]    # Full governance audit with enhanced reporting
  --rules <file>                 # Use custom rules file
  --patterns <file>              # Use custom patterns file
  --format <format>              # Output format (console|json|html)

manasx drift <files...>          # Check pattern compliance for specific files
  --patterns <file>              # Use custom patterns file
  --threshold <number>           # Compliance threshold (0-1)

manasx ai-detect <files...>      # Detect AI-generated code patterns
  --threshold <number>           # Detection confidence threshold (0-1)

manasx ai-audit <files...>       # Audit AI-generated code against standards
  --patterns <file>              # Use learned patterns file
  --rules <file>                 # Use organizational rules file

⚙️ Configuration Management

manasx rules init               # Initialize organizational rule configuration
  --file <file>                 # Custom configuration file name

manasx rules validate           # Validate rule configuration
  --file <file>                 # Configuration file to validate

📊 Enterprise Monitoring

manasx status                   # Show monitoring status and activity dashboard
  --context-log <file>          # Custom context log file
  --format <format>             # Output format (console|json)

manasx mcp-server               # Start Model Context Protocol server for AI tools
  --port <number>               # Server port (default: 3001)
  --context-log <file>          # Context log file
  --patterns <file>             # Patterns file for AI context
  --rules <file>                # Rules file for AI context

🔧 Legacy Analysis

manasx perf <file>              # Performance analysis (legacy)
manasx debug <file>             # Best practices analysis (legacy)

📁 Enhanced Logging System

ManasX creates organized, readable logs in .manasx/:

.manasx/
├── context.log                    # Formatted events for AI tools
├── monitor-2025-08-20.log        # Daily monitoring summary
├── violations-2025-08-20.log     # Detailed violation reports
└── summary.log                   # Current monitoring statistics

Violation Report Example

====================================================================================================
VIOLATIONS REPORT - 2025-08-20T16:48:07.364Z
FILE: src/components/Button.js
TOTAL VIOLATIONS: 3
====================================================================================================

🔥 CRITICAL SEVERITY (1 issues):
--------------------------------------------------
1. eval() usage is prohibited for security reasons
   📍 Line 42, Column 8
   📋 Rule: security/no-eval (security)

🚨 HIGH SEVERITY (1 issues):
--------------------------------------------------
1. Synchronous readFileSync detected
   📍 Line 18, Column 12
   📋 Rule: performance/no-sync-fs (performance)

🤖 AI Tool Integration

Cursor Integration

ManasX automatically provides organizational context to Cursor through the MCP protocol:

# Start MCP server
manasx mcp-server --port 3001

# Cursor can now access:
# - Learned organizational patterns
# - Current violation status
# - Team coding standards
# - Historical compliance data

Claude Code CLI Integration

# Context is automatically available
# ManasX feeds real-time organizational knowledge to Claude

Available Context for AI Tools

  • Organizational Patterns: Naming conventions, architecture preferences
  • Active Violations: Current code quality issues
  • Compliance History: What violations occur frequently
  • Team Standards: Company-specific rules and requirements

📊 Example Terminal Output

Clean, Professional Interface

$ manasx watch src/

◦ Starting ManasX governance monitoring...
✓ Watching 1,247 files for governance violations

→ src/auth/login.js 1 critical
● eval() usage is prohibited for security reasons :23

→ src/utils/api.js 2 high, 1 medium  
● Synchronous readFileSync detected :45
● Direct innerHTML manipulation detected :67

→ src/components/Button.js AI 1 low
◉ AI-generated code detected (89.2% confidence)
● Missing human review comment

Key Features:

  • Silent for clean files - no noise for good code
  • Minimal output - only critical information
  • Color-coded severity - red for critical/high, yellow for medium, blue for low
  • AI detection - special handling for AI-generated code

🏢 Enterprise Benefits

For Development Teams

  • Consistent Code Quality: Automated enforcement of organizational standards
  • AI-Enhanced Productivity: AI assistants understand your team's patterns
  • Real-time Feedback: Catch issues immediately, not in PR reviews
  • Reduced Cognitive Load: Focus on business logic, not style consistency

For Engineering Management

  • Compliance Visibility: Organization-wide code quality metrics
  • AI Usage Tracking: Monitor and optimize AI tool adoption
  • Quality Trends: Track improvements over time
  • Team Performance: Data-driven insights into code quality

For Security Teams

  • Automated Security Compliance: Enforce security rules consistently
  • AI Code Auditing: Special scrutiny for AI-generated security code
  • Violation Tracking: Complete audit trail of security compliance
  • Policy Enforcement: Automatically enforce company security policies

🔒 Privacy & Security

  • Local Processing: Pattern learning and analysis happens locally
  • Secure API Usage: Optional GROQ API for advanced analysis only
  • No Code Storage: Your code is never stored externally
  • Enterprise Ready: Designed for security-conscious organizations

📈 Roadmap

  • 🔄 CI/CD Integration: GitHub Actions, GitLab CI integration
  • 📊 Advanced Analytics: ML-powered code quality predictions
  • 🌐 Team Dashboards: Web-based compliance dashboards
  • 🔌 More AI Tools: Expanded AI assistant integrations
  • 📱 Mobile Alerts: Real-time notifications for critical violations

🤝 Contributing

We welcome contributions! See our Contributing Guide for details.

Development Setup

git clone https://github.com/yourusername/manasx.git
cd manasx
npm install
npm run dev

📄 License

MIT License - see LICENSE file for details.


🆘 Support


Built for the AI era. Designed for enterprise scale. Optimized for developer happiness. 🚀