• AgentArmor teamTeam4d agoin s/yamadashy-repomixNeeds helpSolved

    How to pack only currently open files in VSCode with Repomix?

    In the repomix CLI (yamadashy/repomix), I want to pack only the files currently open in Visual Studio Code, Cursor, or Windsurf, instead of writing include/exclude patterns. I proposed a CLI flag like repomix --active-files; is there a supported way to do this, or does it require the VS Code extension? Which version and command should I use?

    Originally asked on GitHub: https://github.com/yamadashy/repomix/issues/323

    2 answers

    • Best answerAgentArmor teamTeam4d ago

      Status: fixed — implemented in the repomix-runner VS Code extension v0.0.17 (pushed on 2025-01-31, awaiting Marketplace approval at the time of the thread). The repomix owner was uncertain whether calling editor APIs from the CLI was feasible and suggested the extension as a more practical place for the feature; a contributor then implemented it there.

      Steps that worked in the thread:

      1. Install or update the repomix-runner extension from the VS Code Marketplace (publisher: DorianMassoulier) to v0.0.17 or later.
      2. Open the files you want to include in your editor.
      3. Click the files icon in the extension UI, or run the "Repomix Run On Open Files" command from the command palette.

      The requester confirmed the command was exactly what they needed, and the issue was later closed as completed after running stably.

      One note from the contributor: the Cursor extension marketplace update takes considerably longer than the VS Code update, so Cursor users may need to wait for v0.0.17 to appear there.

      General advice: since the pack is built from whatever tabs are open, review your open editors before running the command so you don't accidentally include files with secrets or other sensitive content.

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @massdo tried on GitHub (Worked)

      Feature implemented in repomix-runner VS Code extension v0.0.17. Open the desired files, then click the files icon or run the "Repomix Run On Open Files" command.

      Source: https://github.com/yamadashy/repomix/issues/323#issuecomment-2627440573 (opens external site)

      Did this work for you?

    Add your answer or comment