New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@context-action/deps-cli

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@context-action/deps-cli

Enhanced dependency analysis CLI tool with 99%+ accuracy - AST-based TypeScript/JavaScript dependency analyzer

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

deps-cli v2.0.0

License: MIT TypeScript AST-based Accuracy

Enhanced Dependency Analysis CLI tool with 99%+ accuracy

AST 기반 고정밀도 의존성 분석으로 TypeScript/JavaScript 프로젝트의 복잡한 의존성 관계를 정확하게 파악하는 현대적 CLI 도구입니다.

✨ 핵심 특징

🎯 99%+ 정확도

  • AST 기반 분석: 정규식 대신 Abstract Syntax Tree 사용
  • TypeScript 완벽 지원: .js import → .ts 파일 매칭
  • False positive 제거: 실제 사용되지 않는 파일만 정확히 탐지

극강의 성능

  • 0.4초: 30+ 파일 프로젝트 전체 분석
  • 메모리 캐싱: 동일 세션 내 중복 파싱 제거
  • 확장성: 대규모 프로젝트도 빠른 처리

🔧 5가지 핵심 분석

  • 전체 분석: 프로젝트 의존성 그래프 구축
  • 파일 사용처: 특정 파일을 import하는 모든 파일 찾기
  • 메서드 사용처: 특정 메서드를 호출하는 모든 위치 찾기
  • 미사용 파일: 어디서도 import되지 않는 파일 탐지
  • 미사용 메서드: 어디서도 호출되지 않는 메서드 탐지

🚀 빠른 시작

설치

# 프로젝트 클론
git clone <repository-url>
cd deps-cli

# 의존성 설치 및 빌드
npm install
npm run build

기본 사용법

# 전체 프로젝트 분석
node dist/bin.js analyze-enhanced .

# 미사용 파일 찾기
node dist/bin.js find-unused-files-enhanced

# 특정 파일 사용처 찾기
node dist/bin.js find-usages-enhanced src/utils/helper.ts

# 미사용 메서드 찾기
node dist/bin.js find-unused-methods-enhanced

# 메서드 사용처 찾기
node dist/bin.js find-method-usages-enhanced UserService addUser

📋 명령어 완전 가이드

명령어용도실행 시간정확도
analyze-enhanced전체 의존성 분석~0.4초99%+
find-usages-enhanced파일 사용처 찾기~0.4초100%
find-method-usages-enhanced메서드 사용처 찾기~0.4초99%+
find-unused-files-enhanced미사용 파일 탐지~0.4초100%
find-unused-methods-enhanced미사용 메서드 탐지~0.4초99%+

고급 옵션

# JSON 형식 출력
node dist/bin.js analyze-enhanced . --format json

# 상세 출력
node dist/bin.js find-unused-files-enhanced --verbose

# 모든 옵션
node dist/bin.js <command> --help

📊 성능 비교

항목Legacy SystemEnhanced System개선율
정확도87%99%++12%
파일 탐지부정확100% 정확완전 해결
분석 속도40ms+즉시그래프 기반
아키텍처정규식AST 기반현대적

자세한 성능 분석은 성능 비교 문서를 참조하세요.

🏗️ 아키텍처

Enhanced Dependency Analysis System
├── AST Parser          # TypeScript/JavaScript 구문 분석
├── Export Extractor    # Export 정보 정확 추출
├── Dependency Graph    # 파일 간 의존성 관계 구축
├── Entry Point Detector # 엔트리 포인트 자동 식별
└── Analysis Engine     # 5가지 분석 기능 제공

핵심 구성 요소

  • EnhancedDependencyAnalyzer: 메인 분석 엔진
  • AST-based Parsing: 정확한 구문 분석
  • Absolute Path Resolution: 경로 해석 오류 방지
  • Memory Caching: 동일 파일 재파싱 방지

📚 문서

🧪 테스트

# 전체 테스트 실행
npm test

# Enhanced CLI 테스트만 실행
npm test enhanced-cli

# 테스트 커버리지
npm run test:coverage

테스트 결과: 30/30 통과 (100% 성공률)

🔧 개발

프로젝트 구조

src/
├── bin.ts                           # CLI 엔트리 포인트
├── analyzers/
│   └── EnhancedDependencyAnalyzer.ts # 메인 분석 엔진
├── config/                          # 설정 관리
├── adapters/                        # 환경 어댑터
└── types/                           # 타입 정의

빌드 & 개발

# 개발 모드
npm run dev

# 빌드
npm run build

# 린트
npm run lint

# 타입 체크
npm run type-check

🚀 마이그레이션 가이드

Legacy → Enhanced 시스템

Legacy 명령어Enhanced 명령어개선사항
analyzeanalyze-enhancedAST 기반, 99%+ 정확도
find-usagesfind-usages-enhancedTypeScript 완벽 지원
find-unused-filesfind-unused-files-enhancedFalse positive 제거
find-unused-methodsfind-unused-methods-enhanced정밀한 메서드 분석
check-exports(통합됨)Enhanced 명령어에 포함

Legacy 명령어는 v2.0.0에서 완전히 제거되었습니다.

🤝 기여

  • Fork the repository
  • Create feature branch (git checkout -b feature/amazing-feature)
  • Commit changes (git commit -m 'Add amazing feature')
  • Push to branch (git push origin feature/amazing-feature)
  • Open Pull Request

📄 라이선스

MIT License - 자세한 내용은 LICENSE 파일을 참조하세요.

🔗 관련 링크

deps-cli v2.0.0 - AST 기반 99%+ 정확도 의존성 분석 시스템 🚀

Keywords

dependency

FAQs

Package last updated on 26 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts