Installation
Install script (Linux and macOS)
curl -fsSL https://raw.githubusercontent.com/jorqensen/obtain/main/install.sh | shThe script detects your OS and architecture, downloads the matching binary from the latest GitHub release, verifies its checksum and installs it to ~/.local/bin/obtain. If that directory isn't on your PATH, it tells you how to add it.
Two environment variables adjust it:
| Variable | Description | Default |
|---|---|---|
OBTAIN_VERSION | Install a specific version, e.g. v0.1.0 | latest |
OBTAIN_INSTALL_DIR | Directory to install the binary into | ~/.local/bin |
curl -fsSL https://raw.githubusercontent.com/jorqensen/obtain/main/install.sh | OBTAIN_VERSION=v0.1.0 shWindows
The install script doesn't support Windows, so download the obtain_<version>_windows_<arch>.zip from the releases page and put obtain.exe in a directory on your PATH. Windows has no standard per-user bin directory, so create one. %LOCALAPPDATA%\Programs\obtain is a good choice, since it needs no admin rights.
In PowerShell (use amd64 or arm64 to match your machine, and set the version you want):
$version = "0.1.0"
$arch = "amd64"
$dir = "$env:LOCALAPPDATA\Programs\obtain"
Invoke-WebRequest "https://github.com/jorqensen/obtain/releases/download/v$version/obtain_${version}_windows_$arch.zip" -OutFile "$env:TEMP\obtain.zip"
Expand-Archive "$env:TEMP\obtain.zip" -DestinationPath $dir -Force
Remove-Item "$env:TEMP\obtain.zip"
# Add the directory to your user PATH (once)
$path = [Environment]::GetEnvironmentVariable("Path", "User")
if ($path -notlike "*$dir*") {
[Environment]::SetEnvironmentVariable("Path", "$path;$dir", "User")
}Open a new terminal afterwards, since existing ones don't pick up the changed PATH. Then check with obtain --version.
The default config location is $XDG_CONFIG_HOME/obtain/config.yaml, falling back to ~/.config/obtain/config.yaml, which on Windows is %USERPROFILE%\.config\obtain\config.yaml.
With Go
go install github.com/jorqensen/obtain@latestManual download
Prebuilt binaries for Linux, macOS and Windows (amd64, arm64) are attached to each GitHub release. Extract the archive and put obtain somewhere on your PATH.