https://github.com/spacewander/boltcli
boltcli is the redis-cli for boltdb with Lua script support
https://github.com/spacewander/boltcli
boltdb cli repl
Last synced: 3 months ago
JSON representation
boltcli is the redis-cli for boltdb with Lua script support
- Host: GitHub
- URL: https://github.com/spacewander/boltcli
- Owner: spacewander
- License: gpl-3.0
- Created: 2017-10-07T16:14:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-22T05:53:05.000Z (over 1 year ago)
- Last Synced: 2025-03-28T11:42:49.035Z (3 months ago)
- Topics: boltdb, cli, repl
- Language: Go
- Homepage:
- Size: 739 KB
- Stars: 25
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://travis-ci.org/spacewander/boltcli)
[](http://goreportcard.com/report/spacewander/boltcli)
[](https://codecov.io/github/spacewander/boltcli?branch=master)
[](https://github.com/spacewander/boltcli/blob/master/LICENSE)## Feature
* Support CRUD commands on the bucket/key in repl-like command line. You can consider it as `redis-cli` for boltdb.
* You can eval Lua script with given database. It makes maintaining boltdb more easily.## Usage
`boltcli [-e script] /path/to/db`
## Commands
Documentation for commands is available with the built-in help command:
```
/tmp/test.db> help
Commands: buckets, del, delglob, exists, get, help, keys, keyvalues, set, stats
/tmp/test.db> help help
Command: help commandShows the help output for the given command.
```
## Lua support
You could run a lua script on specific database like this: `boltcli -e your.lua db_path`.
`boltcli` provides a couple of API within the global variable `bolt`. For example:
```lua
bolt.get("bucket", "key") -- return the value of `key` as a lua string
-- is equal to > get bucket key in the command line
```See [test.lua](./test.lua) as a concrete example.