Skip to content

Enhancement: Add timestamp/metadata generation to output #27

@jml6m

Description

@jml6m

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions