Skip to main content

Command output summariser with filters, built for LLMs

Project description

glance — LLM-optimized output summarizer

PyPI Go tests License: MIT

LLMs read every token of command output with equal attention, unlike humans who skim head/tail and scan for patterns. glance gives LLMs a human-like "skim" — pipe output in, get a token-efficient summary with head/tail + regex-matched lines, plus an ID to drill deeper.

Install

# Run without installing
uvx glancecli

# Install permanently
uv tool install glancecli

# Or with Go
go install github.com/akeboshiwind/glance@latest

What it does

$ seq 500 | glance -n 3
  1: 1
  2: 2
  3: 3
498: 498
499: 499
500: 500
--- glance id=20260219-143022-a3f8b1c0 | 500 lines | showing 6 | sections: 1-3, 498-500 ---
$ (seq 100; echo "ERROR db connection refused"; seq 200) | glance -n 3 -p errors
  1: 1
  2: 2
  3: 3
101: ERROR db connection refused
299: 198
300: 199
301: 200
--- glance id=20260219-143025-b7c2e4f1 | 301 lines | showing 7 | sections: 1-3, 101, 299-301 ---

The stored capture can be drilled into:

$ glance show 20260219-143025-b7c2e4f1 -a 101 2
 99: 99
100: 100
101: ERROR db connection refused
102: 1
103: 2
--- glance show 20260219-143025-b7c2e4f1 | 301 lines | showing 5 | sections: 99-103 ---

Design decisions

  • Single static binary — compiled Go, no runtime dependencies. Cross-compiled for Linux, macOS, and Windows (amd64 + arm64).
  • OR semantics — all matchers (filters + presets) OR together. Head/tail always shown. This is the most useful behavior for scanning output: "show me the start, end, and anything interesting".
  • Persistent storage — captures stored in $XDG_CACHE_HOME/glance/captures/ with timestamp + hex IDs (e.g. 20260219-143022-a3f8b1c0). Full ID required for glance show — use glance list to find IDs.
  • No metadata files — line count and age derived from the stored file itself (wc -l, stat).
  • Built-in + user presets — three hardcoded presets (errors, warnings, status) cover common patterns. User presets stored in ~/.config/glance/presets.csv as CSV. Use (?i) prefix for case-insensitive matching.

Usage

See glance help for complete documentation. Key commands:

Command Description
cmd | glance Head 10 + tail 10
cmd | glance -n 5 Head 5 + tail 5
cmd | glance -f 'regex' + regex filter matches
cmd | glance -p errors + preset filter
glance show <id> Full stored output
glance show <id> -l 50-80 Line range
glance show <id> -f 'regex' Filter stored output
glance show <id> -p errors Filter with preset
glance show <id> -a N C Context around line N
glance list List stored captures
glance clean Purge captures
glance presets list Show all presets
glance presets add <name> <re> [desc] Add user preset
glance presets remove <name> Remove user preset

Preset names must be alphanumeric (plus hyphens and underscores).

Testing

go test ./...

Files

  • main.go — entry point and CLI
  • *_test.go — integration and unit tests
  • .github/workflows/publish.yml — PyPI release workflow
  • README.md — this file

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

glancecli-0.1.0-py3-none-win_arm64.whl (2.3 MB view details)

Uploaded Python 3Windows ARM64

glancecli-0.1.0-py3-none-win_amd64.whl (2.4 MB view details)

Uploaded Python 3Windows x86-64

glancecli-0.1.0-py3-none-musllinux_1_2_x86_64.whl (2.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

glancecli-0.1.0-py3-none-musllinux_1_2_aarch64.whl (2.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

glancecli-0.1.0-py3-none-manylinux_2_17_x86_64.whl (2.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

glancecli-0.1.0-py3-none-manylinux_2_17_aarch64.whl (2.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

glancecli-0.1.0-py3-none-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

glancecli-0.1.0-py3-none-macosx_10_9_x86_64.whl (2.3 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file glancecli-0.1.0-py3-none-win_arm64.whl.

File metadata

  • Download URL: glancecli-0.1.0-py3-none-win_arm64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for glancecli-0.1.0-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 c60a57ce4431f9920c9313bb5a97e58f7c6c41dc0ad23b5bc9323a1fe2685c8e
MD5 85b5c9969463b6510afeeb4b3d8b2717
BLAKE2b-256 95a90609d01de97a3e05b4c1bbceab34e9937e76be810073898bba04fd297b71

See more details on using hashes here.

Provenance

The following attestation bundles were made for glancecli-0.1.0-py3-none-win_arm64.whl:

Publisher: publish.yml on Akeboshiwind/glance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glancecli-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: glancecli-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for glancecli-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 40f0e77c94248c483ccc6ab04529a16aa5060faad676cbabab8e50f6b9db1542
MD5 096c36ce1373b66dbdf3a7fbef942b04
BLAKE2b-256 0d460669510739425ef34a4a894bb0fb7b7fea543370d2a3d003213da24afbad

See more details on using hashes here.

Provenance

The following attestation bundles were made for glancecli-0.1.0-py3-none-win_amd64.whl:

Publisher: publish.yml on Akeboshiwind/glance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glancecli-0.1.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for glancecli-0.1.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 542e2aff361ce6fd97f8bfda3bc370a96f11063182f116434e7ceab95ab072c4
MD5 a8f1bf61ec85e0f10a8165b025301702
BLAKE2b-256 08eaba0d66003482c1bb00f18d232d531902fa24066571e2af0a23abeef8fe47

See more details on using hashes here.

Provenance

The following attestation bundles were made for glancecli-0.1.0-py3-none-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on Akeboshiwind/glance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glancecli-0.1.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for glancecli-0.1.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4f3f1a93391cfd9d4d52ff9302e03c661ea28efd93f2ac3181f26a575e5fffb7
MD5 54c049dd10ee188278bb140c7563899a
BLAKE2b-256 0b016d271b987e85d22b17e80a5830c2a57b3b1180bc2622e9f7f93a83fd48fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for glancecli-0.1.0-py3-none-musllinux_1_2_aarch64.whl:

Publisher: publish.yml on Akeboshiwind/glance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glancecli-0.1.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for glancecli-0.1.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 e0b7a3561d5d5018bfec883590c92928cc28b81e57e53eeecc674588b4c25e73
MD5 9e68e159d85af78a0bec310a9a748af9
BLAKE2b-256 8c9583845557ff49d1031ac8541d9b6be7efb2d5fc70f725845c9761c7a7077e

See more details on using hashes here.

Provenance

The following attestation bundles were made for glancecli-0.1.0-py3-none-manylinux_2_17_x86_64.whl:

Publisher: publish.yml on Akeboshiwind/glance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glancecli-0.1.0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for glancecli-0.1.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 91d639404813a6d3876cb78f4777a2fa503896dec44bc6caa4d9337506913b56
MD5 57e189e983392b7dbdd06a44335b4e13
BLAKE2b-256 06a696c0d3455996f3d434467c7797a61be2add9ced70478cd80a9fe33d21bdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for glancecli-0.1.0-py3-none-manylinux_2_17_aarch64.whl:

Publisher: publish.yml on Akeboshiwind/glance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glancecli-0.1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for glancecli-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 94c69fac4ffd06c0dec0bc2804d6ce86ffaa58fc07a2fd4f7e1556a8ee957994
MD5 4ddf3d3f78f572acb4b35c60edc4c189
BLAKE2b-256 7e2a08f43caf657d17763853c955a613bd36297b00578ae9e78957f7efdd34b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for glancecli-0.1.0-py3-none-macosx_11_0_arm64.whl:

Publisher: publish.yml on Akeboshiwind/glance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glancecli-0.1.0-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for glancecli-0.1.0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9a82ebbfdb8e96f4e4ac288210d2c4882dfe930a7ea3c9ac1d17874580f74f70
MD5 80e4c08cc085d5049654193ee1d7b05c
BLAKE2b-256 9798bf8fddca7526c7347ae70b9a4d313a65ce27671d55e954b3e59f84e631d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for glancecli-0.1.0-py3-none-macosx_10_9_x86_64.whl:

Publisher: publish.yml on Akeboshiwind/glance

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page