NAME

bee - Small application to handle bee files

VERSION

version 0.200

SYNOPSIS

# show keys
$ bee test.bee

# get key
# integer displays as ascii numbers
# bool displays as true or false
# nil value is not displayed
# arrays and hashs are displayed as Data::Dumper dump
$ bee test.bee key

# sample complex key, no need for escaping
$ bee test.bee web#img/background.jpg#content

# get is transparent on string
$ bee test.bee gzipped_value | gunzip -c

# set key to nil
$ bee test.bee key n

# set bool key
$ bee test.bee key b 0

# set integer key
$ bee test.bee key i 123

# set string key
$ bee test.bee key s "This is a test"

# set array key
$ bee test.bee key a "Peter Parker" "Bruce Banner" "Clark Jerome Kent"

# set hash key
$ bee test.bee key h \
  spiderman "Peter Parker" \
  hulk "Bruce Banner" \
  superman "Clark Jerome Kent"

DESCRIPTION

bee is a small command-line tool, bundled with BeePack, for inspecting and manipulating a .bee file directly from the shell. It takes up to three leading arguments -- bee FILE [KEY [TYPE VALUE...]] -- and picks its mode from how many of them are given:

bee FILE

No KEY: opens FILE read-only and lists every key in the pack, one per line.

bee FILE KEY

A KEY but no TYPE: opens FILE read-only and prints the value stored under KEY -- arrays and hashes via Data::Dumper, everything else as-is. A key that doesn't "exist" (see "nil_exists" in BeePack; by default this includes a nil-valued key) prints nothing.

bee FILE KEY TYPE VALUE...

A TYPE as well: opens FILE read/write (through a tempfile), sets KEY to VALUE... forced into the MsgPack type named by TYPE, and saves.

TYPE is matched on its first character, mirroring "set_type" in BeePack -- adding a new letter here means adding the matching branch there, and vice versa.

n

Nil. Takes no VALUE. Sets KEY to MsgPack nil via "set_nil" in BeePack.

i

Integer. Takes exactly one VALUE, forced to a MsgPack integer via "set_integer" in BeePack.

s

String. Takes exactly one VALUE, forced to a MsgPack string via "set_string" in BeePack.

b

Bool. Takes exactly one VALUE; "set_bool" in BeePack stores it as MsgPack true or false according to whether VALUE is true or false in Perl terms (so 0 and the empty string store as false).

a

Array. Every remaining VALUE is stored as one MsgPack array.

h

Hash. Every remaining VALUE is stored as one MsgPack hash -- an even count of KEY VALUE KEY VALUE ... pairs is required.

Storing a numeric-looking value as a string

$ bee test.bee key s 0042

Streaming a raw value through a pipe

$ bee test.bee gzipped_value | gunzip -c

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/cindustries/p5-beepack/issues.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

AUTHOR

Torsten Raudssus <torsten@raudss.us>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014-2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.