Skip to content

Typescript library in order to use repomix not only through CLI #468

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

Open
filopedraz opened this issue Apr 6, 2025 · 2 comments
Open

Typescript library in order to use repomix not only through CLI #468

filopedraz opened this issue Apr 6, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request released

Comments

@filopedraz
Copy link

It would be awesome if a ts library was available in order to use repomix in other open-source projects (such as https://github.com/filopedraz/kosuke-core).

@yamadashy yamadashy self-assigned this Apr 19, 2025
@yamadashy yamadashy added the enhancement New feature or request label Apr 19, 2025
@yamadashy
Copy link
Owner

Hi, @filopedraz !
Thanks for the suggestion!

Repomix is already structured to be usable as a library — you can import directly from index.ts:

https://github.com/yamadashy/repomix/blob/main/src/index.ts

We also use it that way ourselves on repomix.com. You can refer to this for a concrete example:

https://github.com/yamadashy/repomix/blob/main/website/server/src/remoteRepo.ts

If there are other functions you'd like to see exported, feel free to leave a comment!

@yamadashy
Copy link
Owner

yamadashy commented Apr 19, 2025

I've put an implementation to increase the number of exported methods into the main branch. Please wait for the release.

I've also documented how to use it as a library.
https://repomix.com/guide/development/using-repomix-as-a-library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

No branches or pull requests

3 participants
@yamadashy @filopedraz and others