A minimal CLI tool to create Ethereum keystore files from a private key. It encrypts your key with a password and saves it in the standard Web3 Secret Storage format.
- Secure input — Private key and password are read via
getpass(no echo, not stored in shell history) - Password confirmation — Reduces risk of typos when setting the keystore password
- Standard format — Output is compatible with Geth, MetaMask, and other Ethereum tools
- Python 3.12+
- uv (recommended) or pip
With uv:
uv syncRun the keystore manager:
uv run python main.pyYou will be prompted for:
- Private key — Your Ethereum private key (input is hidden)
- Password — A password to encrypt the keystore
- Password confirmation — Same password again
On success, an encrypted keystore file is written to account.keystore.json in the current directory.
- Success: Keystore saved as
account.keystore.json - Error: If the two passwords do not match, the program exits with an error and no file is written
- Never share your private key or keystore file.
- Use a strong, unique password for the keystore.
- Keep
account.keystore.json(and any backups) in a secure location and out of version control. - Add
*.keystore.jsonto your gitignore.
- Linting/formatting: Ruff is included as a dependency.
- Run Ruff:
uv run ruff check .anduv run ruff format .
See repository root for license information.