Skip to content

Keel ​

Keel is a set of small shared Go libraries for self-hosted tools. It holds the plumbing and no product logic.

Ballast is built on these packages. Each one can be used on its own.

Packages ​

Each package name links to its API documentation on pkg.go.dev.

PackagePurpose
secretKeeps a set of secret values and removes them from logs, errors and API responses.
runnerRuns external commands with pipefail behaviour, SIGPIPE handling, cancellation and redacted error output. It never starts a shell.
dockerhostDescribes local, SSH and TLS Docker hosts and builds docker commands with each host's connection flags. Lists Compose projects and volumes.
sshkeyChecks that an SSH private key is complete and has no passphrase, so a program can use it unattended.
proxmoxTalks to one Proxmox VE host's API with an API token. Lists VMs and LXC containers and reads or changes the Proxmox firewall.
notifySends notifications through ntfy, a webhook, Discord, Slack or email. Channel secrets are never logged.

Install ​

sh
go get github.com/springledev/keel@latest

Import only the packages you need. Pin a tagged version in go.mod rather than tracking the latest commit.

To work on Keel and a program that uses it at the same time, run go work init . ../keel in that program's checkout and keep go.work out of git. Do not add a replace directive: a fresh clone should build without Keel checked out next to it.

Example ​

This runs echo and removes a secret from a line of text. The secret is a placeholder value.

go
package main

import (
	"context"
	"fmt"

	"github.com/springledev/keel/runner"
	"github.com/springledev/keel/secret"
)

func main() {
	secrets := secret.NewSet("example-password")

	r := &runner.Runner{Redact: secrets}
	res, err := r.Run(context.Background(), nil, nil, runner.Command{
		Name: "echo",
		Args: []string{"hello"},
	})
	if err != nil {
		fmt.Println("command failed:", err)
		return
	}
	fmt.Print(string(res.Stdout))

	fmt.Println(secrets.Redact("password: example-password"))
}

It prints hello, then password: [redacted].

Stability ​

Keel is pre-1.0. The API may change between tags. Each release lists its changes, including breaking ones, in the CHANGELOG.

Source and licence ​

Source and issues are on GitHub. Keel is licensed under Apache-2.0. If it is useful to you, you can sponsor the work on GitHub.

Source for every project is on GitHub. You can sponsor the work there too.