@kszongic/gcd-cli
v1.0.0
Published
Compute GCD and LCM of numbers from the command line
Maintainers
Readme
@kszongic/gcd-cli
Compute GCD and LCM of numbers from the command line. Zero dependencies.
Install
npm install -g @kszongic/gcd-cliUsage
# Greatest Common Divisor (default)
gcd-cli 12 18
# 6
# Least Common Multiple
gcd-cli --lcm 4 6
# 12
# Both at once
gcd-cli --both 12 18 24
# GCD: 6 LCM: 72
# Works with any number of integers
gcd-cli 100 75 50
# 25Options
| Flag | Description |
|------|-------------|
| --gcd | Show only GCD (default) |
| --lcm | Show only LCM |
| --both | Show both GCD and LCM |
| -v, --version | Show version |
| -h, --help | Show help |
License
MIT © 2026 kszongic
