Commit 7fd8aac
committed
feat: Add Interactive TUI mode with scrollable command output
- Implement complete TUI framework using ratatui 0.28 + crossterm 0.28
- Add Interactive command to CLI with 6 menu categories
- Implement real PKCS#11 command execution for info and list-slots
- Add comprehensive scrolling system with PageUp/PageDown support
- Fix scrolling logic consistency between render and scroll methods
- Disable tracing for interactive mode to prevent TUI corruption
- Add demo script and comprehensive documentation
- Support both SoftHSM2 and Kryoptic HSM providers
TUI Features:
- Menu-driven interface with hierarchical navigation
- Real-time status feedback with emojis and progress indicators
- Scrollable command output for large results (tested with 146+ lines)
- Graceful error handling and recovery
- Clean terminal management and proper cleanup
Architecture:
- crates/rust-hsm-cli/src/commands/interactive.rs (765 lines)
- Modular command execution with real PKCS#11 integration
- Consistent error handling and status management
- Memory-safe PKCS#11 lifecycle (initialize/finalize)
Tested extensively in Docker with multiple HSM providers and various
output sizes. Foundation ready for expanding to full PKCS#11 functionality.1 parent 6b05c18 commit 7fd8aac
8 files changed
Lines changed: 1635 additions & 8 deletions
File tree
- crates/rust-hsm-cli
- src
- commands
- docs
- commands
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
644 | 651 | | |
0 commit comments