Bolt TUI ( bolt-tui)

A Terminal User Interface (TUI) for viewing and managing BoltDB files. Built with Go and the Bubbletea framework.
Features
- ποΈ Interactive File Picker: Browse and select BoltDB files from your filesystem
- π Database Browser: View all buckets and their key-value pairs
- βοΈ Edit Operations: Create, update, and delete buckets and keys
- β¨οΈ Keyboard Navigation: Full keyboard support with intuitive shortcuts
- π Help System: Built-in help to guide you through available commands
- π Tab Navigation: Organize your work with multiple tabs
Installation
Prerequisites
Build From Source
git clone https://github.com/lunargon/bolt-tui.git
cd bolt-tui
go build -o bolt-tui cli/main.go
Usage
Basic Usage
Run the application to open the file picker:
./bolt-tui
CLI Options
Open a specific BoltDB file directly:
./bolt-tui -f /path/to/your/database.db
Start file picker in a specific directory:
./bolt-tui -d /path/to/directory
Use current directory:
./bolt-tui -d .
Keyboard Shortcuts
General Navigation
| Key |
Action |
β/k |
Move up |
β/j |
Move down |
β/h |
Move left |
β/l |
Move right |
Enter |
Select/Confirm |
Esc |
Go back/Cancel |
Ctrl+c |
Quit |
? |
Toggle help |
Tab Management
| Key |
Action |
Tab |
Next tab |
Shift+Tab |
Previous tab |
1-9 |
Select tab by number ( Not implement this) |
Bucket Operations
| Key |
Action |
Ctrl+t |
Create new bucket |
Ctrl+b |
Edit bucket name |
Ctrl+r |
Remove bucket |
Key-Value Operations
| Key |
Action |
Ctrl+n |
Create new key |
Ctrl+e |
Edit key name |
Ctrl+d |
Delete key |
Enter |
Edit value (when key selected) |
Project Structure
bolt-tui/
βββ main.go # Test entry point with file picker ( for testing)
βββ cli/
β βββ main.go # CLI entry point
βββ src/
β βββ app/ # TUI application logic
β β βββ model.go # Main application model and UI
β β βββ helper.go # Helper functions
β βββ bolt/ # BoltDB wrapper
β β βββ bolt.go # Database operations
β βββ cmd/ # CLI commands
β βββ main.go # Cobra command definitions
βββ seed/ # Database seeding utilities
β βββ seed.go
βββ go.mod # Go module definition
βββ go.sum # Go module checksums
βββ README.md # This file
Dependencies
Development
Building
Build the main CLI application:
go build -o bolt-tui cli/main.go
Running Tests
Seed .db file for testing:
go run seed/seed.go
Run the main CLI application:
go run cli/main.go
Or run the test entry point (for testing purposes):
go run main.go
# Linux
GOOS=linux GOARCH=amd64 go build -o bolt-tui-linux
# macOS
GOOS=darwin GOARCH=amd64 go build -o bolt-tui-macos
# Windows
GOOS=windows GOARCH=amd64 go build -o bolt-tui-windows.exe
Todo
- Refactor
- Update UI
- Add feature to jump tab with number
- Have switch to view
byte value or string value
Example
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature)
- Commit your changes (
git commit -m 'Add some amazing feature')
- Push to the branch (
git push origin feat/amazing-feature)
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with Charm TUI libraries
- Inspired by the need for a simple, interactive BoltDB browser
- Thanks to the Go community for excellent tooling and libraries