Git Product home page Git Product logo

gobot's Introduction

Gobot

The binary package manager for Node

Manage and run popular binaries as package.json dependencies. CLI and API interfaces.

Introduction

gobot installs popular 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 supported apps and many unsupported 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

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

# Run unofficial binaries from github
gobot <user>/<repo> --help

or

npx gobot <app>

Official Gobot Apps

           <app> What is it?
act Run your GitHub Actions locally 🚀
gobot docs
readme
AdGuardHome Network-wide ads & trackers blocking DNS server
gobot docs
readme
caddy Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
gobot docs
readme
mc The Object Store for AI Data Infrastructure (client)
gobot docs
readme
minio The Object Store for AI Data Infrastructure (server)
gobot docs
readme
pocketbase Open Source realtime backend in 1 file
gobot docs
readme
pulumi Pulumi - Infrastructure as Code in any programming language. Build infrastructure intuitively on any cloud using familiar languages 🚀
gobot docs
readme
rclone rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files
gobot docs
readme
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.
gobot docs
readme

Running unofficial apps

gobot can run many apps hosted on github, without official support.

gobot <user>/<repo>

Example

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

or API:

gobot(`pocketbase/pocketbase`).run([`--help`])

The above command format may run the app you have in mind. For example, gobot caddy --help runs the Caddy by the official name, but gobot caddyserver/caddy --help will also run it.

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. gobot was originally named and conceived to support Go apps.

CLI

gobot [gobotOptions] <app> [appOptions]

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.

Option Default Discussion
--g-help Show help Display help and options for Gobot
--g-os host OS aix, darwin, freebsd,linux, openbsd, sunos, and win32
--g-arch host arch arm, arm64, ia32, loong64, mips, mipsel, ppc, ppc64, riscv64, s390, s390x, and x64
--g-v[vv] Adjust output verbosity
--g-download false Download all matching versions and exit
--g-refresh false Clear the gobot cache
--g-use-version latest Run a specific binary version, in semver format x.y.z. Also supports semver ranges 0.20.*
--g-cache-path host specific Use the specified directory for cache files.

Examples

# Run `pocketbase serve`
npx gobot pocketbase serve

# Run in gobot debugging mode`
npx gobot --g-debug

# Run a specific PocketBase version
npx gobot pocketbase --g-version="0.21.0" # Run this exact version
npx gobot pocketbase --g-version="~0.21.0" # Run highest 0.21.z version
npx gobot pocketbase --g-version="0.*" # Run highest 0.y.z

# Force gobot to dump cache and refresh PocketBase tags and binaries
npx gobot pocketbase --g-refresh

API

gobot can be used programmatically. You can add gobot as a dependency of your nodejs package and benefit from the seamless management of binary dependencies.

import { gobot } from 'gobot'

const bot = gobot(`pocketbase`)
const childProcess = bot.run([`serve`])

Full API Docs

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.

OS X Users

If a Gobot does not run, or one of its apps does not run, it's likely you need to authorize it first. Go to Security & Privacy and scroll down to allow the exception.

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 compatible with Gobot. Send us a PR.

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

gobot's People

Contributors

benallfree avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.