Skip to content

[UX] CLI code blocks have no copy-to-clipboard shortcut #4883

@sprmn24

Description

@sprmn24

Summary

When Hermes renders a code block in the CLI/TUI, there is no way to copy
the code without manually selecting text with the mouse. Tools like Claude
and GitHub show a copy button next to code blocks for quick access.

Repro context

Ask Hermes to write any code snippet in the CLI:

Code block appears in the response with no copy option.

Expected behavior

  • A visible [Copy] indicator next to code blocks
  • Or a keyboard shortcut (e.g. y) to copy the nearest code block
  • Code is copied to system clipboard automatically

Actual behavior

  • No copy button or shortcut exists
  • User must manually select text with the mouse

Notes

hermes_cli/clipboard.py already provides clipboard infrastructure
for WSL2, Linux (xclip/wl-paste), and macOS. This could be reused
to copy code block text.

Suggested direction

  • Detect code blocks in rendered output
  • Add a keyboard shortcut or inline [Copy] prompt
  • Use existing clipboard.py for cross-platform clipboard support

Workaround

Manually select the code with the mouse and copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions