Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,21 @@ the Python converter reads only the saved file and contacts no service.
### Step 1: export the session yourself

Run this yourself, in the folder where you want the file. Replace
`SESSION_ID` with the session you want to export. If the session lives on a
remote OpenCode server, add the server address as `--server URL`.
`SESSION_ID` with the session you want to export.

```powershell
opencode session export SESSION_ID | Set-Content -Encoding utf8 session.json
cmd /d /c "opencode session export SESSION_ID > session.json"
```

This Windows command redirects the export as bytes and writes those bytes to
the file unchanged, so the export keeps its UTF-8 encoding even when the
PowerShell console uses another encoding.

Choose a new output filename in place of `session.json` when you want to keep
an export that is already there. If the session lives on a remote OpenCode
server, add the server address inside the quoted command, after `SESSION_ID`,
as `--server URL`.

The raw export includes session metadata and projected message records, not
just visible conversation text. It is not a database or event-history backup;
the CLI export omits unfinished assistant, shell and compaction records.
Expand Down
Loading