06. Sessions
Export locally
Take a Markdown transcript of a session onto this machine — a file, the clipboard, or stdout. That is the supported way to copy a conversation out of Matcha CLI.
In the TUI: `/export`
/export
/export [filename]Requires an active session. With no filename, Matcha CLI copies the full transcript to the clipboard. With a filename, it writes a UTF-8 .md file.
/export
/export notes/auth-session.md
/export ~/exports/my convo with spaces.mdPaths accept ~, spaces, and nested directories. Parent directories are created if needed. While you type a path, /export offers directory completions.
Empty conversation: the TUI reports **No conversation content to export**.
Clipboard delivery follows the same rules as /copy. If the clipboard is unreachable (common over SSH or in some terminals), Matcha CLI writes a backup file and tells you the path instead of claiming the copy succeeded.
/export writes what you see in this session’s scrollback. It does not upload anything.
From the shell: `matcha export`
Use this when you are not inside the TUI, or when you have a session ID from matcha sessions list.
matcha export <session-id>
matcha export <session-id> path/to/out.md
matcha export <session-id> --clipboard| Arguments | Where the Markdown goes |
|---|---|
| session ID only | stdout |
| session ID + path | that file (~ expanded; parents created) |
session ID + -c / --clipboard | clipboard, with a line count on stderr |
The ID is required. The session must exist on disk and must have conversation content; otherwise the command errors (Session '…' not found or has no conversation content to export).
matcha export rebuilds the transcript from the saved session log, so you can export a session you are not currently viewing.
matcha sessions list
matcha export 01936c2a-… ~/Desktop/session.md`/share` and `matcha share` are unavailable
Matcha CLI does not offer share URLs. There is no product session-sharing service.
| Entry | What happens |
|---|---|
/share | Hidden from the / menu. If you type it anyway: *Session sharing is unavailable in this Matcha build (Mode A).* |
matcha share | Hidden from matcha --help. If you invoke it anyway: *Session sharing is temporarily disabled.* |
/copy copies one reply, not the whole transcript.
What you should see
| You ran | Result |
|---|---|
/export | Transcript on the clipboard (or a named backup path) |
/export ~/out.md | Conversation exported to …/out.md |
matcha export <id> out.md | File written; status on stderr |
matcha export <id> | Markdown on stdout |
/share or matcha share | Unavailable; use export |