{"id":21333802,"url":"https://github.com/rostrovsky/sourceprompt","last_synced_at":"2025-04-15T01:34:30.399Z","repository":{"id":229464182,"uuid":"772924644","full_name":"rostrovsky/sourceprompt","owner":"rostrovsky","description":"Converts your codebase into LLM prompt","archived":false,"fork":false,"pushed_at":"2024-09-12T14:59:46.000Z","size":5893,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T13:21:37.941Z","etag":null,"topics":["codebase","golang","llm","prompt","prompt-engineering"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rostrovsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-16T08:54:23.000Z","updated_at":"2025-03-26T11:48:39.000Z","dependencies_parsed_at":"2024-03-24T15:30:14.393Z","dependency_job_id":"40062152-1581-4cc5-99b1-46e678e27f3c","html_url":"https://github.com/rostrovsky/sourceprompt","commit_stats":null,"previous_names":["rostrovsky/sourceprompt"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rostrovsky%2Fsourceprompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rostrovsky%2Fsourceprompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rostrovsky%2Fsourceprompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rostrovsky%2Fsourceprompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rostrovsky","download_url":"https://codeload.github.com/rostrovsky/sourceprompt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248989130,"owners_count":21194534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codebase","golang","llm","prompt","prompt-engineering"],"created_at":"2024-11-21T23:16:17.502Z","updated_at":"2025-04-15T01:34:30.383Z","avatar_url":"https://github.com/rostrovsky.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sourceprompt\n\nConverts your codebase into prompt which you can feed into LLM.\n\nIn short: it scans all the text files in specified directory / git repostiory and puts their content (along with their path) into structured markdown document.\n\nBy default it provides predefined prompt which can be omitted using `-r` or replaced using `-p` options.\n\n## Installation\n\nDownload binary from releases or install using:\n\n```bash\ngo install github.com/rostrovsky/sourceprompt@latest\n```\n\n## Ignored files / paths\n\n* Files/directories starting with `.`\n* Binary files\n\n## Flags\n\n* `-i, --include` - Regex patterns of paths that should be included.\n* `-e, --exclude` - Regex patterns of paths that should be excluded.\n* `-o, --output` - Output file path. When not specified, output will be printed to `stdout`.\n* `-p, --prompt` - Prompt file path or URL. Allows specifying custom prompt which will be put at the beginning of the output. **If not specified, [default prompt](#default-prompt) will be used.**\n* `-r, --raw` - Removes prompt from the output.\n* `-v, --verbose` - Prints debug info when enabled.\n\n## Examples\n\n### Output to stdout\n\n```bash\n# output to stdout\nsourceprompt /path/to/dir\nsourceprompt /path/to/dir -v # debug\nsourceprompt https://github.com/some/repo\n\n# use remote git repo for codebase and remote prompt\nsourceprompt https://github.com/some/repo -p https://raw.githubusercontent.com/another/repo/prompt.md -o out.md\n\n# output to stdout without default prompt\nsourceprompt /path/to/dir -r\n\n# output to file\nsourceprompt /path/to/dir -o out.md\n\n# output to file with custom prompt\nsourceprompt /path/to/dir -o out.md -p my_prompt.txt\n\n# include only src/ files\nsourceprompt /path/to/dir -o out.md -i '^src'\n\n# include only C source files\nsourceprompt /path/to/dir -o out.md -i '.c$' -i '.h$'\n\n# exclude markdown files\nsourceprompt /path/to/dir -o out.md -e '\\.md$'\n\n# exclude multiple types\nsourceprompt /path/to/dir -o out.md -e '.md$' -e '.txt$' -e 'LICENSE'\n```\n\n## Default prompt\n\n```\nYou 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.\n\nPlease follow these steps:\n\n1. Read through the entire codebase carefully, paying attention to the file names and the code within each code fence.\n2. Identify the main components, modules, or classes of the codebase and their responsibilities. Summarize the purpose and functionality of each significant component.\n3. Analyze the relationships and dependencies between different parts of the codebase. Identify any important interactions, data flow, or control flow between the components.\n4. Extract the most important features and functionalities implemented in the codebase. Highlight any critical algorithms, data structures, or design patterns used.\n5. Consider the overall architecture and design of the codebase. Identify any architectural patterns or principles followed, such as MVC, MVVM, or microservices.\n6. Evaluate the code quality, readability, and maintainability. Note any areas that could be improved or any potential issues or vulnerabilities.\n7. Provide a summary of your analysis, including the key insights, strengths, and weaknesses of the codebase. Offer suggestions for improvements or optimizations, if applicable.\n8. 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.\n9. 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.\n10. 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.\n\nYour 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.\n\n---\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frostrovsky%2Fsourceprompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frostrovsky%2Fsourceprompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frostrovsky%2Fsourceprompt/lists"}