How kumarasakti/passgen works
passgen is a Go CLI for generating configurable passwords, transforming words into password variations, and checking password strength. The principal flow is a user command through the CLI handler and application service, then domain generation and analysis, with results formatted for terminal display. The README also documents presets, batch generation, no-repeat generation, and strength suggestions. Application and several domain implementations were not sampled, so links into those subsystems are limited to calls visible in the CLI and documented behavior.
Main entry points: handler.go Command handler · password_service.go Password service · password_analyzer.go Password analyzer · main.go CLI entry
Components 15
CLI
- CLI entry
main.go - Command handler
internal/infrastructure/cli/handler.go - Result formatter
internal/infrastructure/cli/formatter.go
Application
- Password service
internal/application/password_service.go
Password generation
- Password config
internal/domain/entities/password.go - Character sets
internal/domain/entities/charset.go - Password generator
internal/domain/services/password_generator.go - Word generator
internal/domain/services/word_password_generator.go - Word transformations
internal/domain/entities/word_pattern.go
Password analysis
- Password analyzer
internal/domain/services/password_analyzer.go - Strength checker
internal/domain/services/password_strength_checker.go - Pattern detector
internal/domain/entities/pattern_detector.go
Other components
- User
- Terminal output
- Crypto randomness
Connections 12
- User → CLI entry: runs command
- CLI entry → Command handler: creates handler
- Command handler → Password service: requests generation
- Command handler → Password service: requests word generation
- Command handler → Password service: requests strength check
- Command handler → Result formatter: formats results
- Result formatter → Terminal output: prints output
- Password config → Character sets: configures categories
- Password generator → Crypto randomness: draws random values
- Word generator → Word transformations: transforms word
- Password analyzer → Strength checker: checks strength
- Password analyzer → Pattern detector: detects patterns