Install logsh

Install logsh

logsh is the command-line interface for Logship. It is a single, self-contained executable available for all major platforms.

Pre-built binaries

Download the latest release from GitHub Releases.

Supported platforms

PlatformArchitecture
Linuxx86_64, aarch64, armv7 (RPi), arm, musl (static)
macOSx86_64 (Intel), aarch64 (Apple Silicon)
Windowsx86_64, aarch64
FreeBSDx86_64
# Download latest release
curl -LO https://github.com/logship-io/logsh/releases/latest/download/logsh-linux-x86_64.tar.gz
tar -xzf logsh-linux-x86_64.tar.gz
# Install to PATH
sudo mv logsh /usr/local/bin/
logsh --help

Docker

Images are published to a container registry:

RegistryImage
GitHub Container Registryghcr.io/logship-io/logsh
docker run --rm ghcr.io/logship-io/logsh:latest --help

Multi-arch images available: linux/amd64, linux/arm64, linux/arm/v7

TagDescription
latestLatest stable release

Persistent configuration with Docker

Mount your logsh config directory so contexts persist between runs:

docker run --rm \
  -v ~/.logsh:/config:Z \
  ghcr.io/logship-io/logsh:latest query -q 'MyTable | take 10'

Docker Compose

services:
  logsh:
    image: ghcr.io/logship-io/logsh:latest
    volumes:
      - ~/.logsh:/config:Z

Build from source

Requires Rust 1.70+.

git clone https://github.com/logship-io/logsh.git
cd logsh/logsh
cargo build --release
./target/release/logsh

Self-update

logsh can update itself in-place:

logsh version --update            # Update to latest stable release
logsh version --update-prerelease # Update to latest dev build
logsh version --update --yes      # Skip confirmation prompt

Verify installation

logsh version
logsh --help

Shell completions (autocomplete)

logsh provides tab-completion for commands, flags, context names, and account names.

# Generate and install completions
mkdir -p ~/.local/share/bash-completion/completions
logsh completions bash > ~/.local/share/bash-completion/completions/logsh
# Reload in current session
source ~/.local/share/bash-completion/completions/logsh
# If you don't have bash-completion installed:
# Debian/Ubuntu: sudo apt install bash-completion
# RHEL/Fedora:   sudo dnf install bash-completion
# Then add to your ~/.bashrc:
# echo 'source ~/.local/share/bash-completion/completions/logsh' >> ~/.bashrc

Environment variables

VariableDescription
LOGSH_CONFIG_PATHOverride the config file location (default: ~/.logsh/config.json)
LOGSH_PAT_TOKENPersonal access token for authentication
LOGSH_UPDATE_REPOSITORYCustom GitHub repository for self-update (default: logship-io/logsh)
NO_COLORDisable colored output when set

Quick start

# Add a connection
logsh ctx add https://my.logship.server
# Verify
logsh whoami
# Run a query
logsh query -q 'schema.tables | take 5'