| Name | locify JSON |
| Version |
0.0.2
JSON |
| download |
| home_page | None |
| Summary | A library for navigating over large codebases. |
| upload_time | 2024-10-22 14:04:03 |
| maintainer | None |
| docs_url | None |
| author | Hoang Tran |
| requires_python | <4.0,>=3.12 |
| license | MIT |
| keywords |
|
| VCS |
|
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# Locify 🔎
<!--- BADGES: START --->
[][#pypi-package]
[][#pypi-package]
[][#github-license]
[][#docs-package]
[#github-license]: https://github.com/ryanhoangt/locify/blob/main/LICENSE
[#pypi-package]: https://pypi.org/project/locify/
[#docs-package]: https://ryanhoangt.github.io/locify/
<!--- BADGES: END --->
*Locify* is a library designed to help LLM-based agents navigate and analyze large codebases efficiently. It leverages parsing techniques to provide insights into code structure and relationships.
## Features
On a *Git-based* repository, *Locify* offers:
- **Codebase Skeleton Mapping**:
- [`FullMapStrategy`](locify/indexing/full_map/README.md): Generates a skeleton map of the entire codebase or a directory only.
- [`RepoMapStrategy`](locify/indexing/repo_map/README.md): Focuses on the reference relationships, using graph theory to rank and analyze code elements.
- **Tree-sitter Integration**: Utilizes Tree-sitter for precise parsing of source code, supporting multiple programming languages.
- **Command-Line Interface**: Provides a user-friendly CLI for executing different mapping strategies.
## Installation
*Locify* can be installed via pip:
```bash
pip install locify
```
## Usage
### Command-Line Interface
Locify offers a CLI to execute mapping strategies:
```bash
python -m locify.cli <strategy> get_map_with_token_count [options]
```
- `<strategy>`: Choose between `fullmap` and `repomap`.
- `[options]`: Additional options for customizing the mapping process, e.g. file's depth, or
specific directories only.
### Example
- To generate a full map of a codebase:
```bash
python -m locify.cli fullmap get_map_with_token_count --root /path/to/gitrepo
```
- To generate a full map of the `locify` directory only, with maximum depth of 3:
```bash
python -m locify.cli fullmap get_map_with_token_count 3 locify
```
## Development
### Directory Structure
- `locify/`: Main source code directory.
- `cli.py`: Command-line interface implementation.
- `indexing/`: Contains strategies for code mapping.
- `full_map/`: Implementation of `FullMapStrategy`.
- `repo_map/`: Implementation of `RepoMapStrategy`.
- `tree_sitter/`: Tree-sitter integration for parsing.
- `parser.py`: Tree-sitter parser implementation.
- `queries/`: Schema query files for different languages.
- `utils/`: Utility functions and classes.
### Testing
Tests are located in the `tests` directory. Run tests using:
```bash
poetry run pytest
```
## Acknowledgements
This project was inspired by the [aider's RepoMap implementation](https://github.com/paul-gauthier/aider/blob/main/aider/repomap.py).
## License
This project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "locify",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": null,
"author": "Hoang Tran",
"author_email": "descience.thh10@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9d/7e/4c97beab24aac8c1ff4b0ed26fd6675213ddbd85b84c33b26b216bb7b926/locify-0.0.2.tar.gz",
"platform": null,
"description": "# Locify \ud83d\udd0e\n\n<!--- BADGES: START --->\n[][#pypi-package]\n[][#pypi-package]\n[][#github-license]\n[][#docs-package]\n\n[#github-license]: https://github.com/ryanhoangt/locify/blob/main/LICENSE\n[#pypi-package]: https://pypi.org/project/locify/\n[#docs-package]: https://ryanhoangt.github.io/locify/\n<!--- BADGES: END --->\n\n*Locify* is a library designed to help LLM-based agents navigate and analyze large codebases efficiently. It leverages parsing techniques to provide insights into code structure and relationships.\n\n## Features\n\nOn a *Git-based* repository, *Locify* offers:\n\n- **Codebase Skeleton Mapping**:\n - [`FullMapStrategy`](locify/indexing/full_map/README.md): Generates a skeleton map of the entire codebase or a directory only.\n - [`RepoMapStrategy`](locify/indexing/repo_map/README.md): Focuses on the reference relationships, using graph theory to rank and analyze code elements.\n\n- **Tree-sitter Integration**: Utilizes Tree-sitter for precise parsing of source code, supporting multiple programming languages.\n\n- **Command-Line Interface**: Provides a user-friendly CLI for executing different mapping strategies.\n\n## Installation\n\n*Locify* can be installed via pip:\n\n```bash\npip install locify\n```\n\n## Usage\n\n### Command-Line Interface\n\nLocify offers a CLI to execute mapping strategies:\n\n```bash\npython -m locify.cli <strategy> get_map_with_token_count [options]\n```\n\n- `<strategy>`: Choose between `fullmap` and `repomap`.\n- `[options]`: Additional options for customizing the mapping process, e.g. file's depth, or\n specific directories only.\n\n### Example\n\n- To generate a full map of a codebase:\n\n ```bash\n python -m locify.cli fullmap get_map_with_token_count --root /path/to/gitrepo\n ```\n\n- To generate a full map of the `locify` directory only, with maximum depth of 3:\n\n ```bash\n python -m locify.cli fullmap get_map_with_token_count 3 locify\n ```\n\n## Development\n\n### Directory Structure\n\n- `locify/`: Main source code directory.\n - `cli.py`: Command-line interface implementation.\n - `indexing/`: Contains strategies for code mapping.\n - `full_map/`: Implementation of `FullMapStrategy`.\n - `repo_map/`: Implementation of `RepoMapStrategy`.\n - `tree_sitter/`: Tree-sitter integration for parsing.\n - `parser.py`: Tree-sitter parser implementation.\n - `queries/`: Schema query files for different languages.\n - `utils/`: Utility functions and classes.\n\n### Testing\n\nTests are located in the `tests` directory. Run tests using:\n\n```bash\npoetry run pytest\n```\n\n## Acknowledgements\n\nThis project was inspired by the [aider's RepoMap implementation](https://github.com/paul-gauthier/aider/blob/main/aider/repomap.py).\n\n## License\n\nThis project is licensed under the terms of the MIT license. See the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library for navigating over large codebases.",
"version": "0.0.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "090e6a5f921cf2ea7cd5d6fa39d270b0db5332de22fd44143fdedec21e85b358",
"md5": "a8d8644c8bde29063d169e4bac4c5ab0",
"sha256": "e9d574147340f16e987877723c5745f9ef13534864a37290b5db02d701c2493b"
},
"downloads": -1,
"filename": "locify-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a8d8644c8bde29063d169e4bac4c5ab0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 20825,
"upload_time": "2024-10-22T14:04:02",
"upload_time_iso_8601": "2024-10-22T14:04:02.254008Z",
"url": "https://files.pythonhosted.org/packages/09/0e/6a5f921cf2ea7cd5d6fa39d270b0db5332de22fd44143fdedec21e85b358/locify-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9d7e4c97beab24aac8c1ff4b0ed26fd6675213ddbd85b84c33b26b216bb7b926",
"md5": "14b2a2ae716c8440242d4e36d8ecd98e",
"sha256": "f3d55ba58cae2f2fca2ce6fb3e471d830b3f66a6f9b17eba76c93a3afe2d225b"
},
"downloads": -1,
"filename": "locify-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "14b2a2ae716c8440242d4e36d8ecd98e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 14463,
"upload_time": "2024-10-22T14:04:03",
"upload_time_iso_8601": "2024-10-22T14:04:03.528298Z",
"url": "https://files.pythonhosted.org/packages/9d/7e/4c97beab24aac8c1ff4b0ed26fd6675213ddbd85b84c33b26b216bb7b926/locify-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-22 14:04:03",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "locify"
}