anyuer678/dsh-logtimeline ↗★ 0
dsh-logtimeline
Query local log files with Chinese natural-language time expressions — LogTimeline for DeepSeek Harness.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:anyuer678/dsh-logtimeline说明文档
阅读完整 README ↗Usage
Tell the agent to use the tool — no special syntax needed:
用 log_query 查一下 demo.log 里 2026-07-03 的 ERROR 情况
// log_query(time_text: "2026-07-03", files: ["demo.log"])
{
"time_range": { "start": "2026-07-03 00:00:00", "end": "2026-07-04 00:00:00", "confidence": 1.0 },
"filter": {
"total_matched": 25,
"stats": { "errors": 13, "warns": 5, "infos": 7, "debugs": 0 },
"lines": [ /* up to max_lines rows: {lineno, timestamp, raw} */ ]
}
}
Parameters
| Parameter | Type | Description |
|---|---|---|
time_text | string (required) | Chinese natural-language time, e.g. 「昨天下午」「3小时前」 |
files | string[] | Log file paths (absolute or workspace-relative) |
dir | string | Directory to scan recursively |
pattern | string | Glob when dir is set (default *.log) |
max_lines | number | Max lines returned (default 500; 0 = stats only; capped at 5000) |
since | string | RFC3339 absolute-time fallback when time_text fails to parse |
timezone | string | IANA timezone name, e.g. Asia/Shanghai |
The tool runs in offline mode by default: it filters precisely (its unique value), and leaves root-cause reasoning to the agent itself.