{"id":50910373,"url":"https://github.com/avm-sistemas/java-llm-extractor","last_synced_at":"2026-06-16T09:32:52.587Z","repository":{"id":357964824,"uuid":"1239332991","full_name":"avm-sistemas/java-llm-extractor","owner":"avm-sistemas","description":"A pragmatic utility designed to crawl through a JSF/Java legacy application and consolidate its menu architecture into a structured, LLM-ready Markdown document.","archived":false,"fork":false,"pushed_at":"2026-05-15T02:38:11.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T04:12:20.345Z","etag":null,"topics":["ai-tools","extractor","java","jsf","llm","llm-ready","strategy"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avm-sistemas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"avmesquita","buy_me_a_coffee":"avmesquita","custom":"https://www.paypal.com/paypalme/avmesquita"}},"created_at":"2026-05-15T01:54:15.000Z","updated_at":"2026-05-15T02:38:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/avm-sistemas/java-llm-extractor","commit_stats":null,"previous_names":["avm-sistemas/java-llm-extractor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/avm-sistemas/java-llm-extractor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avm-sistemas%2Fjava-llm-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avm-sistemas%2Fjava-llm-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avm-sistemas%2Fjava-llm-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avm-sistemas%2Fjava-llm-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avm-sistemas","download_url":"https://codeload.github.com/avm-sistemas/java-llm-extractor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avm-sistemas%2Fjava-llm-extractor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34400451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai-tools","extractor","java","jsf","llm","llm-ready","strategy"],"created_at":"2026-06-16T09:32:51.150Z","updated_at":"2026-06-16T09:32:52.561Z","avatar_url":"https://github.com/avm-sistemas.png","language":"TypeScript","funding_links":["https://github.com/sponsors/avmesquita","https://buymeacoffee.com/avmesquita","https://www.paypal.com/paypalme/avmesquita"],"categories":[],"sub_categories":[],"readme":"# Java LLM Extractor\n[![Build Extractor Binaries](https://github.com/avm-sistemas/java-llm-extractor/actions/workflows/build.yml/badge.svg)](https://github.com/avm-sistemas/java-llm-extractor/actions/workflows/build.yml)\n\nA pragmatic utility designed to crawl through a JSF/Java legacy application and consolidate its menu architecture into a structured, LLM-ready Markdown document.\n\nThis tool was built to solve the \"context window\" problem for AI agents (Copilot, Cursor, Claude, etc.) working on large-scale legacy systems — especially those built with **JSF + PrimeFaces + Java EE**. Instead of feeding thousands of raw source files into an LLM, you feed it the relevant slice of this document.\n\n## Core Principles\n\n* **Performance over contraptions:** Scans thousands of Java files in seconds, resolving labels, URLs and business methods in a single pass.\n* **Operational efficiency:** Single-binary execution. No Node.js runtime required on the target machine.\n* **KISS:** No complex UI. Just a CLI that does one thing: turns a JSF sidebar + Java source tree into a clean, semantic Markdown map.\n\n## What it extracts\n\nFor each item in the application menu (`sidebar.xhtml`), the tool produces:\n\n* **Menu hierarchy** — module \u003e submodule \u003e function (up to 3 levels)\n* **Screen URL** — the JSF page path\n* **Permission key** — the access control identifier (`trinityUtils.userHasPermission`)\n* **Java classes** — the backing beans and controllers mapped to that screen\n* **Business operations** — public non-getter/setter methods found in each class\n* **Permission index** — a full table of all permissions cross-referenced to their function and module\n\n## Usage\n\n### Development (requires Node.js 18+)\n\n```bash\nnpm install\nnpx tsx index.ts \"\u003cproject-root\u003e\" \"\u003coutput-file\u003e\" [--utf8]\n```\n\n**Arguments:**\n\n| Argument | Description | Default |\n|---|---|---|\n| `\u003cproject-root\u003e` | Root path of the Java project | current directory |\n| `\u003coutput-file\u003e` | Output Markdown file name | `menu-architecture.md` |\n| `--utf8` | Write output in UTF-8 instead of ISO-8859-1 | Latin-1 (default) |\n\n**Example:**\n\n```bash\n# Latin-1 output (standard)\nnpx tsx index.ts \"C:\\Projetos\\Company\\Company-1.0-master\" \"menu-architecture.md\"\n\n# UTF-8 output (for LLM APIs or web tools)\nnpx tsx index.ts \"C:\\Projetos\\Company\\Company-1.0-master\" \"menu-architecture.md\" --utf8\n\n```\n\n\n\n### Binary (no Node.js required)\n\nDownload the binary for your OS from the **GitHub Actions** tab (under Artifacts) or build it locally:\n\n```bash\nnpm run build\n```\n\nThen run:\n\n```bash\n# Windows\n.\\bin\\java-llm-extractor-win.exe \"C:\\Projetos\\Company\\Company-1.0-master\" menu-architecture.md\n\n# Linux\n./bin/java-llm-extractor-linux \"C:/Projetos/Company/Company-1.0-master\" menu-architecture.md\n```\n\n## Expected project structure\n\nThe tool expects a standard Maven multi-module layout:\n\n```\n\u003cproject-root\u003e/\n  web/src/main/\n    webapp/layout/sidebar.xhtml     ← menu tree\n    properties/messages.properties  ← PT-BR labels\n    java/...                        ← backing beans\n  core/src/main/java/...            ← core services\n  common/src/main/java/...          ← shared utilities\n```\n\n## Output sample\n\n```markdown\n##### Pesagem de Entrada\n\n- **URL:** `/com/arcadian/product/web/pesagemEntradaModalRodoviario/pesar-modal-rodoviario-na-entrada.jsf`\n- **Permission:** `pesar-modal-rodoviario-na-entrada`\n- **Java Classes:**\n  - `web\\src\\main\\java\\...\\PesagemEntradaModalRodoviarioController.java`\n    - Operations: iniciar, confirmar, cancelar, pesarVeiculo, gerarTicket\n```\n\n## Encoding\n\nSource files are read in **ISO-8859-1** (Latin-1), which is the encoding standard. The output file is written in the same encoding by default. Use `--utf8` to produce a UTF-8 output when sending the document to external LLM APIs or web-based tools.\n\n## Artifacts:\n\n  - [Binaries](https://github.com/avm-sistemas/java-llm-extractor/actions/runs/25896296004/artifacts/7008733037)\n\n\n## Author\n\nAndre Mesquita\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favm-sistemas%2Fjava-llm-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favm-sistemas%2Fjava-llm-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favm-sistemas%2Fjava-llm-extractor/lists"}