☰ Menu
CLI Open source 1 installs/mo

bork for Mac

bork

Bash-Operated Reconciling Kludge

bork — overview

Bork - Skylar MacDonald's Bork Fork

I still use Bork in the year 2021, so I forked it to fix it.

Bork puts the 'sh' back into IT. Bork Bork Bork.

the Swedish Chef Puppet of Config Management

Bork is a bash DSL for making declarative assertions about the state of a system.

Bork is written against Bash 3.2 and common unix utilities such as sed, awk and grep. It is designed to work on any UNIX-based system and maintain awareness of platform differences between BSD and GPL versions of unix utilities.

Installation

From source Clone this repository: Symlink the bork binaries into your $PATH:

via Homebrew (macOS) Install via Homebrew:

via npm Install via npm:

via pre-built package

Starting with version 0.13.0, packages are available for a handful of operating systems on the GitHub releases page. These are generally from CI and built unsigned, but SHA-1 hashes are always available.

Updating

Bork can update itself as part of satisfying your config file. Your config file should look something like this to update via git:

(This example relies on you being able to write to /usr/local; if your Bork is installed elsewhere you should replace the paths above.)

If you have Homebrew available to you, you can do this instead:

You can also specify the --HEAD option on the assertion to install Bork's main branch via Homebrew:

This will always keep the latest commit installed. Note that the latest commit will contain unreleased code that might break, so take care when using it.

Using a package manager is the recommended way to install, as then you can ensure you're only installing released versions of Bork, and rely on it to update Bork for you. If you prefer to use git, you can use bork version to show the status of your local repo or installation. This command should be able to tell you how you installed Bork (e.g. via git or Homebrew), and therefore how you should go about updating it.

Usage and Operations

Running bork without arguments will output some help:

Let's explore these in more depth:

Assertions and Config Files

At the heart of bork is making assertions in a declarative manner via the ok and no functions. That is, you tell it what you want the system to look like instead of how to make it look like that. An assertion takes a type and a number of arguments. It invokes the type's handler function with an action such as status, install, or upgrade, which determines the imperative commands needed to test the assertion or bring it up to date. There are a number of included types in the types directory, and bork makes it easy to create your own. The no function works as an opposite to ok -- an ok assertion will require the presence of something, and a no assertion will require its absence.

Here's a basic example:

Details

Bash操作的调和临时拼凑

How to install bork

  1. Open Terminal (press ⌘ + Space and type “Terminal”).
  2. If Homebrew is not installed yet, run the command below first.
  3. Run this command:

Latest 10 releases

Last updated 2024-02-01; current version v0.14.0, with the latest 5 releases listed.

VersionReleasedTypeSizemacOSWindowsLinux
v0.14.02024-02-01Stable29 KBDownload—Download
v0.13.02021-08-02Stable25 KBDownload—Download
v0.12.02021-02-20Stable————
v0.11.12021-02-09Stable————
v0.13.0-rc.12021-07-29Pre-release————

Data from GitHub Releases; stable releases first, each group sorted newest first.

Compared with similar apps

Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.

Compared with similar apps
AppVersionLicenseArchitecture30-day installs
borkv0.14.0Apache-2.0CLI1
dhall-bash1.42.2BSD-3-ClauseCLI1
fabric-completion1MITCLI1
rake-completionv1.0.3MITCLI1

Similar apps: Command-line Tools

Leave a comment

评论表单加载中…