Uh oh!
There was an error while loading. Please reload this page.
Add CLI - #142
Conversation
…ands - Add CLI entry point using Click - Add Click as runtime dependency Signed-off-by: Willian Paixao <willian@ufpa.br>
There was a problem hiding this comment.
Pull request overview
This PR adds a command-line interface to the python-mnemonic library, enabling users to generate, validate, and derive seeds from BIP-39 mnemonic phrases directly from the terminal.
Key changes:
- Implements three CLI commands using Click framework:
create(generate mnemonics),check(validate mnemonics), andto-seed(derive seeds) - Adds Click as a runtime dependency with flexible version constraint (^8.0)
- Updates documentation with CLI usage examples and command descriptions
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/mnemonic/cli.py | New file implementing the CLI with three commands for mnemonic generation, validation, and seed derivation |
| pyproject.toml | Adds Click dependency and configures the mnemonic script entry point |
| README.rst | Adds CLI usage documentation with examples and fixes spelling error ("mnenomic" → "mnemonic") |
| CHANGELOG.rst | Documents the new CLI feature in version 0.22 |
| .github/workflows/python-package.yml | Enhances CI workflow to build distribution packages and validate package metadata |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 12 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Willian Paixao <willian@ufpa.br>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
willianpaixao
commented
Jan 6, 2026
Copilot gave me a lot more feedback than I expected. I thought it would be simpler/easier PR. @matejcik this is ready for review. |
Summary
This PR adds a command-line interface to the python-mnemonic library, making it easy to generate, validate, and derive seeds from BIP-39 mnemonic phrases directly from the terminal.
New Commands
mnemonic create- Generate a new mnemonic phrase and its derived seed-l, --language- Wordlist language (default: english)-s, --strength- Entropy bits: 128, 160, 192, 224, or 256 (default: 128)-p, --passphrase- Optional passphrase for seed derivationmnemonic check- Validate a mnemonic phrase's checksum-l, --language- Wordlist language (auto-detected if not specified)mnemonic to-seed- Derive a 64-byte seed from a mnemonic phrase-p, --passphrase- Optional passphrase for seed derivationUsage Examples
Test Plan
mnemonic creategenerates valid mnemonic and seedmnemonic checkreturns exit 0 for valid mnemonicmnemonic checkreturns exit 1 for invalid mnemonicmnemonic to-seedoutputs correct seed in hex formatcheckandto-seedcheck