Home

Awesome

Gobot

The binary package manager for Node

Manage and run binaries via npm. CLI and API interfaces.

Table of Contents

Introduction

Gobot installs binary apps anywhere npm is available. It transparently downloads, installs, and runs binary apps (including semver ranges) for the current operating system and architecture.

Works on Windows, Linux, OS X.

Features

Inspired by esbuild and other packages that install binary dependencies

Quickstart

Run an official app from anywhere

npx gobot <app>

List of official apps

Try running an unofficial app using github user/repo

Gobot will examine releases from Github and attempt to decipher versions, platforms, and architectures.

gobot <user>/<repo> --help

Install gobot globally

npm i -g gobot
gobot pocketbase --help
gobot caddy --help
gobot act --help

Use a Gobot app programmatically

npm i gobot
import { gobot } from 'gobot'
const bot = await gobot(`pocketbase`)
const exitCode = await bot.run([`--help`])

Pass environment variables

In API mode, Gobot does not forward environment variables by default.

import { gobot } from 'gobot'
const bot = await gobot(`pocketbase`, {
  env: process.env,
})
const exitCode = await bot.run([`--help`])

Use a specific version of a Gobot app

const bot = await gobot(`pocketbase`, {
  version: `0.19.3`,
})
const exitCode = await bot.run([`--help`])

Access the child process

import { gobot } from 'gobot'
const bot = await gobot(`pocketbase`, {
  env: process.env,
})
const exitCode = await bot.run(
  [`--help`],
  { cwd: `./foo` }, // SpawnOptions
  (proc) => {
    // ChildProcess
    proc.stdout.on('exit', (code) => {
      console.log(`process has exited`)
    })
  },
)

Add an official app as a project dependency

npm i gobot-<app>[@version]

Gobot will automatically select the specific version of <app> you installed and it will stay locked according to your package.json constraints.

npm i gobot-pocketbase@0.19.3
import { gobot } from 'gobot'
const bot = await gobot(`pocketbase`)
const exitCode = await bot.run([`--help`])

CLI

Note: All Gobot options begin with --g- so as not to conflict with app option switches. Every unrecognized option is passed through to the app binary.

Global options

These options are available on every command:

NameDefaultDiscussion
--g-versionoutput the version number
--g-vtrueShow informational output
--g-vvfalseShow even more output
--g-vvvfalseShow even more output
--g-cache-pathhost specificThe cache path to use

gobot <appName> [options]

Run a binary app. The app will be downloaded if it has not been downloaded yet. After that, you must run 'gobot update <appName>' to make Gobot look for new versions.

Options

NameDefaultDiscussion
--g-use-version*Run a specific binary version (format: x.y.z semver or x.y.* semver range)
--g-oshost specificSpecify OS/Platform
--g-archhost specificSpecify OS/Platform

gobot inspect [appName]

Display Gobot registry information. If [appName] is specified, Gobot will display release information. Otherwise, Gobot will display an overview of current registry information

gobot download <appName> [options]

Download versions of <appName>. Gobot will download and cache the specific platform, architecture, and versions you request, defaulting to downloading the latest version for the host platform and architecture.

Options

NameDefaultDiscussion
--g-use-versionlatestDownload a specific binary version (format: x.y.z semver or x.y.* semver range)
--g-oshost specificSpecify OS/Platform
--g-archhost specificSpecify OS/Platform
--g-forcefalseForce re-downloading and replacing even if version already exists

gobot export <appName><format>

Export app version information

gobot update <appName>

Pull the latest release history for <appName>, optionally.

gobot reset [appName]

Reset caches. If [appName] is specified, only that app's cache is reset. Otherwise, all caches are reset. Caches include release history and binary downloads. Use 'gobot inspect' to learn more about host-specific cache locations and contents.

API

Full API Docs

Official Gobot Apps

Gobot supports 53 apps using bin names. They also have npm helper packages to assist with version locking.

          <app>What is it?
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/act/logo-50x.webp">actRun your GitHub Actions locally 🚀npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/AdGuardHome/logo-50x.webp">AdGuardHomeNetwork-wide ads & trackers blocking DNS servernpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/age/logo-50x.webp">ageA simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/aperture/logo-50x.webp">apertureRate limiting, caching, and request prioritization for modern workloadsnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/backrest/logo-50x.webp">backrestBackrest is a web UI and orchestrator for restic backup.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/caddy/logo-50x.webp">caddyFast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPSnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/centrifugo/logo-50x.webp">centrifugoScalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably. Set up once and forever.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/chezmoi/logo-50x.webp">chezmoiManage your dotfiles across multiple diverse machines, securely.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/constellation/logo-50x.webp">constellationConstellation is the first Confidential Kubernetes. Constellation shields entire Kubernetes clusters from the (cloud) infrastructure using confidential computing.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/croc/logo-50x.webp">crocEasily and securely send things from one computer to another :crocodile: :package:npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/cue/logo-50x.webp">cueThe home of the CUE language! Validate and define text-based and dynamic configurationnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/dasel/logo-50x.webp">daselSelect, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/dnscryptproxy/logo-50x.webp">dnscryptproxydnscrypt-proxy 2 - A flexible DNS proxy, with support for encrypted DNS protocols.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/duf/logo-50x.webp">dufDisk Usage/Free Utility - a better 'df' alternativenpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/etcd/logo-50x.webp">etcdDistributed reliable key-value store for the most critical data of a distributed systemnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/ferretdb/logo-50x.webp">ferretdbA truly Open Source MongoDB alternativenpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/filebrowser/logo-50x.webp">filebrowser📂 Web File Browsernpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/fzf/logo-50x.webp">fzf🌸 A command-line fuzzy findernpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gitea/logo-50x.webp">giteaGit with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CDnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gocryptfs/logo-50x.webp">gocryptfsEncrypted overlay filesystem written in Gonpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gokapi/logo-50x.webp">gokapiLightweight self-hosted Firefox Send alternative without public upload. AWS S3 supported.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gotify/logo-50x.webp">gotifyA simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gotifyc/logo-50x.webp">gotifycA command line interface for pushing messages to gotify/server.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gotop/logo-50x.webp">gotopA terminal based graphical activity monitor inspired by gtop and vtopnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gotty/logo-50x.webp">gottyShare your terminal as a web applicationnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gptscript/logo-50x.webp">gptscriptNatural Language Programming.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/hugo/logo-50x.webp">hugoThe world’s fastest framework for building websites.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/incus/logo-50x.webp">incusPowerful system container and virtual machine managernpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/kopia/logo-50x.webp">kopiaCross-platform backup tool for Windows, macOS & Linux with fast, incremental backups, client-side end-to-end encryption, compression and data deduplication. CLI and GUI included.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/kubo/logo-50x.webp">kuboAn IPFS implementation in Gonpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/lazygit/logo-50x.webp">lazygitsimple terminal UI for git commandsnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/lf/logo-50x.webp">lfTerminal file managernpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/litefs/logo-50x.webp">litefsFUSE-based file system for replicating SQLite databases across a cluster of machinesnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/litestream/logo-50x.webp">litestreamStreaming replication for SQLite.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/loki/logo-50x.webp">lokiLike Prometheus, but for logs.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/mc/logo-50x.webp">mcThe Object Store for AI Data Infrastructure (client)npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/micro/logo-50x.webp">microA modern and intuitive terminal-based text editornpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/minio/logo-50x.webp">minioThe Object Store for AI Data Infrastructure (server)npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/natsd/logo-50x.webp">natsdHigh-Performance server for NATS.io, the cloud and edge native messaging system.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/ollama/logo-50x.webp">ollamaGet up and running with Llama 2, Mistral, Gemma, and other large language models.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/pocketbase/logo-50x.webp">pocketbaseOpen Source realtime backend in 1 filenpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/prometheus/logo-50x.webp">prometheusThe Prometheus monitoring system and time series database.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/pulumi/logo-50x.webp">pulumiPulumi - Infrastructure as Code in any programming language. Build infrastructure intuitively on any cloud using familiar languages 🚀npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/rclone/logo-50x.webp">rclonersync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Filesnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/restic/logo-50x.webp">resticFast, secure, efficient backup program.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/reviewdog/logo-50x.webp">reviewdog🐶 Automated code review tool integrated with any code analysis tools regardless of programming languagenpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/sftpgo/logo-50x.webp">sftpgoFully featured and highly configurable SFTP server with optional HTTP/S, FTP/S and WebDAV support - S3, Google Cloud Storage, Azure Blobnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/syncthing/logo-50x.webp">syncthingOpen Source Continuous File Synchronizationnpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/temporal/logo-50x.webp">temporalTemporal servicenpm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/tinygo/logo-50x.webp">tinygoGo compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/transfersh/logo-50x.webp">transfershEasy and fast file sharing from the command-line.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/weaviate/logo-50x.webp">weaviateWeaviate is an open source vector database that stores both objects and vectors, allowing for combining vector search with structured filtering with the fault-tolerance and scalability of a cloud-native database, all accessible through GraphQL, REST, and various language clients.npm
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/weed/logo-50x.webp">weedSeaweedFS is a fast distributed storage system for blobs, objects, files, and data lake, for billions of files! Blob store has O(1) disk seek, cloud tiering. Filer supports Cloud Drive, cross-DC active-active replication, Kubernetes, POSIX FUSE mount, S3 API, S3 Gateway, Hadoop, WebDAV, encryption, Erasure Coding.npm

Running unofficial apps

Gobot can run many apps hosted on github. Gobot will examine the releases and attempt to decipher binaries based on version, platform, and architecture.

gobot <user>/<repo>

Example

# Run PocketBase as a direct repo name
# rather than the `pocketbase` alias
gobot pocketbase/pocketbase --help

or API:

const bot = await gobot(`pocketbase/pocketbase`)
const exitCode = await bot.run([`--help`])

The above command format may run the app you have in mind. If it doesn't and you want more information, use

gobot inspect <user>/<repo>

As long as the project uses the github Releases feature and includes statically linked binaries with zero dependencies, Gobot can probably run it.

Go apps work flawlessly, if the releases are named well. Gobot was originally named and conceived to support Go apps.

Getting Help

Join our Discord community.

Why?

If you are writing a nodejs application that depends upon binaries being present (like PocketHost does), you can add this package as a dependency and execute the binary via CLI or programmatically. This package will make sure your desired external binaries are always available.

If you just want to grab a binary quickly for your own use, npx gobot@latest <app> is quite a bit easier than manually downloading zips and installing binaries in shell paths. Gobot handles it all for you effortlessly.

Adding your app to the Gobot registry

We want to add native support for lots of binary apps!

If you use publish statically linked binary releases on github, you are already 98% compatible with Gobot. In fact, Gobot may already know how to work with it.

To see what initial support looks like:

npx gobot inspect <user>/<repo>

This will index all the releases from your repo and show you exactly what Gobot sees.

If you see everything you expect, you're golden. If things are missing, it may mean some custom programming. Either way, jump on Discord and let us know your results.

If you have the flexibility or are starting a new project, make sure your release names follows these rules:

Note: GoReleaser is a great option if you're publish a Go-based project.

Contributing

We could use help testing and making sure this works across lots of platforms.

To test a build locally:

pnpm test