sumocli
Query Sumo Logic operational logs from the command line using sumocli.
Skill by seruman
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/seruman-sumocli
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/sumocli
What's inside
- Skill name
sumocli- Description
- Query Sumo Logic operational logs from the command line using sumocli. Use when the user asks to search Sumo logs, find production errors, count events by field, investigate a service/pod/host, or otherwise read data from Sumo Logic. Covers query syntax basics, time ranges, result modes (messages vs aggregation records), and output formats suitable for jq/awk/duckdb.
- License
- MIT
- Instructions
- 277 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# sumocli
`sumocli` is a small Go CLI that wraps the Sumo Logic Search Job API. It is
read-only: create job → poll → paginate results → delete job. No tenancy
management, no mutations.
## Core command
```
sumocli query '<query>' [flags]
```
Exit code is non-zero on any error. The job ID is written to stderr on
stdout-clean runs, e.g. `search job <search-job-id>`.
### Flags
| Flag | Default | Notes |
| --- | --- | --- |
| `--from` | `-15m` | `now`, relative (`-15m`, `-1h30m`, `-7d`, `-1w`), or RFC3339 (`2025-04-16T08:30:00Z`) |
| `--to` | `now` | same formats |
| `--limit` | `1000` | `0` = no limit (API cap is 100k messages) |
| `--mode` | `auto` | `auto`, `messages`, or `records` |
| `-o`, `--output` | `ndjson` | `ndjson`, `json`, or `tsv` |
| `--poll-interval` | `1s` | initial poll; backs off to 5s |
| `--by-receipt-time` | `false` | search by receipt time instead of message time |
| `--no-header` | `false` | omit header row in tsv output |
## Always write results to a file first
Log results can be huge (tens of thousands of rows, many MB). Dumping raw
results into the conversation burns context and often truncates. **Always
redirect `sumocli` output to a file, then inspect it with targeted tools
(`jq`, `rg`, `wc`, `head`, `duckdb`).** Do not dump raw unfiltered
`sumocli` output into the conversation; filtered or aggregated output is fine.
Use a predictable scratch location so files can be cleaned up later:
```bash
mkdir -p /tmp/sumocli
out=/tmp/sumocli/$(date +%s).ndjson
sumocli query 'cluster=prod error' --from=-1h --limit 10000 > "$out"
wc -l "$out" # how many rows
jq -r '._raw' "$out" | head -50 # peek
jq -r '[._messagetime, ._sourcehost, ._raw] | @tsv' "$out" | rg -i timeout
```
The job ID is written to stderr, so redirecting stdout does not hide it:
```bash
sumocli query '...' --from=-15m > "$out" # job id still visible on stderr
```
### Analyse ndjson with duckdb
For anything beyond simple filtering — grouping, joins, windowed counts,
percentiles — use duckdb against the ndjson file. It reads ndjson natively
and is far faster and less error-prone than long `jq` pipelines.
```bash
duckdb -c "
select _sourcehost, count(*) n
from read_json_auto('$out', format='newline_delimited')
group by 1 order by n desc limit 20;
"
```
For a one-off filtered export, create a temporary table in the same command:
```bash
duckdb -c "
create temp table logs as
select * from read_json_auto('$out', format='newline_delimited');
select _messagetime, _sourcehost, _raw
from logs
where lower(_raw) like '%timeout%'
limit 50;
"
```
For aggregations (records mode), result sets are almost always small and
can be read in full:
```bash
sumocli query 'cluster=prod | count by pod' --from=-1h > /tmp/sumocli/by_pod.ndjson
cat /tmp/sumocli/by_pod.ndjson | jq -r '[._count, .pod] | @tsv' | sort -rn
```
## Prefer ndjson when piping
`ndjson` (default) writes one JSON object per line — best for `jq`, `awk`,
`duckdb`, streaming, and for feeding results into other tools. Keep it as
the default.
Use `--output json` only for small results where a single pretty array is
more convenient. Use `--output tsv` when piping into `column`, `sort`, or
spreadsheets.
## Start narrow, then widen
When investigating, start with a small `--limit` and a short `--from`
window to validate the query shape cheaply, then widen once the query is
known to be correct.
```bash
# 1. sanity check — 50 rows, last 5 minutes
sumocli query '_sourceCategory=prod/api error' --from=-5m --limit 50 \
> /tmp/sumocli/probe.ndjson
# 2. if the shape looks right, widen
sumocli query '_sourceCategory=prod/api error' --from=-1h --limit 10000 \
> /tmp/sumocli/full.ndjson
```
## Messages vs records — what `--mode auto` does
Sumo has two result shapes:From seruman/pi-things, MIT.
More from seruman/pi-things
- 0.587score
git-wt
seruman
Use for requests to create, locate, list, or remove Git worktrees, including immediately after cloning a repository, or to carry uncommitted work into a…
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
hauntty
seruman
Use hauntty/ht when explicitly requested, when working with existing hauntty sessions, or when Rex is unavailable.
SkillAFreshness: A★ 1Claude Code +9 - 0.579score
rex
seruman
Runs persistent shells, dev servers, long-running commands, and interactive programs in Rex.
SkillAFreshness: A★ 1Claude Code +9 - 0.562score
tdd
seruman
Test-driven development.
SkillAFreshness: A★ 1Claude Code +9 - 0.547score
teteyectl
seruman
Control and inspect a running Teteye terminal through its teteyectl CLI.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
terminal-browser
seruman
Render a real Chromium browser in the terminal and control terminal-browser-managed tabs through CDP.
SkillBFreshness: B★ 1Claude Code +9 - 0.499score
ast-grep-refactor
seruman
Structural refactoring and safe code rewrites with ast-grep across supported languages.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
git-hunks
seruman
Selective hunk-level staging and commits with git-hunks.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
web-search-guidance
seruman
Use for precise web searches when the user needs better query construction, domain scoping, file-type filtering, recency filtering, language targeting, or…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
wb-browser
seruman
Use the installed wb CLI for persistent browser automation with compact page JSON and screenshots.
SkillCFreshness: C★ 1Claude Code +9 - 0.477score
diagnosing-bugs
seruman
Diagnosis loop for hard bugs and performance regressions.
SkillCFreshness: C★ 1Claude Code +9 - 0.472score
codebase-design
seruman
Shared vocabulary for designing deep modules.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 6, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/seruman/pi-things
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from seruman
- 0.587score
git-wt
seruman
Use for requests to create, locate, list, or remove Git worktrees, including immediately after cloning a repository, or to carry uncommitted work into a…
SkillAFreshness: A★ 1Claude Code +9 - 0.584score
hauntty
seruman
Use hauntty/ht when explicitly requested, when working with existing hauntty sessions, or when Rex is unavailable.
SkillAFreshness: A★ 1Claude Code +9 - 0.579score
rex
seruman
Runs persistent shells, dev servers, long-running commands, and interactive programs in Rex.
SkillAFreshness: A★ 1Claude Code +9 - 0.562score
tdd
seruman
Test-driven development.
SkillAFreshness: A★ 1Claude Code +9 - 0.547score
teteyectl
seruman
Control and inspect a running Teteye terminal through its teteyectl CLI.
SkillBFreshness: B★ 1Claude Code +9 - 0.547score
terminal-browser
seruman
Render a real Chromium browser in the terminal and control terminal-browser-managed tabs through CDP.
SkillBFreshness: B★ 1Claude Code +9
Cite this page
sumocli skill. Agent Mart. https://agentmart.dev/skills/seruman-sumocli (last updated 2026-10-24)