You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make 'both files' the default; rename suffix convention
Behaviour change: 'claude-backup export <id>' now writes two files by default:
<date>--<id>.md — clean dialogue (was previously .minimal.md)
<date>--<id>.full.md — audit copy with tool calls (was previously the unsuffixed .md)
The default is dual-output because that's what users actually want: an
unsuffixed .md they can open and re-read like a chat log, and a .full.md
sitting next to it as the safety net for debugging or auditing the agent.
Old --minimal boolean is replaced by --mode {both,minimal,full}; default is
'both'. This is a clean break — the prior --minimal flag shipped less than
24 hours ago and had no users beyond the author.
Filename convention rationale: the version a user usually wants is the one
with no suffix (it's the 90% case). The audit copy carries the .full.md
suffix because it's the opt-in detail view. This reverses what the previous
release did, where .minimal.md was the suffixed special case.
CLI:
- export and export-all now accept --mode {both,minimal,full} (default both)
- both subcommands list each written path (so 'both' prints two lines)
- removed --minimal entirely
API:
- export_session() returns list[Path] (was Path)
- export_session(mode='both'|'minimal'|'full'); raises ValueError otherwise
- render_markdown() unchanged
Tests: 68/68 pass, 91% coverage. Updated existing tests for new filenames
and added new tests for each of the three --mode values, plus invalid mode
handling.
Docs: README, README.ru, QUICKSTART all updated. QUICKSTART now leads with
'two files by default' and a small table contrasting their use cases.
Copy file name to clipboardExpand all lines: QUICKSTART.md
+23-11Lines changed: 23 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,9 +76,17 @@ You'll see:
76
76
77
77
```
78
78
Exported: backups/2026-05-07--abc12345-...md
79
+
Exported: backups/2026-05-07--abc12345-...full.md
79
80
```
80
81
81
-
Open that `.md` file in any text editor. It looks like this:
82
+
**Two files** are written by default:
83
+
84
+
| File | What's inside | When to use |
85
+
|------|---------------|-------------|
86
+
|`2026-05-07--abc12345-….md`| The conversation: your prompts + Claude's text replies, nothing else | Re-reading later, archiving, sharing |
87
+
|`2026-05-07--abc12345-….full.md`| Everything: every tool call, every shell command, every internal reasoning step | Debugging or auditing what the agent actually did |
88
+
89
+
Open the `.md` file in any text editor — that's the readable one. It looks like this:
82
90
83
91
```markdown
84
92
---
@@ -88,6 +96,7 @@ branch: main
88
96
model: claude-sonnet-4-6
89
97
messages: 42
90
98
exported_at: 2026-05-07T15:30:00Z
99
+
mode: dialogue-only
91
100
title: Fix the login bug
92
101
---
93
102
@@ -102,29 +111,32 @@ fix the login bug
102
111
Here's the fix...
103
112
```
104
113
114
+
The `.full.md` file looks similar but includes lines like `## Assistant (10:42:51)\n[tool_use: Edit]` followed by `## User (10:42:52)\nFile updated.` — the agent's tool plumbing.
115
+
105
116
---
106
117
107
-
## Step 5 — Export the mini-log version (just the dialogue)
118
+
## Step 5 — Want only one of the two files?
108
119
109
-
The default export captures **everything** — your prompts, Claude's replies, and every tool call (file reads, shell commands, etc.) plus their outputs. Useful for an audit trail, but noisy if you just want to read the conversation later.
claude-backup export abc12345 --output ./backups/ --mode both
115
129
```
116
130
117
-
This writes a separate file with `.minimal.md` suffix. Tool calls, tool results, and Claude's internal reasoning are dropped. Typically the mini-log is **30–50% the size** of the full export and reads like a normal chat log.
118
-
119
-
You can have both versions of the same session — they don't overwrite each other.
131
+
The clean version is typically **half the size** of the audit copy and is what you'll usually want.
120
132
121
133
---
122
134
123
135
## Step 6 — Export everything at once
124
136
125
137
```bash
126
-
claude-backup export-all --output ./backups/ # full mode
127
-
claude-backup export-all --output ./backups/ --minimal # mini-log of every session
138
+
claude-backup export-all --output ./backups/ # both files per session
139
+
claude-backup export-all --output ./backups/ --mode minimal # only the clean .md files
128
140
```
129
141
130
142
Each project gets its own subfolder under `./backups/`. You now have a complete Markdown archive of your Claude Code history.
Writes `./backups/2026-05-07--f7a07eec-<full-uuid>.md`. **You only need the first 8 characters of the session ID** — the tool resolves the prefix.
102
+
By default writes two files into `./backups/`:
103
+
104
+
```
105
+
2026-05-07--f7a07eec-<full-uuid>.md ← clean dialogue, the one you'd open to re-read
106
+
2026-05-07--f7a07eec-<full-uuid>.full.md ← audit copy with every tool call and result
107
+
```
100
108
101
-
### Mini-log mode (`--minimal`)
109
+
**You only need the first 8 characters of the session ID** — the tool resolves the prefix.
102
110
103
-
When you just want a clean transcript of the conversation — your prompts and Claude's text replies — without tool calls, tool results, or extended-thinking blocks:
|`--mode minimal`| only `<id>.md` (clean dialogue) |
117
+
|`--mode full`| only `<id>.full.md` (audit copy) |
108
118
109
-
Writes a separate file with a `.minimal.md` suffix, so the full and minimal exports can coexist for the same session. Frontmatter records `mode: dialogue-only` and an adjusted `messages` count. Typically the minimal file is 30–50% the size of the full one.
119
+
The `.md`file is the version you'll usually open — typically half the size of the audit copy and reads like a normal chat log. The `.full.md` is the safety net: every tool call, every shell output, every internal reasoning step — useful when you actually need to debug what the agent did.
110
120
111
121
### Export everything
112
122
113
123
```bash
114
-
claude-backup export-all --output ./backups/
115
-
claude-backup export-all --output ./backups/ --minimal # mini-log version of all sessions
124
+
claude-backup export-all --output ./backups/ # both files per session
125
+
claude-backup export-all --output ./backups/ --mode minimal # only the clean .md files
126
+
claude-backup export-all --output ./backups/ --mode full # only the .full.md audit copies
116
127
```
117
128
118
129
Each project gets its own subdirectory under `--output`.
@@ -163,7 +174,7 @@ I'll create the utility according to the spec...
163
174
...
164
175
```
165
176
166
-
`--minimal` mode produces the same frontmatter (with `mode: dialogue-only`added) but the body contains only `## User` and `## Assistant` text turns — no `[tool_use: ...]` markers, no tool-result echoes, no thinking blocks.
177
+
The `<id>.md` file (default and `--mode minimal`) shares the same frontmatter — plus `mode: dialogue-only`— but the body contains only `## User` and `## Assistant` text turns. No `[tool_use: ...]` markers, no tool-result echoes, no extended-thinking blocks.
167
178
168
179
---
169
180
@@ -190,7 +201,7 @@ pytest -v --cov=claude_backup
190
201
191
202
CI runs on Python 3.10, 3.11, and 3.12 — see [.github/workflows/test.yml](.github/workflows/test.yml).
192
203
193
-
**Test coverage: 91%** (64/64 tests passing) — covers the real Claude Code format, the legacy spec format, edge cases (empty/corrupt JSONL, unicode, missing index), the `--minimal` mode, and CLI integration.
204
+
**Test coverage: 91%** (68/68 tests passing) — covers the real Claude Code format, the legacy spec format, edge cases (empty/corrupt JSONL, unicode, missing index), `--mode` selection (both / minimal / full), and CLI integration.
|_(по умолчанию)_| оба файла: `<id>.md` и `<id>.full.md`|
116
+
|`--mode minimal`| только `<id>.md` (чистый диалог) |
117
+
|`--mode full`| только `<id>.full.md` (audit-копия) |
108
118
109
-
Создаётся отдельный файл с суффиксом `.minimal.md`, чтобы полный и mini-экспорты могли существовать одновременно для одной сессии. В frontmatter — `mode: dialogue-only` и пересчитанный `messages`. Обычно mini-лог занимает 30–50% от объёма полного экспорта.
119
+
`.md` файл — тот, что обычно хочется открыть: как правило в 2 раза меньше audit-копии и читается как обычный чат-лог. `.full.md` — это страховка: каждый tool-вызов, каждый shell-вывод, каждый блок reasoning. Полезно когда реально нужно отдебажить что делал агент.
110
120
111
121
### Экспорт всего
112
122
113
123
```bash
114
-
claude-backup export-all --output ./backups/
115
-
claude-backup export-all --output ./backups/ --minimal # mini-версия всех сессий
124
+
claude-backup export-all --output ./backups/ # оба файла на каждую сессию
125
+
claude-backup export-all --output ./backups/ --mode minimal # только чистые .md
126
+
claude-backup export-all --output ./backups/ --mode full # только .full.md audit-копии
116
127
```
117
128
118
129
Каждый проект получает свою поддиректорию в `--output`.
@@ -160,7 +171,7 @@ I'll create the utility according to the spec...
160
171
...
161
172
```
162
173
163
-
В режиме `--minimal` frontmatter тот же (плюс поле `mode: dialogue-only`), но в теле остаются только турны `## User` и `## Assistant` с реальным текстом — без `[tool_use: ...]`, без эхо tool-результатов, без блоков thinking.
174
+
В файле `<id>.md` (по умолчанию и при `--mode minimal`) frontmatter тот же — плюс поле `mode: dialogue-only`, — но в теле остаются только турны `## User` и `## Assistant` с реальным текстом. Без `[tool_use: ...]`, без эхо tool-результатов, без блоков extended thinking.
164
175
165
176
---
166
177
@@ -187,7 +198,7 @@ pytest -v --cov=claude_backup
187
198
188
199
CI запускается на Python 3.10, 3.11 и 3.12 — см. [.github/workflows/test.yml](.github/workflows/test.yml).
189
200
190
-
**Покрытие тестами: 91%** (64/64 тестов проходят) — реальный формат Claude Code, legacy-формат из спеки, edge-кейсы (пустой/битый JSONL, unicode, отсутствующий индекс), режим`--minimal` и интеграционные тесты CLI.
201
+
**Покрытие тестами: 91%** (68/68 тестов проходят) — реальный формат Claude Code, legacy-формат из спеки, edge-кейсы (пустой/битый JSONL, unicode, отсутствующий индекс), выбор`--mode` (both / minimal / full), и интеграционные тесты CLI.
0 commit comments