A command-line tool for Ethereum (EVM) wallet operations.
- Clone or download this project
- Install dependencies:
npm install
The project is written in TypeScript. Source files are in the src/ directory.
# Run directly with tsx (for development)
npm run evm-cli generate-wallet
# Build TypeScript to JavaScript
npm run buildTest the CLI locally:
npm run evm-cli generate-walletBuild and install the CLI globally to use from anywhere:
npm run build
npm install -g .Then use:
evm-cli generate-walletGenerates a new Ethereum wallet with a private key and address.
evm-cli generate-walletOutput:
Generated new wallet:
Mnemonic: swallow want morning impact drift problem version focus chimney again worth address
Address: 0x5AB78171430243aC8393361020C9065499ccB7D7
Private Key: 0x4023b5b383483283b81a93b2bffc59c4c264b4faddb406812e03fb6e9f5959c4
Shows available commands and usage information.
evm-cli helpOption 1: Import via Private Key
- Open MetaMask and click the account circle in the top right
- Select "Import Account" from the dropdown menu
- Choose "Private Key" as the import type
- Paste your private key (the 0x... string from the CLI output)
- Click "Import" - your wallet will be added to MetaMask
Option 2: Import via Seed Phrase
- Open MetaMask and click the account circle in the top right
- Select "Import using Secret Recovery Phrase"
- Enter your 12-word mnemonic (the word phrase from the CLI output)
- Set a password and click "Import"
Import via Seed Phrase (Recommended)
- Open Brave Wallet (Menu → More Tools → Crypto Wallets)
- Click "Already have a wallet?"
- Select "Import wallet"
- Enter your 12-word mnemonic (the word phrase from the CLI output)
- Set a password and click "Continue"
Note: Brave Wallet does not support direct private key import. Use the mnemonic seed phrase instead.
- Storing seed phrases and private keys securely
- Using environment variables or secure storage
- Never sharing or committing mnemonics/private keys to version control
- Only import seed phrases you generated yourself
- Never share your mnemonic or private key with anyone
- Consider these test wallets only - don't store significant funds
- Use hardware wallets for production/mainnet funds
- Both the mnemonic and private key give complete control over the wallet
- Viem - TypeScript interface for Ethereum
- TypeScript - Type-safe JavaScript
- tsx - TypeScript execution engine
- Node.js (ES modules support required)