A secure command-line wallet for Bitcoin that supports multiple key storage providers.
How to back up your mnemonic phrase more securely? Write it on paper? Engrave it on steel? Scramble the order? Use a 25th word? Password cloud storage? Hardware wallet?
- Physical backups can be lost or damaged
- Cloud storage risks being hacked
Security practice: Use AES and passphrase dual protection to back up across multiple cloud drives. Only need to remember two passwords - one to decrypt the 24 word mnemonic, and one to combine with the 24 words to restore the key.
English | ä¸ć–‡ | Documentation
All data files and credentials remain under your full control at all times. This wallet puts you in complete control of your assets through self-custody:
- Wallet files are encrypted with your passwords before being stored
- Private keys are never shared with any third party
- Cloud storage providers cannot access your unencrypted data
- You are responsible for safely storing your wallet files and remembering your passwords
- No recovery mechanisms exist if you lose your encrypted files or passwords
Always keep multiple backups of your encrypted wallet files and ensure you never forget your passwords.
- BIP39 mnemonic phrase generation (24 words)
- Optional BIP39 passphrase support
- AES-256-GCM encryption with Argon2id key derivation
- Cloud storage support via OAuth (Google Drive, Dropbox, Box, AWS S3)
- Local wallet storage option
- No server component - all OAuth token exchanges, cloud storage connections, and authorization processes happen solely on your local machine without any external server involvement. This program is fully client-side and will never have any server component.
- Legacy addresses (P2PKH)
- SegWit addresses (P2WPKH)
- Nested SegWit addresses (P2SH-P2WPKH)
- Taproot addresses (P2TR)
TODO: P2TR and P2SH address types are planned but not yet fully implemented in the current version.
- Bitcoin Mainnet
- Bitcoin Testnet
- Local file system
- Google Drive
- Dropbox
- Box
- AWS S3
- Apple Keychain (macOS only)
create
- Create a new Bitcoin wallet with various address typesget
- Retrieve and display Bitcoin addresses from a wallet filelist
- List available wallets in cloud storagecopy
- Copy wallet between storage providers
transfer
- Create and broadcast Bitcoin transactionssign-tx
- Sign a raw Bitcoin transactionsign-message
- Sign a message with a Bitcoin private keyutxo
- List unspent transaction outputs for an addressfee
- Get current recommended Bitcoin transaction feesconsolidate-utxos
- Consolidate multiple small UTXOs into a single output
config
- Manage configuration settingsget
- Get a configuration valueset
- Set a configuration valuedelete
- Delete a configuration valuelist
- List all configuration values
# Create wallet and save to local file
btc-cli create --output fs --path wallet.json
# Create wallet and save to Google Drive
btc-cli create --output google
# Create wallet and save to Apple Keychain (macOS only)
btc-cli create --output keychain
# From local file
btc-cli get --input wallet.json
# From cloud storage
btc-cli get --input google --name mywallet
# From Apple Keychain
btc-cli get --input keychain --name mywallet
# Sign a message with a key from your wallet
btc-cli sign-message --data "Hello, Bitcoin!" --file wallet.json
# List UTXOs for a specific address
btc-cli utxo --address bc1qexample...
# Transfer funds from your wallet to another address
btc-cli transfer --from wallet.json --to bc1qexample... --amount 0.001
# Get current fee recommendations
btc-cli fee
# Consolidate many small UTXOs into a single output
btc-cli consolidate-utxos --wallet wallet.json
Download the latest release (v0.1.2) from the Releases page.
# Download the binary
wget https://github.com/ethanzhrepo/btc-cli-vault/releases/download/v0.1.2/btc-cli-0.1.2-linux-amd64
# Make it executable
chmod +x btc-cli-0.1.2-linux-amd64
# Move to a directory in your PATH (optional)
sudo mv btc-cli-0.1.2-linux-amd64 /usr/local/bin/btc-cli
# Run the binary
btc-cli --help
# Download the binary
curl -LO https://github.com/ethanzhrepo/btc-cli-vault/releases/download/v0.1.2/btc-cli-0.1.2-macos-arm64
# Make it executable
chmod +x btc-cli-0.1.2-macos-arm64
# Move to a directory in your PATH (optional)
sudo mv btc-cli-0.1.2-macos-arm64 /usr/local/bin/btc-cli
# Run the binary
btc-cli --help
Note for macOS Intel users: Intel-based macOS users should compile from source for optimal compatibility.
- Download the Windows executable (btc-cli-0.1.2-windows-amd64.exe) from the releases page
- Rename it to btc-cli.exe (optional)
- Open Command Prompt or PowerShell and navigate to the download location
- Run the executable:
.\btc-cli.exe --help
For the best compatibility or if you want to modify the code, building from source is recommended:
# Clone the repository
git clone https://github.com/ethanzhrepo/btc-cli-vault.git
cd btc-cli-vault
# Copy the example .env file and edit it with your own API keys
cp .env.example .env
nano .env # or use any text editor to update the keys
# Build the binary
go build -o btc-cli
# Run the binary
./btc-cli --help
If you prefer to embed the API keys in the binary:
# Set environment variables (replace with your actual keys)
export GOOGLE_OAUTH_CLIENT_ID=your_google_oauth_client_id
export GOOGLE_OAUTH_CLIENT_SECRET=your_google_oauth_client_secret
export DROPBOX_APP_KEY=your_dropbox_app_key
export BOX_CLIENT_ID=your_box_client_id
export BOX_CLIENT_SECRET=your_box_client_secret
export AWS_ACCESS_KEY_ID=your_aws_access_key_id
export AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key
export AWS_S3_BUCKET=your_aws_s3_bucket
export AWS_REGION=your_aws_region
# Build with these variables embedded
make build-macos # For macOS
# OR
make build-linux-amd64 # For Linux
# OR
make build-windows # For Windows
Contributions are welcome! Please feel free to submit a Pull Request.