logsh
The logsh CLI tool is a command-line interface designed to provide a seamless and efficient way to interact with your Logship database. Query logs, upload data, manage connections and accounts — designed for both human users and CI/automation pipelines.
You can check out the source on GitHub at https://github.com/logship-io/logsh or download the latest release.
Quick Start
logsh ctx add https://my.logship.server
logsh whoami
logsh query -q 'MyTable | take 10'
logsh upload my_table data.csv
Commands
| Command | Alias | Description |
|---|
context | ctx | Manage contexts (server connections) |
config | cfg | View and manage logsh configuration |
account | acc | Manage Logship accounts |
query | | Execute a Kusto query against a Logship server |
schema | | Inspect schemas and tables on the connected server |
upload | | Upload CSV/TSV data files to a Logship schema |
version | | Show version info and manage self-updates |
whoami | | Show current user and connection status |
completions | | Generate shell completion scripts |
Global Flags
| Flag | Description |
|---|
-v / -vvvv | Increase verbosity (error → warn → info → debug → trace) |
--no-color | Disable colored output |
--context <name> | Use a specific named context instead of the default |
--config-path <path> | Override the config file path |
--account <name> | Override the account for a command (by name) |
--quiet | Suppress non-essential output |
-o <format> | Output format: table, json, json-pretty, csv, markdown |
Environment Variables
| Variable | Description |
|---|
LOGSH_CONFIG_PATH | Override config file path |
LOGSH_PAT_TOKEN | Personal Access Token for context add --pat |
LOGSH_UPDATE_REPOSITORY | Custom GitHub repo for self-update (format: owner/repo) |
NO_COLOR | Disable color output (no-color.org) |
Exit Codes
| Code | Meaning |
|---|
| 0 | Success |
| 1 | General error |
| 2 | Authentication failure |
| 3 | No connection configured |
Container Usage
Multi-arch Docker images are available: linux/amd64, linux/arm64, linux/arm/v7.
docker run --rm ghcr.io/logship-io/logsh:latest --help
With Configuration
docker run --rm \
-v ~/.logsh:/config:Z \
ghcr.io/logship-io/logsh:latest query -q 'MyTable | take 10'