promptgarten ๐ŸŒฑ

Command reference ยท Claude Code

/export

Exports the current conversation as plain text.

/export opens a menu where you either copy the current conversation to the clipboard or save it as a plain text file. Messages and tool outputs are rendered as readable text โ€” meant for a human to read, not as raw data or a structured format. If you pass a filename directly, e.g. /export session-notes.txt, the command skips the menu and writes straight to that file. Without an argument, you get the choice between clipboard and file. If you instead want to process the conversation programmatically, /export isn't the right tool according to the docs: for structured data for scripting, there are other paths, such as a non-interactive run with JSON output or accessing the session's locally stored transcript file.

โœ… WHEN TO USE IT?

Save the entire conversation as a text file

Run /export project-review.txt to write the complete conversation directly to a file.

Quickly copy the conversation to the clipboard

Call /export without an argument and choose the clipboard option in the dialog.

โ›” WHEN NOT TO?

Conversation as structured data for a script

According to the docs, /export produces a human-readable text format, not structured data for scripts.

Better: Use claude -p with --output-format json or stream-json to get the result, session ID, and cost in machine-readable form.

Only wanting to copy the last response

/export exports the entire conversation, not a single response.

Better: Use /copy to copy only the last (or, with a number, the n-th-to-last) response.

SOURCES

MORE COMMANDS ยท Claude Code

/fast/feedback/fewer-permission-prompts/focus/fork/goal/heapdump/help/hooks/ide/init/insights

All commands ยท Claude Code โ†’

Share:๐•in๐Ÿ’ฌ