https://github.com/hasit/bolter
Command-line app for viewing BoltDB file in your terminal
https://github.com/hasit/bolter
boltdb command-line-tool go golang
Last synced: 25 days ago
JSON representation
Command-line app for viewing BoltDB file in your terminal
- Host: GitHub
- URL: https://github.com/hasit/bolter
- Owner: hasit
- License: mit
- Created: 2016-05-19T07:41:50.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-06-04T19:50:03.000Z (11 months ago)
- Last Synced: 2024-11-17T12:46:42.499Z (5 months ago)
- Topics: boltdb, command-line-tool, go, golang
- Language: Go
- Homepage:
- Size: 846 KB
- Stars: 265
- Watchers: 12
- Forks: 43
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - hasit/bolter - Command-line app for viewing BoltDB file in your terminal (Go)
README
# bolter
View BoltDB file in your terminal

## Install
```
$ go get -u github.com/hasit/bolter
```## Usage
```
$ bolter [global options]GLOBAL OPTIONS:
--file FILE, -f FILE boltdb FILE to view
--bucket BUCKET, -b BUCKET boltdb BUCKET to view
--machine, -m key=value format
--help, -h show help
--version, -v print the version
```### List all buckets
```
$ bolter -f emails.db
+---------------------------+
| BUCKETS |
+---------------------------+
| [email protected] |
| [email protected] |
| [email protected] |
| [email protected] |
+---------------------------+
```### List all items in bucket
```
$ bolter -f emails.db -b [email protected]
Bucket: [email protected]
+---------------+---------------------+
| KEY | VALUE |
+---------------+---------------------+
| emailLastSent | |
| subLocation | |
| subTag | |
| userActive | true |
| userCreatedOn | 2016-10-28 07:21:49 |
| userEmail | [email protected] |
| userFirstName | John |
| userLastName | Doe |
+---------------+---------------------+
```### Nested buckets
You can easily list all items in a nested bucket:
```
$ bolter -f my.db
+-----------+
| BUCKETS |
+-----------+
| root |
+-----------+$ bolter -f my.db -b root
Bucket: root
+---------+---------+
| KEY | VALUE |
+---------+---------+
| nested* | |
+---------+---------+* means the key ('nested' in this case) is a bucket.
$ bolter -f my.db -b root.nested
Bucket: root.nested
+---------+---------+
| KEY | VALUE |
+---------+---------+
| mykey | myvalue |
+---------+---------+
```### Machine friendly output
```
$ bolter -f emails.db -m
[email protected]
[email protected]
[email protected]
[email protected]$ bolter -f emails.db -b [email protected] -m
emailLastSent=
subLocation=
subTag=
userActive=true
userCreatedOn=2016-10-28 07:21:49
[email protected]
userFirstName=John
userLastName=Doe
nested-bucket*=
```## Contribute
Feel free to ask questions, post issues and open pull requests. My only requirement is that you run `gofmt` on your code before you send in a PR.