{"id":18488770,"url":"https://github.com/samk13/rag-code-utils","last_synced_at":"2025-05-13T22:32:35.338Z","repository":{"id":236535809,"uuid":"792799418","full_name":"Samk13/rag-code-utils","owner":"Samk13","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-05T22:20:09.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T22:26:23.250Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Samk13.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGES.md","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-04-27T16:03:32.000Z","updated_at":"2024-05-05T22:20:12.000Z","dependencies_parsed_at":"2024-04-27T17:23:08.921Z","dependency_job_id":"4633d6c7-845b-4486-adf0-d84f29794bbd","html_url":"https://github.com/Samk13/rag-code-utils","commit_stats":null,"previous_names":["samk13/test-code-extraction","samk13/rag-code-utils"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samk13%2Frag-code-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samk13%2Frag-code-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samk13%2Frag-code-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samk13%2Frag-code-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samk13","download_url":"https://codeload.github.com/Samk13/rag-code-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036813,"owners_count":22003655,"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":[],"created_at":"2024-11-06T12:52:48.133Z","updated_at":"2025-05-13T22:32:35.311Z","avatar_url":"https://github.com/Samk13.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![License](https://img.shields.io/github/license/mashape/apistatus.svg)\n\n# RAG Code Utils\n\n## RAG Py Context Miner\n\nThis tool is designed to extract the inheritance tree of a specified class and save it in a file. It searches for the class or function within the specified path and the provided virtual environment, extracting the relevant code from the repository. This process enhances the efficiency of RAG applications by providing the essential code context.\n\nThe purpose of this tool is to furnish RAG with the minimal code context necessary to deliver accurate responses to queries about code snippets pertaining to the given class, without providing the entire codebase.\n\n## Usage\n\nprovide the following variables to the function in `.env` file or as arguments to the script:\n\n* Class or function to extract code for\n`TARGET = 'your_target_class_or_function'`\n\n* Path to the virtual environment to search for the target class or function\n`VENV_PATH = 'path/to/venv'`\n\n* Output file to write the extracted code\n`OUTPUT_FILE = 'path/to/output/file'`\n\n* Path to the repository to search for the target class or function\n`REPO_PATH = 'path/to/repo'`\n\nYou either run the script with the following arguments:\n\n```bash\npython main.py -t TARGET -v VENV_PATH -o OUTPUT_FILE -r REPO_PATH\n# the following arguments are required: -t/--target, -v/--venv, -o/--output, -r/--repo\n```\n\nYou still can provide the `-t` argument to change your class target.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamk13%2Frag-code-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamk13%2Frag-code-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamk13%2Frag-code-utils/lists"}