Beautiful terminal interfaces for Coldstar cold wallet operations.
First, install the dependencies (including the new Textual framework):
cd coldstar
pip install -e .Or install directly:
pip install textual rich questionarypython launch_tui.pyThis will show a menu where you can choose:
- Flash USB Cold Wallet
- Vault Dashboard
USB Flashing Interface:
python flash_usb_tui.pyVault Dashboard:
python vault_dashboard_tui.py- ✅ Step-by-step progress visualization (Formatting, Writing, Encrypting, Verifying)
- ✅ Real-time progress bars for each step
- ✅ Hardware ID display
- ✅ Overall progress tracking
- ✅ Safety controls (Abort, Eject)
- ✅ Keyboard shortcuts
Keyboard Controls:
ESC- Abort flashingx- Abort and wipe drivee- Eject safely when completeCtrl+C- Immediate abort
- ✅ Three-panel layout (Portfolio | Token Details | Send)
- ✅ Portfolio overview with SOL, USDC, and SPL tokens
- ✅ Token transaction history
- ✅ Risk warnings (transfer-hooks, etc.)
- ✅ Send interface with amount selection
- ✅ Fee estimation (Standard/Fast/Custom)
- ✅ Network status and sync info
Keyboard Controls:
Tab/Shift+Tab- Navigate between panels/- Search tokensr- Refresh balancess- Quick sendq- Quit
You can customize the interfaces by modifying:
# Customize device info
run_flash_ui(
device_name="KIOXIA 32GB",
device_path="/dev/sdb",
device_info="1CD6-FFFF removable • SN:L4330..."
)# Customize vault settings
run_vault_dashboard(
vault_name="usb-03",
network="mainnet" # or "devnet", "testnet"
)The TUI interfaces are designed to integrate with your existing coldstar code:
from flash_usb_tui import FlashUSBApp
# In your flash_usb.py, replace CLI with TUI
def flash_device(device_path):
app = FlashUSBApp(
device_name=get_device_name(device_path),
device_path=device_path,
device_info=get_device_info(device_path)
)
app.run()from vault_dashboard_tui import VaultDashboardApp
from src.wallet import load_wallet
from src.network import get_balance
# Connect to your wallet/network code
def launch_dashboard():
wallet = load_wallet()
app = VaultDashboardApp()
# Pass wallet data to app
app.run()Enable Textual's development console for debugging:
textual consoleIn another terminal:
python flash_usb_tui.pyBoth interfaces use CSS-like styling through Textual. Edit the CSS property in each App class:
class FlashUSBApp(App):
CSS = """
Screen {
background: $surface;
}
/* Add your custom styles */
"""See the design mockups in the project root for reference.
- Connect USB flashing UI to actual flash_usb.py logic
- Wire vault dashboard to src/wallet.py and src/network.py
- Add real-time balance updates
- Implement transaction signing flow
- Add QR code display in terminal
- Create settings panel
- Add multi-wallet support
TUI not displaying correctly:
- Make sure your terminal supports 256 colors
- Use a modern terminal (iTerm2, Windows Terminal, etc.)
- Try resizing your terminal window
Keyboard shortcuts not working:
- Check if your terminal is capturing the keys
- Try alternative shortcuts listed in the footer
Import errors:
- Ensure all dependencies are installed:
pip install -e . - Check Python version: Python 3.11+ required
MIT License - Same as Coldstar project