localize-design
CLI to localize Java design issues using PMD, Tree-sitter, and autonomous LangGraph agents.
Install
From PyPI:
pip install localize-design
# or
uv pip install localize-design
You also need PMD on your PATH for full analysis (optional but recommended):
brew install pmd
Set your OpenAI API key:
OPENAI_API_KEY=...
MODEL=gpt-4o-mini
Usage
# Run LangGraph agents — produces a ranked refactoring report
localize-design --file path/to/File.java
# Shorthand alias
ldesign --file path/to/File.java
# Save output as JSON
localize-design --file path/to/File.java --format json -o report.json
# Text report to stdout
localize-design --file path/to/File.java --format text
Development
git clone https://github.com/fraolBatole/LocalizeAgent.git
cd LocalizeAgent
uv sync
Add .env in the repo root with your OPENAI_API_KEY.
Run from source:
uv run localize-design --file tests/fixtures/test_input2.java
How it works
Three autonomous agents run in sequence, each calling tools as needed:
- Evidence collector — calls
run_pmd,run_treesitter,run_structural_metrics,correlate_evidence - Issue localizer — inspects correlated findings, identifies design issues and refactoring targets
- Ranker — ranks targets by impact, produces a final markdown report
Project layout
src/
cli.py entry point
models.py Pydantic types
config/ PMD ruleset
utils/ static analysis (pmd, treesitter, structural, correlator)
agent/ LangGraph workflow, nodes, LLM tools
tests/
fixtures/ sample Java files
Tests
uv run pytest
Publish to PyPI
Maintainers only:
uv build
uv publish
Metadata
Release files for localize-design 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| localize_design-1.0.0.tar.gz | 15.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| localize_design-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.9 kB
Release files / localize_design-1.0.0.tar.gz
| Download URL | localize_design-1.0.0.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e6d481e965aae5035690e161de0855af321258ed537d6e021929e937f13c1da
|
|
BLAKE2b-256 checksum How to use checksums |
3ee91e5c841b772cb027e27d933af776a056cdeb636c4f4bc402980f6f10786f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Release files / localize_design-1.0.0-py3-none-any.whl
| Download URL | localize_design-1.0.0-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7de0c81ccbae0473900d2f8137dcd6194d841d9c6ea1ebfbbf258bed522b5f04
|
|
BLAKE2b-256 checksum How to use checksums |
8b51312df55a33ee40d4ad9e2184cc84527e06852feef22a4e6f52d6bae64577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Security for localize-design 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.