A full-stack static code analysis and integration mapping CLI tool
npm install codeweaver-cli



> A powerful full-stack static analysis and integration mapping CLI tool. CodeWeaver helps developers trace frontend-backend data flow, visualize architecture, validate TypeScript contracts, and generate integration docs effortlessly.
---
scan ā Analyze the full project structure and dependenciesmap ā Map frontend components to backend APIstrace ā Trace variables and data across the stackcontracts ā Validate frontend interfaces vs backend responsesvisualize ā Auto-generate architecture diagramssuggest ā Recommend refactors and API usage improvementsdocs ā Generate markdown-based integration documentation---
``bash`
npm install -g codeweaver-cli
`bash `
codeweaver scan --project . --analyze-dependencies
codeweaver map --frontend src --backend api
codeweaver trace --variable userId --across-stack
codeweaver contracts --frontend src --backend api
codeweaver visualize --format mermaid
codeweaver suggest
codeweaver docs --output API_DOC.md
bash$ codeweaver contracts --frontend src --backend api
š Analyzing contracts between src and api
š Backend responds with:
- id
- email
š» Frontend TS interfaces expect:
- id
- email
- username
ā Contract Mismatches:
ā ļø Frontend expects 'username' but backend does not return a matching key
`
š Folder Structure
`bashcodeweaver-cli/
āāā bin/ # CLI entrypoint (codeweaver.js)
āāā lib/ # Core logic modules
ā āāā scanner.js # Project scanner
ā āāā mapper.js # Frontend-backend mapper
ā āāā tracer.js # Variable tracer
ā āāā analyzer.js # Contracts analyzer
āāā utils/ # Shared utilities (AST, file reading, logger)
āāā test/ # Jest unit tests for each module
āāā examples/ # Sample frontend-backend projects (optional)
āāā README.md # This file
āāā .gitignore # Node modules, logs, envs
āāā package.json # NPM config
āāā CHANGELOG.md # Optional changelog
``Feature Command
- Scan project āā codeweaver scan --project .
- Map API links āā codeweaver map --frontend src --backend api
- Trace variables āā codeweaver trace --variable userId
- Check contracts āā codeweaver contracts
- Visualize graph āā codeweaver visualize
- Suggest optimiz āā codeweaver suggest
- Generate docs āā codeweaver docs --output API_DOC.md