sourceprompt
sourceprompt 1.0.5
코드베이스를 LLM으로 공급할 수있는 프롬프트로 변환합니다.
요컨대 : 지정된 디렉토리 / git repostiory에서 모든 텍스트 파일을 스캔하고 컨텐츠 (경로와 함께)를 구조화 된 마크 다운 문서에 넣습니다.
기본적으로 -r 사용하여 생략하거나 -p 옵션을 사용하여 대체 할 수있는 사전 정의 된 프롬프트를 제공합니다.
릴리스에서 바이너리를 다운로드하거나 사용하여 설치하십시오.
go install github.com/rostrovsky/sourceprompt@latest.-i, --include 포함되어야하는 경로의 정면 패턴.-e, --exclude 배제 해야하는 경로의 재 늦선형 패턴.-o, --output -출력 파일 경로. 지정되지 않은 경우 출력은 stdout 에 인쇄됩니다.-p, --prompt 프롬프트 파일 경로 또는 URL. 출력 시작 부분에 적용되는 사용자 정의 프롬프트를 지정할 수 있습니다. 지정되지 않은 경우 기본 프롬프트가 사용됩니다.-r, --raw 출력에서 프롬프트를 제거합니다.-v, --verbose 활성화 된 경우 디버그 정보를 인쇄합니다. # output to stdout
sourceprompt /path/to/dir
sourceprompt /path/to/dir -v # debug
sourceprompt https://github.com/some/repo
# use remote git repo for codebase and remote prompt
sourceprompt https://github.com/some/repo -p https://raw.githubusercontent.com/another/repo/prompt.md -o out.md
# output to stdout without default prompt
sourceprompt /path/to/dir -r
# output to file
sourceprompt /path/to/dir -o out.md
# output to file with custom prompt
sourceprompt /path/to/dir -o out.md -p my_prompt.txt
# include only src/ files
sourceprompt /path/to/dir -o out.md -i ' ^src '
# include only C source files
sourceprompt /path/to/dir -o out.md -i ' .c$ ' -i ' .h$ '
# exclude markdown files
sourceprompt /path/to/dir -o out.md -e ' .md$ '
# exclude multiple types
sourceprompt /path/to/dir -o out.md -e ' .md$ ' -e ' .txt$ ' -e ' LICENSE ' You will be provided with a markdown text (under the "---" separator) containing the contents of a codebase. Each code snippet will be enclosed in code fences, along with the corresponding file name. Your task is to analyze the codebase and gain a comprehensive understanding of its structure, functionality, and key features.
Please follow these steps:
1. Read through the entire codebase carefully, paying attention to the file names and the code within each code fence.
2. Identify the main components, modules, or classes of the codebase and their responsibilities. Summarize the purpose and functionality of each significant component.
3. Analyze the relationships and dependencies between different parts of the codebase. Identify any important interactions, data flow, or control flow between the components.
4. Extract the most important features and functionalities implemented in the codebase. Highlight any critical algorithms, data structures, or design patterns used.
5. Consider the overall architecture and design of the codebase. Identify any architectural patterns or principles followed, such as MVC, MVVM, or microservices.
6. Evaluate the code quality, readability, and maintainability. Note any areas that could be improved or any potential issues or vulnerabilities.
7. Provide a summary of your analysis, including the key insights, strengths, and weaknesses of the codebase. Offer suggestions for improvements or optimizations, if applicable.
8. Based on your understanding of the codebase, provide guidance on how AI agents can effectively operate across the entire codebase. Identify the entry points, important functions, or APIs that the agents should focus on for interaction and manipulation.
9. Discuss any specific considerations or challenges that AI agents may face when working with this codebase, such as dependencies, external libraries, or platform-specific requirements.
10. Conclude your analysis by providing a high-level overview of the codebase's functionality, architecture, and potential use cases. Highlight any notable features or aspects that make this codebase unique or valuable.
Your analysis should be thorough, insightful, and aimed at enabling AI agents to effectively understand and operate within the given codebase. Provide clear explanations and examples to support your findings and recommendations.
---