-
Notifications
You must be signed in to change notification settings - Fork 4
FAQ
- Automation
- Why bee
- What is bee
- What is a bee plugin
- What is a
Beefile
- What is
beehub
- What is
.beerc
- How to install plugins
Taken from a Google search:
Automation describes a wide range of technologies that reduce human intervention in processes
The creation and application of technology to monitor and control the production and delivery of products and services
When we talk about automation, it typically means writing or using software that automates things like
- setting up a workspace and projects
- testing and building projects
- deploying and distributing projects
These things can all be done manually by humans. However, these steps can be described very precisely and therefore can be executed automatically, usually faster than humans, and more importantly, more consistently.
Most of these steps can be automated using already available command line tools. All we need to do is to run them in a certain order. We can further simplify this by listing all commands in a bash script (e.g. build.sh
) to orchestrate all necessary command line tools.
This allows us to have a single entrypoint and a consistant way of automating all aspects of development. Using this approach let's us produce the same outcome, no matter if a human or a build machine is running the script.
The approach mentioned in Automation is very common, e.g. supplying a build.sh
file that can build the project. This file typically contains the actual commands and all necessary variables, like paths and settings. This is fine when working on one project. Problems and increased maintenance may occur when many projects are using this script, e.g. updating the commands and setting up variables for each project. By extracting all variables into a new config file, we can create a reusable set of commands that take the config file as an input. This allows us to store the script in another repository and many projects can point to this script and alter its behaviour without modifications by providing a customized config file.
However, scripts may change over time to address breaking changes in the way that the internal commands are used. Changing the script might fix issues with current projects, but might break the build for older projects that haven't been updated. Different versions of the script are needed to not break older projects and allow newer projects to use the latest commands.
bee solves this issue by providing versioned plugins.
🐝 bee - plugin-based bash automation
bee is a bash plugin package manager that also runs plugins.
A bee plugin is a bash script that provides functions to simplify and standardize certain aspects of automation. Some plugin functions may run without any further configuration, other plugin functions might need additional information, like paths and settings. You can specify all necessary information in Beefile
To get a list of variables that need to be set in order for a plugin to fully function, run the plugin without any arguments, e.g.
bee github
You can copy and paste the 'template' section into your Beefile
and set the values accordingly. Variables marked with # default
can be removed if the default value matches your needs.
The Beefile
is a config file that you create in your project folder using bee new
. It contains your project-specific variables and settings. This file will be committed along with your project.
bee plugins are decoupled from the config file Beefile
and therefore can be reused in many different projects.
beehub is a public repository where you can share your bee plugins. beehub is a list of versioned bee plugin specifications. A plugin specification is a json file that contains meta data about the plugin, like name, url, version and more.
You can easily create your own beehub to share plugins publicly or privately.
beehub let's other users install your plugin by defining them in the Beefile
or by downloading them directly using the bee install
rc
is a common suffix for config files used by command line tools, e.g. .bashrc
, .vimrc
. bee will automatically create a default .beerc
in your home folder, if it doesn't already exist.
.beerc
will be loaded every time you run bee.
You can modify the .beerc
file to customize bee, e.g. adding custom beehubs
BEE_HUBS=(
https://github.com/sschmid/beehub.git
https://github.com/<GITHUB-USER>/beehub.git
)
You can install plugins that are registered at the official beehub or any other public or private beehub. First, sync all your beehubs by running
bee pull
This will make sure that you have all the latest plugin specifications.
To get a list of all available plugins run
bee hubs
or to see all versions
bee hubs -all
You can install any plugin by running
bee install github
To install a specific version please use :
followed by the version. Otherwise the latest version will be installed.
bee install github:2.0.0
This will download and cache the plugin in ~/.bee/caches/plugins
Typically you specify all plugins in your Beefile
. You can optionally specify a specific version using the :
followed by the version.
BEE_PLUGINS=(github)
Running bee install
without any arguments will install all plugins and their dependencies listed in BEE_PLUGINS