Awesome
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
- Run any version of official apps and many unofficial apps from github.
- Binaries are intelligently downloaded and cached
- New binary versions are automatically detected and downloaded
- Efficient - downloads only what is needed
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:
Name | Default | Discussion |
---|
--g-version | | output the version number |
--g-v | true | Show informational output |
--g-vv | false | Show even more output |
--g-vvv | false | Show even more output |
--g-cache-path | host specific | The 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
Name | Default | Discussion |
---|
--g-use-version | * | Run a specific binary version (format: x.y.z semver or x.y.* semver range) |
--g-os | host specific | Specify OS/Platform |
--g-arch | host specific | Specify 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
Name | Default | Discussion |
---|
--g-use-version | latest | Download a specific binary version (format: x.y.z semver or x.y.* semver range) |
--g-os | host specific | Specify OS/Platform |
--g-arch | host specific | Specify OS/Platform |
--g-force | false | Force 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"> | act | Run your GitHub Actions locally 🚀 | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/AdGuardHome/logo-50x.webp"> | AdGuardHome | Network-wide ads & trackers blocking DNS server | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/age/logo-50x.webp"> | age | A 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"> | aperture | Rate limiting, caching, and request prioritization for modern workloads | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/backrest/logo-50x.webp"> | backrest | Backrest 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"> | caddy | Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/centrifugo/logo-50x.webp"> | centrifugo | Scalable 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"> | chezmoi | Manage 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"> | constellation | Constellation 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"> | croc | Easily 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"> | cue | The home of the CUE language! Validate and define text-based and dynamic configuration | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/dasel/logo-50x.webp"> | dasel | Select, 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"> | dnscryptproxy | dnscrypt-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"> | duf | Disk Usage/Free Utility - a better 'df' alternative | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/etcd/logo-50x.webp"> | etcd | Distributed reliable key-value store for the most critical data of a distributed system | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/ferretdb/logo-50x.webp"> | ferretdb | A truly Open Source MongoDB alternative | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/filebrowser/logo-50x.webp"> | filebrowser | 📂 Web File Browser | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/fzf/logo-50x.webp"> | fzf | 🌸 A command-line fuzzy finder | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gitea/logo-50x.webp"> | gitea | Git 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/CD | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gocryptfs/logo-50x.webp"> | gocryptfs | Encrypted overlay filesystem written in Go | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gokapi/logo-50x.webp"> | gokapi | Lightweight 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"> | gotify | A 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"> | gotifyc | A 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"> | gotop | A terminal based graphical activity monitor inspired by gtop and vtop | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gotty/logo-50x.webp"> | gotty | Share your terminal as a web application | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/gptscript/logo-50x.webp"> | gptscript | Natural Language Programming. | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/hugo/logo-50x.webp"> | hugo | The 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"> | incus | Powerful system container and virtual machine manager | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/kopia/logo-50x.webp"> | kopia | Cross-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"> | kubo | An IPFS implementation in Go | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/lazygit/logo-50x.webp"> | lazygit | simple terminal UI for git commands | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/lf/logo-50x.webp"> | lf | Terminal file manager | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/litefs/logo-50x.webp"> | litefs | FUSE-based file system for replicating SQLite databases across a cluster of machines | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/litestream/logo-50x.webp"> | litestream | Streaming replication for SQLite. | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/loki/logo-50x.webp"> | loki | Like Prometheus, but for logs. | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/mc/logo-50x.webp"> | mc | The 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"> | micro | A modern and intuitive terminal-based text editor | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/minio/logo-50x.webp"> | minio | The 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"> | natsd | High-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"> | ollama | Get 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"> | pocketbase | Open Source realtime backend in 1 file | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/prometheus/logo-50x.webp"> | prometheus | The 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"> | pulumi | Pulumi - 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"> | rclone | rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/restic/logo-50x.webp"> | restic | Fast, 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 language | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/sftpgo/logo-50x.webp"> | sftpgo | Fully featured and highly configurable SFTP server with optional HTTP/S, FTP/S and WebDAV support - S3, Google Cloud Storage, Azure Blob | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/syncthing/logo-50x.webp"> | syncthing | Open Source Continuous File Synchronization | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/temporal/logo-50x.webp"> | temporal | Temporal service | npm |
<img src="https://raw.githubusercontent.com/benallfree/gobot/v1.0.0-alpha.41/src/apps/tinygo/logo-50x.webp"> | tinygo | Go 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"> | transfersh | Easy 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"> | weaviate | Weaviate 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"> | weed | SeaweedFS 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:
- Ends in
.zip
, .tgz
, .tar.gz
, .bz2
- Include the version (semver recommended)
- Include the platform (
freebsd
, darwin
, linux
, win32
)
- Include the architecture (
arm64
, x64
, ia32
, arm
)
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