Skip to content

Add a dispatch export command to save a session as Markdown or JSON#225

Open
jongio wants to merge 1 commit into
mainfrom
idea/export-cli
Open

Add a dispatch export command to save a session as Markdown or JSON#225
jongio wants to merge 1 commit into
mainfrom
idea/export-cli

Conversation

@jongio

@jongio jongio commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a dispatch export <id> command to save a full session (metadata plus the complete conversation) to a file or stdout.

Behavior

  • dispatch export <id> writes Markdown to the exports directory by default.
  • --format md|json picks the output format (default md). markdown is accepted as an alias.
  • --stdout prints to the terminal instead of writing a file.
  • --out <dir> writes to a specific directory.
  • --stdout and --out cannot be combined.
  • Missing session ID and unknown sessions return clear errors.

Changes

  • New cmd/dispatch/export.go with the command, flag parsing, and rendering.
  • Wired into arg handling, all three shell completion scripts, and usage output.
  • README documents the command and flags.
  • Unit tests cover flag parsing and each run path (stdout md/json, file write, not found, load error).

Closes #221

Adds 'dispatch export <id>' with --format md|json (default md),
--stdout to print instead of writing a file, and --out <dir> to
choose the destination directory. Wires the command into arg
handling, shell completion, and usage output.

Closes #221

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio jongio self-assigned this Jul 4, 2026
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a dispatch export command to save a session as Markdown or JSON

1 participant