1.0.0-alpha.36 • Published 22 days ago

gobot v1.0.0-alpha.36

Weekly downloads
-
License
ISC
Repository
github
Last release
22 days ago

Gobot

npm.io npm.io npm.io npm.io

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`)
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,
})
bot.run([`--help`])

Use a specific version of a Gobot app

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

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`)
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 fresh release information and display. 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-version*Download 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 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 52 apps using bin names. They also have npm helper packages to assist with version locking.

          <app>What is it?
actRun your GitHub Actions locally 🚀npm
AdGuardHomeNetwork-wide ads & trackers blocking DNS servernpm
ageA simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.npm
apertureRate limiting, caching, and request prioritization for modern workloadsnpm
backrestBackrest is a web UI and orchestrator for restic backup.npm
caddyFast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPSnpm
centrifugoScalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably. Set up once and forever.npm
chezmoiManage your dotfiles across multiple diverse machines, securely.npm
constellationConstellation is the first Confidential Kubernetes. Constellation shields entire Kubernetes clusters from the (cloud) infrastructure using confidential computing.npm
crocEasily and securely send things from one computer to another :crocodile: :package:npm
cueThe home of the CUE language! Validate and define text-based and dynamic configurationnpm
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
dnscryptproxydnscrypt-proxy 2 - A flexible DNS proxy, with support for encrypted DNS protocols.npm
dufDisk Usage/Free Utility - a better 'df' alternativenpm
etcdDistributed reliable key-value store for the most critical data of a distributed systemnpm
ferretdbA truly Open Source MongoDB alternativenpm
filebrowser📂 Web File Browsernpm
fzf🌸 A command-line fuzzy findernpm
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
gocryptfsEncrypted overlay filesystem written in Gonpm
gokapiLightweight self-hosted Firefox Send alternative without public upload. AWS S3 supported.npm
gotifyA simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)npm
gotifycA command line interface for pushing messages to gotify/server.npm
gotopA terminal based graphical activity monitor inspired by gtop and vtopnpm
gottyShare your terminal as a web applicationnpm
gptscriptNatural Language Programming.npm
hugoThe world’s fastest framework for building websites.npm
incusPowerful system container and virtual machine managernpm
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
kuboAn IPFS implementation in Gonpm
lazygitsimple terminal UI for git commandsnpm
lfTerminal file managernpm
litestreamStreaming replication for SQLite.npm
lokiLike Prometheus, but for logs.npm
mcThe Object Store for AI Data Infrastructure (client)npm
microA modern and intuitive terminal-based text editornpm
minioThe Object Store for AI Data Infrastructure (server)npm
natsdHigh-Performance server for NATS.io, the cloud and edge native messaging system.npm
ollamaGet up and running with Llama 2, Mistral, Gemma, and other large language models.npm
pocketbaseOpen Source realtime backend in 1 filenpm
prometheusThe Prometheus monitoring system and time series database.npm
pulumiPulumi - Infrastructure as Code in any programming language. Build infrastructure intuitively on any cloud using familiar languages 🚀npm
rclonersync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Filesnpm
resticFast, secure, efficient backup program.npm
reviewdog🐶 Automated code review tool integrated with any code analysis tools regardless of programming languagenpm
sftpgoFully featured and highly configurable SFTP server with optional HTTP/S, FTP/S and WebDAV support - S3, Google Cloud Storage, Azure Blobnpm
syncthingOpen Source Continuous File Synchronizationnpm
temporalTemporal servicenpm
tinygoGo compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.npm
transfershEasy and fast file sharing from the command-line.npm
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
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`)
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
1.0.0-alpha.36

22 days ago

1.0.0-alpha.35

23 days ago

1.0.0-alpha.34

1 month ago

1.0.0-alpha.33

1 month ago

1.0.0-alpha.30

1 month ago

1.0.0-alpha.32

1 month ago

1.0.0-alpha.31

1 month ago

1.0.0-alpha.27

1 month ago

1.0.0-alpha.26

1 month ago

1.0.0-alpha.29

1 month ago

1.0.0-alpha.28

1 month ago

1.0.0-alpha.25

1 month ago

1.0.0-alpha.23

1 month ago

1.0.0-alpha.24

1 month ago

1.0.0-alpha.19

2 months ago

1.0.0-alpha.21

2 months ago

1.0.0-alpha.20

2 months ago

1.0.0-alpha.16

2 months ago

1.0.0-alpha.15

2 months ago

1.0.0-alpha.18

2 months ago

1.0.0-alpha.17

2 months ago

1.0.0-alpha.22

2 months ago

1.0.0-alpha.14

2 months ago

1.0.0-alpha.12

2 months ago

1.0.0-alpha.13

2 months ago

1.0.0-alpha.10

2 months ago

1.0.0-alpha.11

2 months ago

1.0.0-alpha.9

2 months ago

1.0.0-alpha.7

2 months ago