Golang binaries compiled on-demand for your system

Overview

Go Binaries

Go Binaries is an on-demand binary server, allowing non-Go users to quickly install tools written in Go without installing go itself, and removing the burden of cross-compiling and uploading dozens of binaries for every command-line you write.

On-demand Go binary example

Usage

Install PKG with optional semver VERSION.

curl -sf https://gobinaries.com/<PKG>[@VERSION] | sh

Install PKG with optional semver VERSION to the given directory PREFIX. By default /usr/local/bin is used.

curl -sf https://gobinaries.com/<PKG>[@VERSION] | PREFIX=/tmp sh

The github.com path prefix is optional.

Examples

Install the hey HTTP benchmarking tool:

curl -sf https://gobinaries.com/rakyll/hey | sh

Install the wuzz HTTP client:

curl -sf https://gobinaries.com/asciimoo/wuzz | sh

Install the latest version of staticgen:

curl -sf https://gobinaries.com/tj/staticgen/cmd/staticgen | sh

Install the latest 1.x major version of staticgen:

curl -sf https://gobinaries.com/tj/staticgen/cmd/[email protected] | sh

Install the v1.0.0 version of triage:

curl -sf https://gobinaries.com/tj/triage/cmd/[email protected] | sh

Semver support

The following semver patterns are supported:

  • Exact version: v1.2.3, 1.2.3
  • Wildcards: v1.x, v1.2.x, 1.x, 1.2.x
  • Wildcards (implicit): v1, v1.2, 1.2
  • Leading v is optional, regardless of the Git tag

How does it work?

Take for example you want to install @rakyll's fantastic HTTP benchmarking tool hey, to install the latest release you would run:

curl -sf https://gobinaries.com/rakyll/hey | sh

This request fetches the latest tag from GitHub and responds with a shell script which performs a second request, populated with the resolved version and architecture as shown here:

https://gobinaries.com/binary/github.com/rakyll/hey?os=darwin&arch=amd64&version=v0.1.3

The response of this request is a Golang binary compiled for the requested os, architecture, and package version. The result is cached in a CDN for subsequent requests.

Limitations

  • The Go package must compile in under 100 seconds (CDN limitation)
  • The Go package must have at least one Git tag

FAQ

What's wrong with go-get? Using go-get for installation is fine if you're a Go user, however, if you're creating programs which are designed to be used by a wider audience it's unlikely they will have Go installed.
Which version of Go is used? Currently Go 1.13.x via the official golang:1.13 Docker image.

GoDoc

Sponsors

Sponsors

This project is sponsored by CTO.ai, making it easy for development teams to create and share workflow automations without leaving the command line.

And my GitHub sponsors:

Issues
  • Add support for +v2 modules

    Add support for +v2 modules

    This adds support to Go packages that have versions above v2. Similar to go get the /v2 major version has to be declared when making the package build request:

    Usage:

    # Explicit +v2 version
    curl -sf 'http://localhost:3000/nats-io/[email protected]' | PREFIX=. sh
    
    # Resolved version gets v2 from master
    curl -sf 'http://localhost:3000/nats-io/nats-server' | PREFIX=. sh
    
    # Explicit v1 version
    curl -sf 'http://localhost:3000/nats-io/[email protected]' | PREFIX=. sh
    
    # v2 nested modules too 🎉 
    curl -sf 'http://localhost:3000/caddyserver/caddy/cmd/caddy' | PREFIX=. sh
    

    If the major version is not specified in the path, similar to go get and go modules, it will fallback to the v1 version of the package (even if the actual latest version is higher).

    curl --output - 'http://127.0.0.1:3000/binary/github.com/nats-io/nats-server?os=darwin&arch=amd64&version=v2.1.6' > my-nats-v1
    ./my-nats-v1 
    [98946] 2020/05/07 16:54:40.726190 [INF] Starting nats-server version 1.4.1
    

    Fixes #10

    Signed-off-by: Waldemar Quevedo [email protected]

    opened by wallyqs 13
  • adds a goproxy resolver

    adds a goproxy resolver

    Currently we've hardcoded the proxy, this is just a wip for now and will be configurable from the root.

    This is just a resolver for now to make sure that the code style, errors, and the small refactors look good here.

    The future direction of this would to be to attempt to use the goproxy resolver and then failing that, fall back to GitHub (but open to suggestions here).

    Please open an issue and discuss changes before spending time on them, unless the change is trivial or an issue already exists.

    opened by zachgersh 5
  • Chain of trust

    Chain of trust

    Feel free to ignore this issue, but I would like to understand what is the chain of trust of this installation method.

    Why should I trust this in ANY way? What you are building here is a rootkit as a service, piped through sudo sh.

    I know the immediate answer would be "If you don't trust this, do not use it", but there may be users without the expertise to understand the risks of using your product.

    Would you mind to add a disclaimer to the README explaining that using your product means the user is fully trusting you not being a malicious entity?

    opened by crisidev 5
  • Execute install without sudo

    Execute install without sudo

    Prerequisites

    • [x] I searched to see if the issue already exists.

    Description

    I would like users to be able to install binaries with sudo, I just want to throw the binary in the current working directory.

    Fantastic work on this @tj this is going to make a HUGE difference for my project. I want users to get up and running quickly, convincing them to install Go before trying out Pion is sometimes a hurdle :)

    Steps to Reproduce

    curl -sf https://gobinaries.com/github.com/pion/example-webrtc-applications/twitch | PREFIX='pwd' sh wants root access when it doesn't need it.

    Maybe you can make this conditional? sudo being the default still works for me!

    Slack

    Join us on Slack https://chat.apex.sh/

    opened by Sean-Der 5
  • Setting CGO_ENABLED=0

    Setting CGO_ENABLED=0

    This makes the binaries fully static also on Linux/amd64 so they work on Alpine too. Should fix #4

    To address the biggest concern: yes, this makes it impossible to build binaries that have dependencies on native code (CGo). This should not really be an issue, however: gobinaries is designed for cross-compilation, which means CGo wasn't usable before anyways. In fact, CGO_ENABLED is already disabled when cross-compiling; this PR disables it for Linux/amd64 too.

    opened by ItalyPaleAle 4
  • Missing detailed error message on 500 response

    Missing detailed error message on 500 response

    Prerequisites

    • [x] I searched to see if the issue already exists.

    Description

    Got Error downloading, got 500 response from server but don't know what went wrong exactly.

    Steps to Reproduce

    curl -sf https://gobinaries.com/juicedata/juicesync | sh
    
      ==> Downloading github.com/juicedata/[email protected]
      ==> Resolved version master to v0.1.0
      ==> Downloading binary for darwin amd64
    
      Error downloading, got 500 response from server
    

    Slack

    Join us on Slack https://chat.apex.sh/

    opened by yujunz 3
  • Error downloading, got 500 response from server

    Error downloading, got 500 response from server

    Prerequisites

    • [x] I searched to see if the issue already exists.

    Description

    When I try to install my cli tool I get this error:

    $ curl -sf https://gobinaries.com/montanaflynn/gocr/cmd/gocr | sh
      ==> Downloading github.com/montanaflynn/gocr/cmd/[email protected]
      ==> Resolved version master to v0.1.0
      ==> Downloading binary for darwin amd64
    
      Error downloading, got 500 response from server
    

    Building locally works: go build ./cmd/gocr

    Steps to Reproduce

    curl -sf https://gobinaries.com/montanaflynn/gocr/cmd/gocr | sh

    opened by montanaflynn 2
  • Ability to build binaries not in root directory

    Ability to build binaries not in root directory

    Prerequisites

    • [x] I searched to see if the issue already exists.

    Description

    Not all projects have their main.go in the root; I would love to see some way to allow projects to specify where the entrypoint is using a .gobinaries file or something!

    Steps to Reproduce

    > curl -sf https://gobinaries.com/suborbital/hivew | sh
    
      ==> Downloading github.com/suborbital/[email protected]
      ==> Resolved version master to v0.0.1
      ==> Downloading binary for darwin amd64
    
      Error downloading, got 500 response from server
    

    Slack

    Join us on Slack https://chat.apex.sh/

    opened by cohix 2
  • Internal Server Error

    Internal Server Error

    https://github.com/evanw/esbuild/issues/66

    https://gobinaries.com/binary/github.com/evanw/esbuild?os=darwin&arch=amd64&version=v0.3.9
    

    Internal Server Error

    opened by suconghou 1
  •  escape sequence with arrow prompt in zsh shell during downloading event

    escape sequence with arrow prompt in zsh shell during downloading event

    Prerequisites

    • [x] I searched to see if the issue already exists. Yes

    Description

    Escape sequence with arrow in zsh shell during downloading event
    ╭─[email protected] ~
    ╰─➤ curl -sf https://gobinaries.com/asciimoo/wuzz | sh

    \x1b[38;5;61m ==>\x1b[0;00m Downloading github.com/asciimoo/[email protected] \x1b[38;5;61m ==>\x1b[0;00m Resolved version master to v0.4.0 \x1b[38;5;61m ==>\x1b[0;00m Downloading binary for linux amd64 \x1b[38;5;61m ==>\x1b[0;00m Installing wuzz to /usr/local/bin \x1b[38;5;61m ==>\x1b[0;00m Installation complete

    Attached a screenshot.

    Steps to Reproduce

    Tested with zsh shell. Still not sure if any fancy package missing from my side. gobinaries

    Slack

    Ok Join us on Slack https://chat.apex.sh/

    opened by SachinMaharana 1
  • Usage doesn't require sudo

    Usage doesn't require sudo

    Prerequisites

    • [x] I searched to see if the issue already exists.

    Description

    I tried the usage examples from the README, it always failed if I used it like so:

    λ ahmgeek [~] → curl -sf https://gobinaries.com/rakyll/hey | sudo sh
    Password:
    [3]  + 63329 done                   curl -sf https://gobinaries.com/rakyll/hey |
           63330 suspended (tty input)  sudo sh
    

    The prompt for the password exited immediately

    Fix

    It worked without sudo

    λ ahmgeek [~] → curl -sf https://gobinaries.com/rakyll/hey | sh
    
      ==> Downloading github.com/rakyll/[email protected]
      ==> Resolved version master to v0.1.3
      ==> Downloading binary for darwin amd64
      ==> Installing hey to /usr/local/bin
    Password:
      ==> Installation complete
    

    Maybe remove it from the README ?

    opened by ahmgeek 0
  • is there a way to set CGO_ENABLED dynamically?

    is there a way to set CGO_ENABLED dynamically?

    Prerequisites

    • [x] I searched to see if the issue already exists.

    Description

    I am receiving the error Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work.

    Steps to Reproduce

    $ curl -sf https://gobinaries.com/hyperyuri/wallet-cli | sh
    
    $ wallet-cli
    

    Slack

    Join us on Slack https://chat.apex.sh/

    opened by hyperyuri 0
  • Error downloading, got 500 response from server

    Error downloading, got 500 response from server

    Prerequisites

    • [x] I searched to see if the issue already exists.

    Description/Steps to Reproduce

    curl -sf https://gobinaries.com/tj/robo | sh
    
      ==> Downloading github.com/tj/[email protected]
      ==> Resolved version master to v0.7.0
      ==> Downloading binary for darwin arm64
    
      Error downloading, got 500 response from server
    
    opened by safareli 5
  • How to uninstall software installed by gobinaries /missing docs

    How to uninstall software installed by gobinaries /missing docs

    Hi, I just installed a piece of software and it magically works. However I did not find any documentation on how to change (update, uninstall) software installed by gobinaires. Of course I can just remove the binary from my filesystem, but are there any leftovers then? Also it would be nice if there was a piece of documentation on this (what happens on my system when I install an app? How do I remove/update it?).

    opened by peteole 3
  • Support Windows through powershell

    Support Windows through powershell

    I created a powershell version of the script that works reasonably well. I think this could be released as some kind of alpha.

    Basically two changes:

    1. Add an install.ps1 template file
    2. Create a conditional at the endpoint that generates the script that detects if the user agent is a powershell and if so, renders the renderization of the install.ps1 template.

    Closes #2

    opened by mniak 2
  • bump to golang 1.16

    bump to golang 1.16

    closes #36 closes https://github.com/datacharmer/dbdeployer/issues/132

    Just copying off d62cc321d3781fd3f04babc98e37f4fb009ec249

    Please open an issue and discuss changes before spending time on them, unless the change is trivial or an issue already exists.

    opened by grooverdan 7
GoReleaser builds Go binaries as fast and easily as possible

GoReleaser builds Go binaries for several platforms, creates a GitHub release and then pushes a Homebrew formula to a tap repository. All that wrapped in your favorite CI.

GoReleaser 10.4k Aug 7, 2022
Embed static files in Go binaries (replacement for gobuffalo/packr)

Pkger github.com/markbates/pkger is a tool for embedding static files into Go binaries. It will, hopefully, be a replacement for github.com/gobuffalo/

Mark Bates 1.2k Jul 27, 2022
Package binaries for different operating systems in a single script, executable everywhere.

CrossBin Packages MacOS, Linux and Windows binaries, into a single script that is executable everywhere and executes the correct binary for the system

null 2 Dec 14, 2021
CBuild build system - A tiny build system for C

cuild - CBuild A build system for C Building $ go build . Usage Similar to GNU Make, a file named "Cuildfile" is required. You have a few flags to us

Laurentino Luna 0 Jan 17, 2022
Blueprint Build System For Golang

Blueprint Build System Blueprint is being archived on 2021 May 3. On 2021 May 3, we will be archiving the Blueprint project. This means it will not be

GengKapak WIP 0 Nov 20, 2021
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.

#1 Golang live reload and task runner Content - ⭐️ Top Features - ???? Get started - ?? Config sample - ?? Commands List - ?? Support and Suggestions

Oxequa 4.3k Jul 30, 2022
go language generics system

Gotgo This document describes the third iteration of my attempt at a reasonable implementation of generics for go based on the idea of template packag

David Roundy 119 Dec 4, 2021
Build system and task runner for Go projects

Gilbert is task runner that aims to provide declarative way to define and run tasks like in other projects like Gradle, Maven and etc.

Gilbert 101 Jun 28, 2022
A Distributed Continuous Integration System from MongoDB

Evergreen Evergreen is a distributed continuous integration system built by MongoDB. It dynamically allocates hosts to run tasks in parallel across ma

Evergreen 356 Jul 28, 2022
Please is a cross-language high-performance extensible build system for reproducible multi-language builds.

Please is a cross-language build system with an emphasis on high performance, extensibility and reproducibility. It supports a number of popular languages and can automate nearly any aspect of your build process.

Thought Machine 2.1k Jul 28, 2022
🚀 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file.

gowatch 中文文档 gowatch is a command line tool that builds and (re)starts your go project everytime you save a Go or template file. Installation To insta

silenceper 716 Aug 4, 2022
packM 🧬 is fivem resource compiler for golang with the power of golang+typescript+webpack

packM ?? packM ?? is fivem resource compiler for golang ,typescript with the power of golang+typescript compiler+webpack

normalM 2 Jun 28, 2022
Various tools for usage with Golang like installer, github tool and cloud features.

Gopei2 (Go Programming Environment Installer) Gopei shell install Go compiler, LiteIDE and configure for you the entire environment, variables, paths,

George Calianu 100 May 23, 2022
Small golang app to assist in managing extended hdwallet keys

Installation go install github.com/provenance-io/extkey/cmd/[email protected] Encoding Key generation interactive # Using interactive mode ▷▷ extkey Mne

Provenance Blockchain, Inc. 2 Jan 4, 2022
Scan and analyze OSS dependencies and licenses from compiled Go binaries

golicense - Go Binary OSS License Scanner golicense is a tool that scans compiled Go binaries and can output all the dependencies, their versions, and

Mitchell Hashimoto 627 Jul 27, 2022
📦 An independent package manager for compiled binaries.

stew An independent package manager for compiled binaries. Features Easily distribute binaries across teams and private repositories. Get the latest r

Marwan Hawari 98 Jul 27, 2022
Live on-demand transcoding in go using ffmpeg. Also with NVIDIA GPU hardware acceleration.

Go live HTTP on-demand transcoding Transcoding is expensive and resource consuming operation on CPU and GPU. For big companies with thousands of custo

Miroslav Šedivý 93 Jul 22, 2022
Tiny binary serializer and deserializer to create on demand parsers and compilers

Parco Hobbyist binary compiler and parser built with as less reflection as possible, highly extensible and with zero dependencies. There are plenty pa

Marquitos 14 Mar 3, 2022
Nydus-snapshotter - A containerd snapshotter with capability of on-demand read

Nydus Snapshotter Nydus-snapshotter is a non-core sub-project of containerd. Pul

containerd 38 Jul 28, 2022
log on demand for Go.

logondemand log on demand for Go.

chuqq 0 Feb 14, 2022
Cyber Stasis is an economic simulator in the form of a fictional game based on global real-time demand and supply.

Cyber Stasis Cyber Stasis is an economic simulator in the form of a fictional game based on global real-time demand and supply. How to Play The game r

Stateless Minds 83 Jul 22, 2022
DockerSlim (docker-slim): Don't change anything in your Docker container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)

Minify and Secure Docker containers (free and open source!) Don't change anything in your Docker container image and minify it by up to 30x making it

docker-slim 14.1k Jul 29, 2022
GoDynamic can load and run Golang dynamic library compiled by -buildmode=shared -linkshared

GoDynamic can load and run Golang dynamic library compiled by -buildmode=shared -linkshared How does it work? GoDynamic works like a dynamic

pkujhd 7 Apr 13, 2022
Powerful and versatile MIME sniffing package using pre-compiled glob patterns, magic number signatures, XML document namespaces, and tree magic for mounted volumes, generated from the XDG shared-mime-info database.

mimemagic Powerful and versatile MIME sniffing package using pre-compiled glob patterns, magic number signatures, xml document namespaces, and tree ma

Ronen Ulanovsky 76 Jul 14, 2022
Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. https://vlang.io

The V Programming Language vlang.io | Docs | Changelog | Speed | Contributing & compiler design Key Features of V Simplicity: the language can be lear

The V Programming Language 30.1k Aug 7, 2022
👩🏼‍💻A simple compiled programming language

The language is written in Go and the target language is C. The built-in library is written in C too

paco 26 Jul 22, 2022
Simple, safe and compiled programming language.

The X Programming Language Simple, safe and compiled programming language. Table of Contents Overview OS Support Contributing License Overview The X p

The X Programming Language 28 Jul 19, 2022
🛡 Several domain lists compiled into a database file used by V2Ray.

Domain list database This project is pulled from v2fly/domain-list-community, with only its data changed to use several blocklists. Purpose of this pr

Lightingale Community Open Source Software 1 May 22, 2022