keyvault-tui
v2.0.1
Published
A beautiful Terminal User Interface (TUI) for exploring Azure Key Vault secrets. Built with Bun and TypeScript.
Readme
keyvault-tui
A beautiful Terminal User Interface (TUI) for exploring Azure Key Vault secrets. Built with Bun and TypeScript.
Features
- 🔑 Browse Key Vault secrets across all Azure subscriptions
- 🔍 Real-time filtering and search
- 📝 View secret metadata and values
- ✏️ Create new secrets
- ✏️ Edit secret values in-place
- 📋 Copy secrets to clipboard (macOS)
- 🔄 Rename secrets (creates new, attempts to delete old)
- 📦 Move secrets between Key Vaults (non-destructive copy)
- ⌨️ Vim-like navigation and commands
- 🎨 Clean, responsive terminal interface
Built With
This application is built using OpenTUI, a TypeScript library for building terminal user interfaces. OpenTUI provides the foundational TUI framework with native Zig rendering for high-performance terminal graphics.
Installation
Prerequisites
- Bun (>= 1.0.0) - Install Bun
- Azure CLI - Install Azure CLI
- Zig (for building native libraries if needed) - Install Zig
Quick Start
# Ensure you're logged into Azure
az login
# Run the application
bunx keyvault-tuiUsage
Navigation
- Tab - Switch focus between filter and list
- / - Jump to filter/search input
- ↑↓ or j/k - Navigate list items
- Enter - Select vault or open secret details
- Esc - Go back one level (detail → list → vault selection)
- b - Alternative back navigation
- ? - Toggle in-app help overlay
- 1–6 - Jump to recently used Key Vaults (slots shown in header)
Secret Management
When viewing a secret (after pressing Enter on it):
- n - Create new secret (prompts for name, then value)
- e - Edit secret value
- c - Copy secret value to clipboard
- r - Rename secret (creates new with same value)
- m - Move/copy secret to another Key Vault
- d - Delete the current secret (honors soft-delete/purge protection settings in Azure Key Vault)
Commands
- :q or :exit - Quit application (vim-style)
- :vault or :kv - Return to the Key Vault selection screen
- :vault
<name>or :kv<name>- Switch directly to another Key Vault by name (partial names allowed) - Esc - Close command bar or navigate back
Workflow
- Select Key Vault: Application loads all Key Vaults from your Azure subscriptions
- Browse Secrets: Use filter to find secrets, press Enter to view details
- Manage Secrets: Use keyboard shortcuts to create, edit, copy, rename, or move secrets
- Navigate: Use Esc to go back to previous views
Development
Local Development
# Clone and setup
git clone <repository>
cd keyvault-tui
bun install
# Build OpenTUI native libraries
bun run opentui:build
# Run locally
bun run kv:explorer
# Or run smoke test (no Azure required)
bun run kv:explorer --smoke-testTesting Local Package
# Test the full packaging pipeline
bun run pack:testThis script builds the native libraries, creates an npm package, installs it globally, tests it with smoke test, and cleans up.
Publishing
- Build native libraries:
bun run opentui:build - Version bump:
npm version patch|minor|major - Pack and verify:
npm pack && tar -tf keyvault-tui-*.tgz | grep libopentui - Publish:
npm publish --access public
Architecture
- Frontend: TypeScript with OpenTUI for terminal rendering
- Backend: Azure CLI for authentication,
@azure/keyvault-secretsfor Key Vault operations - Native Layer: Zig libraries (via OpenTUI) for high-performance terminal graphics
- Packaging: Vendored OpenTUI with cross-platform native libraries included
Troubleshooting
Common Issues
- "Azure CLI not found" - Install Azure CLI and run
az login - "Failed to load Key Vaults" - Ensure you have proper Azure permissions
- Native library errors - Run
bun run opentui:buildto rebuild platform libraries
Debug Mode
Run with smoke test to verify installation without Azure dependencies:
bunx keyvault-tui --smoke-testContributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test with
bun run pack:test - Submit a pull request
License
[Your License Here]
Acknowledgments
- Built with OpenTUI by the SST team
- Inspired by modern terminal applications and vim-like interfaces
