/pod-registry

Pod manifests describe where pods can be downloaded, etc.

Primary LanguageClojure

Pod registry

The central place to register babashka pods for easy usage with babashka.

Loading and using a pod

Registered pods can be loaded using a qualified symbol and a version string:

(require '[babashka.pods :as pods])
(pods/load-pod 'org.babashka/buddy "0.1.0")

From then on, a pod exposes namespaces which can be called like regular Clojure:

(require '[pod.babashka.buddy.core.hash :as hash])
(hash/md5 "foo")

Registered pods

Pod Description Latest version Example Language
clj-kondo/clj-kondo A clojure linter that sparks joy 2022.02.09 link clojure
com.fluree/crypto A Clojure(Script) crypto library for the Fluree graph database 0.1.1 link clojure
com.github.clojure-lsp/clojure-lsp Language Server (LSP) for Clojure 2022.02.01-20.02.32 link clojure
epiccastle/spire Pragmatic idempotent machine provisioning over SSH (mac and linux only) 0.1.0-alpha.18 link clojure
justone/brisk Freeze and thaw with Nippy 0.2.0 link clojure
justone/tabl Make tables from data in your terminal 0.2.0 link clojure
lispyclouds/docker Interact with Docker 0.1.1 link clojure
org.babashka/aws AWS client based on aws-api 0.1.2 link clojure
org.babashka/buddy Cryptographic API provided by buddy 0.1.0 link clojure
org.babashka/etaoin Etaoin, a pure Clojure webdriver protocol implementation 0.1.0 link clojure
org.babashka/filewatcher Filewatcher based on Rust notify 0.0.1 link rust
org.babashka/fswatcher Filewatcher based on Go fsnotify 0.0.2 link golang
org.babashka/hsqldb HSQLDB access via next.jdbc 0.1.0 link clojure
org.babashka/mssql MSSQL access via next.jdbc 0.1.0 See hsqldb clojure
org.babashka/mysql MySQL access via next.jdbc 0.1.0 link clojure
org.babashka/oracle Oracle access via next.jdbc 0.1.0 clojure
org.babashka/parcera Grammar-based Clojure(script) parser 0.0.1 link clojure
org.babashka/postgresql Postgresql access via next.jdbc 0.1.0 link clojure
org.babashka/go-sqlite3 Interact with sqlite3 0.1.0 link golang
org.babashka/tools-deps-native Tools deps alpha as a pod 0.0.5 link clojure
retrogradeorbit/bootleg Template processing command line tool to help build static websites. Inbuilt support for html, hiccup, hickory, selmer, mustache, markdown, enlive, json, yaml and edn. 0.1.9 link clojure
rorokimdim/stash Encrypted text storage 0.3.1 link haskell
tzzh/aws Interact with AWS 0.0.3 link golang
tzzh/mail Send emails 0.0.2 link golang
huahaiy/datalevin Datalevin database 0.6.7 link clojure

Registering a pod

To register a pod, create a nested directory in manifests with the following structure:

<org>/<pod-name>/<version>

and add a manifest.edn file like the following example:

{:pod/name tzzh/mail
 :pod/description ""
 :pod/version "0.0.2"
 :pod/license ""
 :pod/artifacts
 [{:os/name "Linux.*"
   :os/arch "amd64"
   :artifact/url "https://github.com/tzzh/pod-tzzh-mail/releases/download/v0.0.2/pod-tzzh-mail_0.0.2_Linux_x86_64.zip"
   :artifact/executable "pod-tzzh-mail"}
  {:os/name "Mac.*"
   :os/arch "x86_64"
   :artifact/url "https://github.com/tzzh/pod-tzzh-mail/releases/download/v0.0.2/pod-tzzh-mail_0.0.2_Darwin_x86_64.zip"
   :artifact/executable "pod-tzzh-mail"}
  {:os/name "Windows.*"
   :os/arch "amd64"
   :artifact/url "https://github.com/tzzh/pod-tzzh-mail/releases/download/v0.0.2/pod-tzzh-mail_0.0.2_Windows_x86_64.zip"
   :artifact/executable "pod-tzzh-mail.exe"}]}

The required fields are :pod/name, :pod/version and :pod/artifacts.

You can then load the pod in your babashka script as follows:

(require '[babashka.pods :as pods])
(pods/load-pod 'tzzh/mail "0.0.2")

(require '[pod.tzzh.mail :as m])
(m/send-mail ...)

The :pod/artifacts vector will be matched in order on operating system and architecture. For the first match, the :articact/url, a zip file, will be downloaded and extracted. After extraction there should be a file with the same name as :artifact/executable which will be made executable and invoked as the pod.