bolt-tui

command module
v0.0.0-...-488d456 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 8 Imported by: 0

README ΒΆ

Bolt TUI ( bolt-tui)

License Go Report Card

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
  • Go 1.24.1 or higher
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
Building for Different Platforms
# 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

image

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feat/amazing-feature)
  5. 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

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
src
app
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL