nu_plugin_boltdb

command module
v0.0.0-...-eb76a51 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2025 License: MIT Imports: 19 Imported by: 0

README

Bolt database Nushell Plugin

Nushell Plugin to interact with bbolt database.

Usage

Plugin implements boltdb command

boltdb {flags} <file> <action> ...(data)

ie to list all the buckets in the "blocks" bucket

boltdb /path/to/bbolt.db buckets -b blocks

See the list of available actions, to see the full help of the command run boltdb --help.

Configuration

Configuration can be provided via $env.config.plugins.NAME Record with following keys:

key default description
timeout 3sec Timeout for the open database call - only single process at a time may open bbolt database.
fileMode 0600 FileMode to use when opening database.
ReadOnly false If set to true databases are opened in read only mode, actions which modify the DB (add, delete, set) would then fail.
mustExist false If set to true database file must exist, otherwise plugin returns error. If both ReadOnly and mustExist are false add and set actions will create the database (if it doesn't exist, other actions still fail).

See bbolt documentation for more info about these parameters.

Example configuration

Run config env, add

$env.config.plugins = {
   boltdb: {
       timeout: 5sec,
       ReadOnly: true
   }
}

save the file and reload the nushell configuration, ie

source $nu.env-path

Installation

Latest version is for Nushell version 0.107.0.

Written in Go using nu-plugin package.

To install it you have to have Go installed, then run

go install github.com/ainvaltin/nu_plugin_boltdb@latest

This creates the nu_plugin_boltdb binary in your GOBIN directory:

Executables are installed in the directory named by the GOBIN environment variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH environment variable is not set.

Locate the binary and follow instructions on Downloading and installing a plugin page on how to register nu_plugin_boltdb as a plugin.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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