How cipherx2433/bugbundle works
bugbundle is a local-first Node.js diagnostics CLI. Its principal workflow loads project configuration, collects selected system/runtime/dependency facts, sanitizes and validates the bundle, builds a Markdown preview, requires explicit review for collection, and safely exports only after approval; inspect stops at preview. The graph preserves the documented collector, configuration, security, review, and export stages. Relationships involving unsampled implementations are shown only where the CLI excerpt or README supports them.
Main entry points: program.ts Command interface · pipeline.ts Security pipeline · index.ts CLI entrypoint · init.ts Initialize config
Components 22
CLI workflow
- Command interface
src/cli/program.ts - CLI entrypoint
src/cli/index.ts
Configuration
- Initialize config
src/config/init.ts - Load config
src/config/loader.ts - Validate config
src/config/schema.ts - Select collectors
src/config/selection.ts
Diagnostics collection
- Diagnostic orchestration
src/core/orchestrator.ts - System collector
src/collectors/system.ts - Runtime detection
src/collectors/runtimes.ts - Dependency inspection
src/collectors/dependencies.ts
Security and privacy
- Collection path guard
src/security/path-guard.ts - Security pipeline
src/security/pipeline.ts - Secret scanner
src/security/scanner.ts - Secret redactor
src/security/redactor.ts - Path sanitizer
src/security/path-sanitizer.ts - Privacy validator
src/security/privacy-validator.ts
Report and approval
- Markdown report
src/report/markdown-builder.ts - Review gate
src/review/review-gate.ts - Safe report export
src/export/report-exporter.ts
Other components
- CLI user
- Project files
- Host and runtimes
Connections 21
- CLI user → CLI entrypoint: runs commands
README.md - CLI entrypoint → Command interface: creates program
src/cli/index.ts - Command interface → Initialize config: initializes config
src/cli/program.ts - Command interface → Load config: loads config
src/cli/program.ts - Command interface → Select collectors: resolves selection
src/cli/program.ts - Load config → Validate config: validates config
src/config/loader.ts - Initialize config → Validate config: uses schema
src/config/init.ts - Command interface → Diagnostic orchestration: runs collection
src/cli/program.ts - Command interface → Collection path guard: guards paths
src/cli/program.ts - System collector → Host and runtimes: reads system facts
README.md - Runtime detection → Host and runtimes: checks runtimes
README.md - Dependency inspection → Project files: inspects manifests
README.md - Command interface → Security pipeline: sanitizes bundle
src/cli/program.ts - Security pipeline → Secret scanner: scans secrets
src/security/pipeline.ts - Security pipeline → Secret redactor: redacts secrets
src/security/pipeline.ts - Security pipeline → Path sanitizer: sanitizes paths
src/security/pipeline.ts - Security pipeline → Privacy validator: validates privacy
src/security/pipeline.ts - Command interface → Markdown report: builds Markdown
src/cli/program.ts - Command interface → Review gate: requests approval
src/cli/program.ts - Review gate → CLI user: shows preview
README.md - Command interface → Safe report export: exports approved report
src/cli/program.ts