- Home
- Plugins
- Workflow & Automation
- Aiscribe
Aiscribe
5yeah/aiscribe
Reads local AI session history from 16 AI tools plus Windows recent-file activity, and generates daily or weekly work reports on your machine. Currently Windows x64 only: the plugin ships a bundled Windows sidecar (no Python needed); macOS/Linux are not supported yet.
Install
dsh plugin --profile web add github:5yeah/aiscribeREADME
Aiscribe · One-click work reports😄
Daily reports, weekly reports, quarterly reviews, year-end summaries — screw them all!!!!! You really think your manager reads them closely? A pure waste of life!!! Pointless burning of brain cells!!!!!! You're already working with AI — just let AI write the reports. Stop thinking about them!!!!!! Broke? Then grab free eggs everywhere you can 🥚 — AI chat logs are scattered all over the place, and asking a single AI to write them can't even keep a consistent format or content. Now they're all pooled together and generated in one go!!!
Local-first, privacy-first. Searches all AI coding/chat tool sessions on your own machine, groups them by project, and turns them into daily/weekly reports (Markdown / Word / HTML) — exposed to any AI client as an MCP server.
The MCP tools fetch every real message you sent today; your AI assistant reads them and writes the report. That division of labour is why the output is far better than template-only reporting.
English | 简体中文
Why
Your day is scattered across several AI tools: code edits in an IDE, debugging in a chat window, design notes in another tool. When report time comes you reconstruct it from memory — mixed-up projects, wrong dates, vague summaries.
Aiscribe splits the job into three steps:
- Read locally — pull what you actually sent today from each tool's local database/logs, filtered by a single timezone (Asia/Shanghai). Nothing leaves your machine.
- Let the AI summarise — hand the raw conversations to your AI assistant over MCP; it merges duplicates, distils topics (not messages), and groups them by project.
- Format and save — emit a fixed
1、Project/①、Topiclayout with a detailed version + a short version, written to localreports/as md, docx, or a self-contained shareable html page.
No AI? The local template still produces a draft. The tool never pretends to summarise — a draft is labelled as a draft.
Features
Data in: 17 local sources
- 16 AI tool connectors — CodeBuddy CN, TRAE, Codex, dsh, Claude Code, Gemini CLI, Qwen Code, iFlow, Copilot Chat, Cline, Roo Code, Kilo Code, Cursor, Doubao, WorkBuddy, Kimi. Each reads the tool's own local files directly; no Cass-style indexer, no extra packages.
- Document activity evidence (Windows) — reads the system's "Recent items" list and adds the Word / Excel /
PPT / Markdown files you touched today: AI sessions say what you did, file activity proves what you delivered.
It reads file names, open times and document metadata, plus an optional first-2,000-character preview of
docx/xlsx/pptx/md/txt, shown only on the local detail page (AIREREPORT_RECENT_PREVIEW=0disables it entirely). - Cached parsing — Recent-file shortcuts are cached by file fingerprint, and previews by
“path + mtime + size”, so unchanged files are never reopened. The cache lives in
<data dir>/cache/, stays on this machine, and can be deleted at any time.
Organise: by project and time, without bleed-through
- Correct date filtering — only sessions starting that day, or spanning the night (≤ 1 day); a week-old session touched once won't leak into today.
- Automatic project grouping — keyword rules (
projects.json) → title hints → cwd's last path segment fallback; new projects need zero config. - Time trimming — set a start/end per session in the guide page; segments outside the window are dropped
inside the tool —
get_conversationsnever returns them, so the AI cannot write them back in. - Pick what goes in — everything is selected by default; anything you untick never reaches the material or the report.
Output: three formats, two paths
- Three formats — Markdown (default, easy to edit), Word (
--format docx, hand-rolled WordprocessingML), and a shareable HTML page (--format html, one self-contained file: inline CSS, no JS, no external assets). - Local rendering — offline, filtered by your ticks and trims, written straight into
reports/. - Hand it to your AI — copy a ready-to-paste instruction carrying the selected record ids and the format spec; the client AI reads the raw sessions and summarises, which gives the best quality.
- Optional LLM polish (
--llm, DeepSeek-compatible, or local Ollama): the model may only rewrite each item's text. The report skeleton is machine-built and every reply must pass a structure/format check, otherwise it falls back to the template silently. - Format cloning — upload the reports you already write (md / txt / docx / image); the layout is extracted locally into a template, and every later report reproduces your format — structure only, never the sample's content.
Connect: MCP + DSH
- MCP stdio — 7 tools:
list_sources,get_conversations,generate_report,save_report,list_templates,get_format_spec,save_template; TRAE, Claude Code, Cursor and dsh all work. - DSH plugin — install Aiscribe (
dsh-aireport) from the DSH plugin market; the package bundles a Windows sidecar, so no Python install is required. Start a new session and the agent has every tool. Source and standalone MCP setups still work. - Zero third-party dependencies (core) — data access, report building and MCP run on the Python standard
library alone. The one exception is the guide page frontend:
ui.py's server is still stdlib, but the page pulls Tailwind / React / Framer Motion / Babel from a public CDN, so the first load needs internet. Offline it shows an explicit notice pointing at the CLI or MCP instead of a blank page.
Quick start
# 0) Python 3.9+, no pip install needed
git clone https://github.com/5yeah/Aiscribe.git
cd Aiscribe
# 1) See which data sources were auto-discovered on this machine
python -m ai_report sources
python -m ai_report config
# 2) Template-only report first (no AI needed)
python -m ai_report daily --date 2026-10-16
# 3a) Recommended: open the local guide page (scan → pick → generate, or copy an instruction)
python -m ai_report ui
# 3b) Or wire the MCP server + Skill into your AI client
DSH plugin (no Python required)
Search for Aiscribe (dsh-aireport) in the DSH 0.2.x plugin market and install it, then start a
new session. Or use the CLI:
dsh plugin --profile web add dsh-aireport
0.2.0 bundles a Windows x64 runtime only; macOS/Linux builds will ship as separate platform packages.
Reports and config live in ~/.aireport/. See dsh-plugin/README.md.
Usage
Local guide page
python -m ai_report ui # port 5071, opens your browser
python -m ai_report ui --port 5080 --no-open
Bound to 127.0.0.1 only. Six screens: splash → four steps → generating screen.
- Source radar — lists only the tools really detected on this machine; each lights up after it is really read, tagged with its content level (full per-message text / titles only / metadata). Once scanning finishes the list is sorted by session count, and tools that are not installed are folded into a collapsed “N tools not detected” row.
- Time window — daily (one day) / weekly (the natural week of a chosen day) / custom range.
- Session picking — lanes per project, all selected by default; each session can also be cut to a time window with ✂.
- Template & output — md / docx / html, plus format cloning from your old reports (md / txt / docx / image). Tick “reference document previews” if reports should include document text (Recent-files material only, first 160 characters, read locally).
The generating screen offers two ways out:
- Generate report (local template by default) — render and write the report into
reports/locally, filtered by your ticks and trims. The page shows the file name, path and open/download links. Only if you manually tick “AI polish” and have an engine configured does the draft text (daily summaries plus, when available, up to 120 chars of the AI reply — not the full transcript) go to the model. The page states plainly whether the body was summarised or is still the raw template draft. With no engine configured it does not pretend to summarise — it falls back and says why. - Copy instruction — paste the generated instruction (carrying the record ids you selected and the format
spec) into your AI chat; the AI reads the raw sessions and summarises, which gives the best quality.
In that path the file is written by your AI client via
save_report.
Browsing every past session
The wizard only shows the material for the day you picked. To browse all history, hit
“浏览历史会话” in the top-right corner, or open http://127.0.0.1:5071/browse directly:
- filter by source (with real per-source counts) and by project; pick any date range
- the search box covers titles, summaries and per-message text (
/to focus,Escto close) - click a row for a right-hand drawer with the full per-message body, timestamps and project path; sources that keep only titles/metadata are labelled “no body”, and Recent-files records show the locally extracted document preview instead
- deep links work:
/browse?id=dsh|session-xxxx - listing is cached for 30 s so paging/searching never re-scans the disk; Refresh forces a re-read
Time trimming
A long session often mixes yesterday's leftovers with today's work. In the guide page click the ✂ button
on a session chip and set a start/end time. Everything outside that window is dropped inside the tool —
get_conversations simply never returns it, so the AI cannot write it back in. The preview and the material
handed to the AI stay in sync, and a 已剪辑 badge marks the chip (清空全部剪辑 undoes everything).
Times are Beijing time; an end earlier than the start means an overnight window (e.g. 22:30 ~ 02:00);
segments without a timestamp are always kept. Trims live in <data dir>/trims.json (the repo root when
running from source, ~/.aireport when installed; override with AIREREPORT_TRIMS, gitignored).
Format cloning
python -m ai_report learn old-daily.md --name my-format # learn from one sample
python -m ai_report learn a.md b.docx --name my-format # several samples vote on the common layout
python -m ai_report templates # list what has been learned
python -m ai_report daily --date 2026-10-16 --template my-format
- Structure only — title line, header line, project heading, item marker, TODO block, footer, dual version or not. The sample's actual work content is never carried over.
- Image samples — no OCR (keeps the zero-dependency rule). Images are archived and the host AI is asked
to read them and write the structure back via the
save_templateMCP tool. - Two consumers — the AI path (
get_format_specinjects the spec into the prompt; primary) and the CLI path (--templatestyles the template-only output). - Templates live in
templates/*.json(override withAIREREPORT_TEMPLATES_DIR, gitignored); setAIREREPORT_TEMPLATEto choose which one is active by default.
Summarisation engine (optional)
Summarisation only happens on the already-collapsed draft level: the draft is locally assembled
(e.g. CodeBuddy CN's real input timeline for the day, each entry capped at 400 chars) and may append up to
120 chars of the assistant's conclusion when one exists. It is not the full transcript, but it does
contain fragments of your own input — decide accordingly before enabling it. Configure it via a gitignored
llm.json or the matching environment variables:
{ "provider": "deepseek", "model": "deepseek-chat", "api_key": "sk-..." }
- DeepSeek — set
DEEPSEEK_API_KEY, or put it inllm.json - Nothing leaves the machine — switch
"provider"to"ollama"and point"model"at a model you have pulled locally (e.g.qwen3.8:27b); talks tohttp://127.0.0.1:11434, no key needed - The CLI has the same switch:
python -m ai_report daily --llm(falls back to the template on failure)
MCP + Skill (recommended)
MCP config (point the args at your clone):
{
"mcpServers": {
"aireport": {
"command": "python",
"args": ["<repo>/run_mcp_stdio.py"]
}
}
}
Skill: copy skills/ai-report/SKILL.md into your client's skills directory
(TRAE: .trae/skills/; Claude Code: ~/.claude/skills/).
Then just ask: "Generate my report for today."
The AI runs list_sources → get_conversations (overview, then per-project detail) → summarise → save_report.
Client-by-client setup and known pitfalls (including TRAE's space-splitting command) live in
mcp/README.md (Chinese).
How it works
flowchart LR
subgraph L1["L1 Connectors (local files only, offline)"]
A1[CodeBuddy CN / TRAE] --> U[UnifiedRecord]
A2[Codex / dsh / Claude Code] --> U
A3[Gemini CLI / Qwen Code / iFlow] --> U
A4[Copilot Chat / Cline / Roo / Kilo / Cursor] --> U
A5[Doubao / WorkBuddy / Kimi] --> U
A6[Recent files (document activity)] --> U
end
U --> L2["L2 Index: merge / dedupe / classify / date filter"]
L2 --> MCP["MCP: get_conversations returns raw chats"]
MCP --> AI["Client AI reads & summarises"]
AI --> SAVE["save_report → md / docx / html"]
L2 --> TPL["generate_report (template-only fallback)"]
TPL --> OUT["reports/"]
SAVE --> OUT
| Layer | Responsibility |
|---|---|
| L1 connectors | Normalise each tool's raw data into UnifiedRecord; per-message text goes into raw["messages"] |
| L2 index | Merge/dedupe, project classification, Asia/Shanghai “today + overnight ≤ 1 day” filtering |
| L3 generation | Template rendering (generate_report) — no understanding, just listing; used for quick previews and as a fallback |
| Summarisation | Done by the client AI after get_conversations (the key part of this design) |
| L4 optional | LLM polish (--llm), Word / shareable HTML export |
Report format
One file, two versions — detailed on top, a --- separator, short version below.
# AI 日报 2026-10-16
**汇报人:** 张三 | **部门:** 算法组 | **日期:** 2026年10月16日
> 数据来源:CodeBuddy CN 当日真实发送消息(127 条逐条输入)、TRAE 本地记忆、豆包(本地聚合,隐私优先)
**1、订单服务(重构下单链路,09:06–18:20):**
①、接口契约梳理:确认 v2 字段清单并落成 contracts/order.md。
②、超时问题定位:定位到连接池配置过小,改为 20 后压测回归通过。
**2、数据看板:**
①、新增日活趋势图,支持按渠道筛选。
**3、待办事项:**
①、订单服务:连接池压测报告归档。
---
# AI 日报(简洁版)2026-10-16
**1、订单服务:**
①、接口契约梳理
②、超时问题定位
**2、数据看板:**
①、新增日活趋势图
Rules (hard-coded in the Skill): projects use **1、Name:**, topics use ①②③; the short version drops
the parenthetical context and keeps only the text before the : of each detailed bullet.
CLI
python -m ai_report daily [--date YYYY-MM-DD] [--llm] [--out FILE] [--format md|docx|html] [--template NAME]
python -m ai_report weekly [--date YYYY-MM-DD] [--template NAME]
python -m ai_report range --start YYYY-MM-DD --end YYYY-MM-DD [--template NAME]
python -m ai_report sources
python -m ai_report config
python -m ai_report learn SAMPLE... [--name NAME] # learn a layout from past reports
python -m ai_report templates # list learned format templates
python -m ai_report mcp --stdio # MCP stdio (for AI clients)
python -m ai_report mcp --port 5070 # optional local HTTP, 127.0.0.1 only
python -m ai_report ui # local guide page, 5071, loopback only
Windows helpers: scripts/run_daily.bat / scripts/run_weekly.bat;
scheduling example: automation_example.json.
Supported sources
All connectors are native: they read each tool's own local files, so no Cass-style indexer and no extra
packages are needed. The only exception is zstd-compressed sessions (Codex, dsh): with zstandard installed
or a zstd binary on PATH you get the full text; without either they degrade to metadata-only — never an
error, never a crash.
Full per-message text (best report quality)
| Source | Auto-discovered location | What is available locally |
|---|---|---|
| CodeBuddy CN | %APPDATA%/CodeBuddy CN/ | Session metadata + raw sent inputs via onAgentStart: userInput= in logs (user side only) |
| TRAE | ~/.trae-cn/memory/projects/ | Per-message summaries + topics.md session summaries |
| Codex | ~/.codex/ | state_5.sqlite metadata + projected history / rollout-*.jsonl.zst user and assistant turns |
| dsh | ~/.dsh/sessions/ | Per-message user and assistant turns from the session.v4.jsonl.zstd event stream |
| Claude Code | ~/.claude/projects/ | **/*.jsonl user/assistant turns (sidechains and local-command noise skipped) |
| Gemini CLI | ~/.gemini/tmp/*/chats/ | session-*.json user/model messages |
| Qwen Code | ~/.qwen/tmp/*/chats/ | Same format (Gemini CLI fork) |
| iFlow | ~/.iflow/tmp/*/chats/ | Same format (Gemini CLI fork) |
| Copilot Chat | %APPDATA%/Code/User/workspaceStorage/*/chatSessions/ | VS Code built-in chat *.jsonl: prompt + response parts |
| Cline | …/globalStorage/saoudrizwan.claude-dev/tasks/ | api_conversation_history.json user/assistant messages |
| Roo Code | …/globalStorage/rooveterinaryinc.roo-cline/tasks/ | Same format (same lineage) |
| Kilo Code | …/globalStorage/kilocode.kilo-code/tasks/ | Same format (same lineage) |
| Cursor | %APPDATA%/Cursor/User/globalStorage/state.vscdb | cursorDiskKV composerData:* + typed bubbleId:* |
Every message carries a role: user is what the person asked, assistant is what the AI concluded or
changed. “What was done” in a report comes from the assistant side — never rewrite the question into a
past-tense claim.
Titles / metadata only (bodies live in the cloud)
| Source | Auto-discovered location | What is available locally |
|---|---|---|
| Doubao | %LOCALAPPDATA%/Doubao/User Data/Default/IndexedDB | Titles and timestamps (LevelDB / V8 blobs) |
| WorkBuddy | ~/.workbuddy/workbuddy.db | Titles and timestamps (cwd is its own workspace dir) |
| Kimi | %APPDATA%/kimi-desktop/ | Metadata + edited file paths (used to locate the project dir) |
Document activity (delivery evidence, no conversation text)
| Source | Auto-discovered location | What is available locally |
|---|---|---|
| Recent files | %APPDATA%/Microsoft/Windows/Recent/ | Which documents were opened today (full path and open time; for .docx/.xlsx/.pptx also the last-saved time and author); docx/xlsx/pptx/md/txt can yield a first-2,000-character preview |
Only doc/docx/xls/xlsx/ppt/pptx/md/txt are collected (AIREREPORT_RECENT_EXTS to adjust). Entries are
merged per file per calendar day and count repeated opens; unparseable shortcuts fall back to the file name.
The preview is shown locally on the detail page; a report includes the first 160 characters only when you
tick "reference document previews". Legacy .doc/.xls/.ppt files contribute metadata only.
Every path is derived from %APPDATA% / %LOCALAPPDATA% / the user profile — no hard-coded usernames —
and each can be overridden by an environment variable (see python -m ai_report config).
Configuration
| Env var | Purpose | Default |
|---|---|---|
AIREREPORT_HOME | Data directory (reports, templates, config, trims, cache) | repo root from source; ~/.aireport when installed |
AIREREPORT_REPORTS_DIR | Report output directory | <data dir>/reports |
AIREREPORT_TEMPLATES_DIR | Learned format templates directory | <data dir>/templates |
AIREREPORT_TEMPLATE | Default active format template | newest learned template |
AIREREPORT_TRIMS | Session time-trim file | <data dir>/trims.json |
AIREREPORT_PROJECTS | Project classification rules | <repo>/projects.json, then ~/.aireport/projects.json, then built-ins + cwd fallback |
CODEBUDDY_CN_DB … VSCODE_GLOBAL_STORAGE | Override a source path (multi-dir values use ;) | Auto-discovered |
AIREREPORT_SCAN_ALL_USERS | Set 1 to also read other Windows users' session dirs on this machine | Off — other people's sessions are not read by default |
AIREREPORT_RECENT_DIR AIREREPORT_RECENT_EXTS AIREREPORT_RECENT_EXCLUDE | Recent-items dir / extension whitelist (; or , separated) / excluded path prefixes (; separated) | Auto-discovered Recent; extensions default to doc;docx;xls;xlsx;ppt;pptx;md;txt; nothing excluded |
AIREREPORT_RECENT_BASENAME | Set 1 to show only file names in reports | Full paths are shown by default |
AIREREPORT_RECENT_PREVIEW | Set 0 to disable document previews (no document is opened) | On; first 2,000 characters |
AIREREPORT_RECENT_PREVIEW_CHARS | Preview character cap | 2000 (range 100–20000) |
AIREREPORT_CACHE_DIR | Parse cache directory (lnk targets and previews) | <data dir>/cache; delete it to clear |
DEEPSEEK_API_KEY, LLM_PROVIDER | Optional LLM polish | --llm falls back to template mode |
Copy projects.example.json to projects.json to pin your own project names.
Privacy
- Connectors read local files only and never go online; Aiscribe has no telemetry and does not upload sessions on its own
- Tool output enters the model context. When a cloud model drives the report through MCP,
get_conversations(detail="full")is effectively sending those transcripts to that model provider. The server tells models to start withdetail="summary"and to read only the projects/dates needed - Only the current user's directories are read; other users on the same machine require
AIREREPORT_SCAN_ALL_USERS=1 - The Recent files connector reads Windows Recent shortcuts, document metadata (
docProps/core.xml), and by default a first-2,000-character preview ofdocx/xlsx/pptx/md/txt, shown only in the local detail page. Previews are not included in MCP responses; a report includes the first 160 characters only when you tick "reference document previews". SetAIREREPORT_RECENT_PREVIEW=0to never open documents. Reports show full paths by default; setAIREREPORT_RECENT_BASENAME=1to hide directories orAIREREPORT_RECENT_EXCLUDEto skip sensitive folders - Parse caches (lnk targets and previews) live in
<data dir>/cache/on this machine; delete that folder to clear them - Only the skeleton draft (summaries, plus up to 120 chars of assistant text when available) goes to
a configured LLM endpoint, and only when you opt into AI polish (
--llm/ UI tick /polish=true). The full raw transcript is not sent by the summariser itself - Reports stay in local
reports/; both the optional HTTP mode and the guide page bind to127.0.0.1only - The guide/browse pages validate
HostandOriginand reject anything that is not a loopback, same-origin request — this blocks DNS rebinding (a domain pointed at 127.0.0.1 driving your local port) .gitignoreexcludesreports/,projects.json,trims.json,dingtalk_config.json,automation.json, andcache/
Known limitations
- Most sources are re-read on every collection: a couple of hundred local records typically finish within a second. The time sits in the pure-Python parsing of dsh, CodeBuddy CN and Doubao (a thread pool measured 1.01x — GIL-bound, so it is not used). Recent files caches lnk targets by file fingerprint and previews by path + mtime + size; persistent caching for the other connectors is not implemented yet.
- Assistant text is not available everywhere: CodeBuddy CN only reconstructs user inputs; WorkBuddy, Kimi and Doubao keep titles only. Those sources can only contribute “what was asked”.
- Codex / dsh need zstd: with
zstandardor azstdbinary you get the text, otherwise the connector degrades to metadata. - Document previews are excerpts: the first 2,000 characters by default, and legacy
.doc/.xls/.pptfiles are not opened at all.
Layout
ai_report/ core package (stdlib only)
connectors/ L1: base / common / codebuddy_cn / trae / codex / dsh / claude_code /
gemini_cli / vscode_chat / cline / cursor / doubao / workbuddy / kimi /
recent_files / registry
index.py L2: merge, dedupe, classify, date filter, shared window/payload helpers
cache.py parse cache: lnk targets and document previews keyed by file fingerprint
generator.py L3: daily/weekly/range templates (can follow a learned layout)
template.py format cloning: extract layout from past reports, store specs for the AI
trim.py session time trimming: window parsing, segment clipping, trims.json store
html.py docx.py exports: self-contained shareable page / Word
llm.py L4: optional synthesis (rewrites item text only, must pass format check)
cli.py mcp_server.py
ui.py web/ local guide page: stdlib HTTP server + six-screen wizard UI (frontend via CDN)
skills/ai-report/ SKILL.md — the summarisation methodology and output spec
mcp/ client setup guides
docs/ data-source adapters, and the full build prompts for this project
examples/ connector_template.py
scripts/ Windows one-click scripts
tests/ unittest suite
run_mcp_stdio.py MCP stdio launcher (stable path for client configs)
reports/ generated reports (auto-created, gitignored)
templates/ learned format templates + archived samples (auto-created, gitignored)
trims.json guide-page time trims (auto-created, gitignored)
cache/ parse cache (auto-created, gitignored)
Tests
python -m unittest discover -s tests -t .
Contributing
- New data source — see
docs/数据源适配.md(Chinese) and the template inexamples/connector_template.py - Different report style — edit the output spec in
skills/ai-report/SKILL.md - Rebuild from scratch —
docs/BUILD_PROMPTS.mdis the full prompt set that produced this project
License
Related plugins
webnovel-writer
lingfengqaq/webnovel-writer
loopx (dsh-loopx-plugin)
loopx-project/loopx
ouroboros (dsh-plugin)
q00/ouroboros
loopx (dsh-loopx-plugin)
huangruiteng/loopx