Install
bytheway supports two install methods: a pre-built binary served from this docs site (no Go toolchain required), and go install from source.
Pre-built binary
Section titled “Pre-built binary”curl -fsSL https://jvcorredor.github.io/bytheway/install.sh | shThe script downloads the platform-appropriate tarball and checksums.txt from the matching GitHub Release, verifies the SHA256 of the tarball against the manifest, and extracts the btw binary into the install directory. It does not edit any shell rc files.
Environment-variable overrides
Section titled “Environment-variable overrides”| Variable | Default | Notes |
|---|---|---|
INSTALL_DIR | $HOME/.local/bin | Destination directory. Use /usr/local/bin for a system-wide install. |
VERSION | latest GitHub release | Pin to a specific release tag, e.g. VERSION=0.2.0 (leading v optional). |
INSTALL_DIR=/usr/local/bin curl -fsSL https://jvcorredor.github.io/bytheway/install.sh | sudo shVERSION=0.2.0 curl -fsSL https://jvcorredor.github.io/bytheway/install.sh | shSupported platforms
Section titled “Supported platforms”linux/amd64, linux/arm64, darwin/amd64, darwin/arm64. Other platforms abort with a clear error; build from source instead.
$PATH setup
Section titled “$PATH setup”If the install directory is not on your $PATH, the script prints a one-line snippet you can paste into your shell config — export PATH="$HOME/.local/bin:$PATH" for bash/zsh/sh, fish_add_path $HOME/.local/bin for fish. The script never edits rc files itself.
Checksum verification
Section titled “Checksum verification”The script downloads checksums.txt from the same release and compares the SHA256 of the tarball against the entry for the platform-specific filename. A mismatch aborts with a non-zero exit and a clear error; nothing is installed in that case.
Re-running the script
Section titled “Re-running the script”If a btw binary already lives at the destination, the script reads its version with btw version and prints Upgrading bytheway from X to Y when the resolved version differs.
macOS quarantine note
Section titled “macOS quarantine note”Tarballs downloaded through a browser get the com.apple.quarantine extended attribute, which makes Gatekeeper block the binary on first run. The install script downloads via curl and is unaffected. If you fetched the tarball manually instead, clear the attribute once before running:
xattr -dr com.apple.quarantine ./bythewayFrom source (go install)
Section titled “From source (go install)”go install github.com/jvcorredor/bytheway@latestRequires a Go toolchain. The binary lands in $GOBIN (or $GOPATH/bin) as bytheway — go install derives the executable name from the last element of the module path and offers no flag to override it. Pin a specific version with @v0.2.0. Module-mode go install does the same SHA verification as any other Go module download.
If you want to invoke it as btw, add a shell alias:
# bash / zsh — in ~/.bashrc or ~/.zshrcalias btw=bytheway
# fish — persists as ~/.config/fish/functions/btw.fishalias --save btw=bythewayFor a real btw executable on disk (no alias indirection), use the pre-built binary install method instead — the release tarball ships the binary as btw.