Skip to content

Tags: awoodbeck/xkcdpw

Tags

v1.0.1

Toggle v1.0.1's commit message

Verified

This commit was signed with the committer’s verified signature.
awoodbeck Adam Woodbeck
refactor: simplify CLI by removing subcommands

Remove acrostic and random subcommands in favor of a unified
interface that accepts optional WORD and NUMBER arguments.

This simplification makes the tool more intuitive and faster to use
by reducing typing and eliminating the need to choose between
subcommands. The behavior is now based on argument detection:
- No args: random 4-letter word, 10 passphrases
- Number only: random 4-letter word, N passphrases
- Word only: use word, 10 passphrases
- Word and number: use word, N passphrases

Implementation changes:
- Consolidated all command logic into cmd/root.go
- Removed cmd/acrostic.go and cmd/random.go
- Extracted parseArgs() and buildOptions() to reduce complexity
- Switched to crypto/rand for cryptographically secure randomness
- Limited random word generator to common letters for reliability

Breaking changes:
- Command syntax changed from subcommands to direct arguments
- Old: xkcdpw acrostic test 5
- New: xkcdpw test 5
- Old: xkcdpw random 4 5
- New: xkcdpw 5

Benefits:
- Simpler, more intuitive interface
- Fewer keystrokes required
- Better security with crypto/rand
- Reduced code complexity
- Updated README with new examples

v1.0.0

Toggle v1.0.0's commit message

Verified

This commit was signed with the committer’s verified signature.
awoodbeck Adam Woodbeck
refactor: modernize codebase with go modules and cobra

Replace vendored dependencies with Go modules for better dependency
management and reproducible builds. Migrate from mow.cli to cobra for
improved CLI functionality and maintainability.

Updated acrostic package to v1.0.1, which provides new options for
customizing passphrase generation including capitalization modes,
number injection, and custom separators.

Reorganized project structure by moving command implementations into
a dedicated cmd package, following Go project layout conventions.

Changed default output format to use hyphens as separators and title
case capitalization to improve readability and usability for
password managers and general use.

Breaking changes:
- Default delimiter changed from space to hyphen
- Default capitalization changed from none to first (title case)
- Removed vendor directory in favor of go.mod
- CLI framework changed from mow.cli to cobra

New features:
- Capitalization modes (none, first, all, random)
- Number injection with configurable ranges and positions
- Custom separators via --delim flag
- Comprehensive test coverage with race detection
- Passes golangci-lint with zero issues