code2prompt icon indicating copy to clipboard operation
code2prompt copied to clipboard

Enhancement: Add timestamp/metadata generation to output

Open jml6m opened this issue 2 months ago • 0 comments

Description

For iterative LLM workflows, there's no way to confirm from the output file alone (e.g., prompt.md) whether a re-run captured recent code changes. After generating once, editing a file, and re-running the command, the overwritten file lacks any indicator (like a generation timestamp) to verify it's fresh—relying on manual diffs or deletes feels clunky.

Example workflow pain:

  1. Run: code2prompt --path . --filter "*.js,*.json" --output prompt.md → Inspect, copy to LLM.
  2. Edit one line of code in one of the workspace files.
  3. Re-run same command → prompt.md updates, but how do I know without searching for the edit or checking file mod time?

The OS file timestamp changes, but that's external—not inspectable in the content for quick confirmation.

Suggested Improvement

Add an optional flag like --add-timestamp (default: off) that injects a lightweight header to the output

Environment

  • OS: Windows 11 Home, 24H2, build 26100.6584 (Anaconda PowerShell)
  • Conda: conda 24.1.2
  • Python: Python 3.11.7
  • code2prompt version: code2prompt version 0.8.1
  • Project size: 506MB

jml6m avatar Oct 05 '25 15:10 jml6m