#context #github #repo #llm #folder #file #file-extension

app repocat

一个用于将github仓库中的所有代码和文本文件连接在一起的工具,以便用于LLM推理上下文

4个版本

0.1.3 2024年8月24日
0.1.2 2024年8月24日
0.1.1 2024年8月9日
0.1.0 2024年8月9日

70机器学习

Download history 184/week @ 2024-08-05 22/week @ 2024-08-12

206 每月下载次数

MIT 许可证

10KB
103 代码行

REPOCAT 🐱

这是一个简单的命令行工具,可以接受以下任一输入:

  1. github仓库url
  2. 文件夹路径

并将所有文本/代码文件合并成一个txt文件。这使得它更容易用作LLM的上下文。

它寻找哪些文件扩展名?

请检查 src/main.rs 以获取扩展名。欢迎提交PR以添加更多

它会自动过滤某些文件吗?

是的!repocat使用了来自ripgrep的ignore crate,这意味着它默认忽略以下所有内容

Files and directories that match glob patterns in these three categories:
    .gitignore globs (including global and repo-specific globs). This includes .gitignore files in parent directories that are part of the same git repository. (Unless the --no-require-git flag is given.)
    .ignore globs, which take precedence over all gitignore globs when there's a conflict. This includes .ignore files in parent directories.
    .rgignore globs, which take precedence over all .ignore globs when there's a conflict. This includes .rgignore files in parent directories.
Hidden files and directories.
Binary files. (ripgrep considers any file with a NUL byte to be binary.)
Symbolic links aren't followed.

依赖项

~16–30MB
~576K SLoC