Skip to content

feat(cli): add prompt-only session export with JSONL and Markdown support - #58467

Closed
arc-butler wants to merge 1 commit into
NousResearch:mainfrom
arc-butler:feat/prompt-only-session-export
Closed

feat(cli): add prompt-only session export with JSONL and Markdown support#58467
arc-butler wants to merge 1 commit into
NousResearch:mainfrom
arc-butler:feat/prompt-only-session-export

Conversation

@arc-butler

Copy link
Copy Markdown

Summary

Adds a reusable session export renderer and wires it into hermes sessions export.

New CLI options:

hermes sessions export prompts.jsonl --session-id <session_id> --only user-prompts
hermes sessions export prompts.md --session-id <session_id> --only user-prompts --format markdown

The default JSONL behavior is preserved: without --only, hermes sessions export still writes one full session object per line.

Details

  • Adds hermes_cli.session_export as a shared renderer/filter module.
  • Adds prompt-only JSONL records with session id, 1-based prompt index, timestamp, raw prompt text, and optional message/event ids.
  • Adds Markdown rendering for prompt-only exports and a shared full-session Markdown renderer for future reuse.
  • Keeps assistant messages, tool output, system messages, and internal context out of --only user-prompts.
  • Does not touch /save, so this should not conflict with feat: add markdown export option to /save #4326.

Tests

uv run python -m pytest tests/hermes_cli/test_session_export.py -v  # 18/18 passed
uv run ruff check hermes_cli/session_export.py hermes_cli/main.py tests/hermes_cli/test_session_export.py

Refs #57673, #57683.

Co-authored-by: ARC arc345.assistant@gmail.com

…port

- Add hermes_cli/session_export.py with filter_user_prompts, render_prompt_only_jsonl, render_prompt_only_md, and render_full_session_md

- Add --only user-prompts and --format jsonl|markdown flags to sessions export

- Keep default behavior unchanged (full-session JSONL)

- 18 unit tests for all render paths
@arc-butler arc-butler closed this Jul 4, 2026
@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jul 4, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #57683 (the earlier, still-open prompt-only session export PR). Both add hermes_cli/session_export.py and wire hermes sessions export --only user-prompts (JSONL + Markdown) for the same feature spec (#57673). Closing here; #57683 is the canonical open implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants