Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing File Summary header #206

Open
mireklzicar opened this issue Dec 18, 2024 · 10 comments
Open

Removing File Summary header #206

mireklzicar opened this issue Dec 18, 2024 · 10 comments
Assignees
Labels
enhancement New feature or request needs discussion Issues needing discussion and a decision to be made before action can be taken

Comments

@mireklzicar
Copy link

Idea: Being able to omit and/or customize File Summary. I just want the code in the output, not anything else.
Proposal: Adding output.summaryText or output.removeFileSummarywould be great.

@yamadashy
Copy link
Owner

yamadashy commented Dec 18, 2024

Thanks for the suggestion, @mireklzicar!

How about adding these configuration options for more flexible control:

{
  "output": {
    "fileSummary": true,           // default: true
    "repositoryStructure": true    // default: true
  }
}

We can extend these options in the future to accept objects for more detailed control, while maintaining backward compatibility.

For example, in the future we could extend fileSummary to accept an object for more granular control while still supporting the boolean value:

{
  "output": {
    "fileSummary": {
      // ...
    }
  }
}

What are your thoughts on this direction?

Note: Due to current workload, implementation might be delayed until the end of the year.

@yamadashy yamadashy added enhancement New feature or request good first issue Good for newcomers needs discussion Issues needing discussion and a decision to be made before action can be taken labels Dec 18, 2024
@mireklzicar
Copy link
Author

Looks good. This will be simple to implement and perfectly enough for my usecase.

@yamadashy
Copy link
Owner

@mireklzicar
This feature has been implemented and released in v0.2.8! You can now control whether to include the file summary and directory structure using the fileSummary and directoryStructure options in your repomix.config.json. Please give it a try and let me know what you think!

https://github.com/yamadashy/repomix/releases/tag/v0.2.8

@gaby
Copy link
Contributor

gaby commented Dec 31, 2024

Can this also be a cli flag? Actually a lot of the options would benefit from being CLI flags.

@yamadashy
Copy link
Owner

yamadashy commented Dec 31, 2024

@gaby
You're right, providing these options as CLI flags would definitely increase flexibility. Especially for users using the --remote option, it could be very helpful.

I'll add CLI in a next release.

@yamadashy
Copy link
Owner

I've released a new version, v0.2.12, which includes the CLI flags for controlling output sections and content processing that we discussed:

https://github.com/yamadashy/repomix/releases/tag/v0.2.12

  • --no-file-summary: Disables the file summary section in the output.
  • --no-directory-structure: Disables the directory structure section in the output.
  • --remove-comments: Enables comment removal from supported file types.
  • --remove-empty-lines: Enables removal of empty lines from the output.

You can check out the release here: https://github.com/yamadashy/repomix/releases/tag/v0.2.12

Please let me know if you have any other suggestions or feedback!

@gaby
Copy link
Contributor

gaby commented Jan 1, 2025

@yamadashy Awesome, thank you! This will make it easier to use Docker too.

@gaby
Copy link
Contributor

gaby commented Jan 1, 2025

@yamadashy After the latest release i'm getting this error:

user@ubuntu:/usr/lib/node_modules# repomix --help
Fatal Error: {
  name: 'SyntaxError',
  message: "Unexpected token 'with'",
  stack: "SyntaxError: Unexpected token 'with'\n" +
    '    at DefaultModuleLoader.moduleStrategy (node:internal/modules/esm/translators:116:18)\n' +
    '    at DefaultModuleLoader.moduleProvider (node:internal/modules/esm/loader:190:14)'
}

image

@yamadashy
Copy link
Owner

yamadashy commented Jan 1, 2025

Hi @gaby,

Thanks again for reporting this issue!

I'm also trying to reproduce the error on my end, but so far, everything seems to be working correctly on my machine.
To be clear, I've also added a check in our CI environment to run repomix --help and repomix --version across Windows, macOS, and Linux, and these checks are passing.
#237

I recently updated the cli-spinners and commander dependencies, and it's possible that these changes may be interacting unexpectedly with certain Node.js versions or OS environments.

Could you please share a few details about your environment? It would be helpful to know what operating system you're using (e.g., Windows, macOS, or Linux, and the distribution name/version if applicable).

Thank you for your cooperation!

@gaby
Copy link
Contributor

gaby commented Jan 1, 2025

@yamadashy Linux, Ubuntu 22.04 with Nodejs 20.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs discussion Issues needing discussion and a decision to be made before action can be taken
Projects
None yet
Development

No branches or pull requests

3 participants