@kitiumai/cyclic-dependency-fixer weekly downloads statistics
By kitiumai · npm · Webpack plugins
AI-powered tool to detect and fix circular dependencies in JavaScript/TypeScript projects. Features intelligent refactoring with Claude/GPT-4, codebase pattern learning, and context-aware fix recommendations
@kitiumai/cyclic-dependency-fixer has 67 recorded weekly downloads on npm, an increase of 67.5% over the past 30 days, ranking #2709 of 3,247 tracked listings.
About @kitiumai/cyclic-dependency-fixer
cyclic-dependency-fixer
🔄 Detect and automatically fix cyclic dependencies in JavaScript/TypeScript projects with AI-powered analysis
cyclic-dependency-fixer is a lightweight, powerful tool that not only detects circular dependencies but also provides intelligent auto-fix strategies powered by AI (Claude, GPT-4). Get context-aware recommendations, automated refactoring code, and actionable insights.
Table of Contents
- Features
- Installation
- Quick Start
- AI-Powered Features
- Usage
- Fix Strategies
- Output Example
- Architecture
- Testing
- Development
- Advanced Usage
- Contributing
- License
- Support
✨ Features
Core Features
- 🔍 Fast Detection - Uses Tarjan's algorithm for efficient cycle detection (O(V + E))
- 🛠️ Auto-Fix Strategies - Attempts to automatically fix cycles when safe
- 📝 Manual Fix Guidance - Provides clear, actionable steps when auto-fix isn't possible
- 🎯 Multiple Strategies - Dynamic imports, shared module extraction, and more
- 📊 Clear Output - User-friendly CLI with colored output
- 🔌 Extensible - Clean architecture allows custom fix strategies
- 💪 Type-Safe - Written in TypeScript with strict typing
- 🪶 Lightweight - Minimal dependencies, uses regex-based parsing
- 📄 Enterprise Reports - Export JSON or SARIF for CI/CD and audits
- 🛡️ Policy Guardrails - Enforce architectural boundaries before merging
- 🧭 Deterministic Graphs - TypeScript project-aware parsing with
tsconfigsupport and path resolution - 💾 Incremental Cache - Opt-in content-hash cache for stable CI timings and repeated runs
- 🛟 Degraded-but-useful Results - Partial outputs with warning surfacing when some files fail to parse
- 📈 Operational Insights - Metrics in CLI output (parser used, cache hits) for observability
🤖 AI-Powered Features (NEW!)
- Smart Strategy Selection - AI analyzes your code and recommends the best fix strategy
- Codebase Pattern Learning - Understands your architecture and coding patterns
- Intelligent Refactoring - Generates production-ready refactoring code
- Root Cause Analysis - Explains WHY circular dependencies exist
- Context-Aware Suggestions - Recommendations tailored to your codebase
- Multiple AI Providers - Support for Claude (Anthropic) and GPT-4 (OpenAI)
🚀 Installation
npm install -g cyclic-dependency-fixer
Or use locally in your project:
npm install --save-dev cyclic-dependency-fixer
⚡ Quick Start
Basic Usage (No AI)
# Detect circular dependencies
cycfix detect
# Attempt to fix them automatically
cycfix fix --dry-run # Preview changes
cycfix fix # Apply fixes
With AI-Powered Analysis
# Set up your API key (one-time)
export ANTHROPIC_API_KEY=sk-ant-xxx # or OPENAI_API_KEY
# Run with AI-powered recommendations
cycfix fix --ai --generate-code
# Get detailed AI explanations
cycfix fix --ai --explain --generate-code
Deterministic & scalable analysis
# Honor tsconfig paths/references for stable graphs
cycfix detect --tsconfig tsconfig.json
# Use incremental cache (content-hash) for faster CI reruns
cycfix detect --cache --cache-dir .cycfix-cache
# Guardrail safety in huge monorepos
cycfix detect --max-files 5000 --max-depth 40
🤖 AI-Powered Features
Why Use AI?
Traditional static analysis can detect cycles but struggles with context. AI understands:
- Semantic relationships between modules
- Your codebase's architecture (layered, hexagonal, clean architecture, etc.)
- Common patterns you use (dependency injection, factory pattern, etc.)
- Why cycles exist (shared types, bidirectional relationships, etc.)
Setup
-
Get an API Key (choose one):
- Claude (Anthropic): https://console.anthropic.com/
- GPT-4 (OpenAI): https://platform.openai.com/api-keys
-
Set Environment Variable:
# For Claude (recommended) export ANTHROPIC_API_KEY=sk-ant-xxx # Or for GPT-4 export OPENAI_API_KEY=sk-xxx -
Or use CLI flag:
cycfix fix --ai --ai-key sk-ant-xxx
AI Features
1. Smart Strategy Selection
AI analyzes your code and recommends the best fix strategy:
cycfix fix --ai
Output:
🤖 Analyzing codebase patterns with AI...
Architecture: Clean Architecture (Layered)
Patterns found: 3
🤖 Getting AI recommendation for cycle abc123...
Recommended: extract-shared (85% confidence)
Reasoning: Both UserService and OrderService depend on shared types.
Creating a shared types module maintains your layered architecture.
2. Intelligent Code Generation
Get production-ready refactoring code:
cycfix fix --ai --generate-code
Output:
📝 Manual steps to fix:…
Description from the npm listing.
- circular-dependency
- cyclic-dependency
- circular-dependencies
- cyclic-dependencies
- dependency-cycle
- import-cycle
- module-cycle
- dependency-analysis
- dependency-checker
- dependency-detector
- dependency-validator
- code-quality
- code-quality-tools
- refactoring
- refactoring-tools
- auto-refactor
- typescript
- typescript-tools
- javascript
- javascript-tools
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Webpack plugins plugins
All 20 @kitiumai/cyclic-dependency-fixer alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@kitiumai/cyclic-dependency-fixer. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.