Install

sq can be installed from source, via an install script, or via package managers for various platforms.

Quick install

Use install.sh in most cases other than Windows.

/bin/sh -c "$(curl -fsSL https://sq.io/install.sh)"

install.sh determines what OS is in use, and attempts to use an appropriate package manager. The following have been tested:

Package ManagerOS / DistributionArchitecture
aptDebian-based (Ubuntu etc.)arm64 amd64
yumRPM-based (Rocky Linux, Fedora etc.)arm64 amd64
apkAlpine Linuxarm64 amd64
pacmanArch Linuxamd64
yayArch Linuxamd64
xbpsVoid Linuxarm64 amd64
brewmacOSarm64 amd64
brewLinuxarm64

You can view the source for install.sh on GitHub.

Shell completion

The install packages will generally install shell completion. Note that sq provides extensive completion functionality. If installing from source, it is highly recommended to manually install shell completion. For instructions:

sq completion --help

Source

Requires Go.

go install github.com/neilotoole/sq

Binaries

Pre-built binaries are available from GitHub releases.

macOS

brew install neilotoole/sq/sq

Windows

Requires scoop.

scoop bucket add sq https://github.com/neilotoole/sq
scoop install sq

Linux

Generally you can use install.sh.

/bin/sh -c "$(curl -fsSL https://sq.io/install.sh)"

If you need more control over the install, consult the install.sh source code.

Docker

The ghcr.io/neilotoole/sq image is preloaded with sq and a handful of related tools like jq.

Local

# Shell into a one-time container.
$ docker run -it ghcr.io/neilotoole/sq zsh

# Start detached (background) container named "sq-shell".
$ docker run -d --name sq-shell ghcr.io/neilotoole/sq
# Shell into that container.
$ docker exec -it sq-shell zsh

Kubernetes

Running sq in a Kubernetes environment is useful for DB migrations, as well as general data wrangling.

# Start pod named "sq-shell".
$ kubectl run sq-shell --image ghcr.io/neilotoole/sq
# Shell into the pod.
$ kubectl exec -it sq-shell -- zsh

Upgrade

The sq version command reports on whether a new version is available.

$ sq version
sq v0.32.0    Update available: v0.33.0

Note that sq is still pre-v1.0.0. Occasionally a release introduces a breaking change.

Before upgrading, check the CHANGELOG or the notes for the latest release.

To upgrade, use the mechanism specific to the package manager for your system, e.g.:

brew upgrade sq