{"id":46506124,"url":"https://github.com/nette/xray","last_synced_at":"2026-03-11T20:00:44.256Z","repository":{"id":342272707,"uuid":"1173459399","full_name":"nette/xray","owner":"nette","description":"🔬 Nette X-Ray - see exactly how your project uses the Nette ecosystem","archived":false,"fork":false,"pushed_at":"2026-03-06T21:32:13.000Z","size":45,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-10T22:53:26.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nette.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","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":"dg","custom":"https://nette.org/donate"}},"created_at":"2026-03-05T11:44:07.000Z","updated_at":"2026-03-06T21:32:17.000Z","dependencies_parsed_at":"2026-03-07T16:03:53.223Z","dependency_job_id":null,"html_url":"https://github.com/nette/xray","commit_stats":null,"previous_names":["nette/xray"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nette/xray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nette%2Fxray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nette%2Fxray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nette%2Fxray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nette%2Fxray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nette","download_url":"https://codeload.github.com/nette/xray/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nette%2Fxray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30398148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T18:46:22.935Z","status":"ssl_error","status_checked_at":"2026-03-11T18:46:17.045Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-03-06T15:00:28.356Z","updated_at":"2026-03-11T20:00:44.205Z","avatar_url":"https://github.com/nette.png","language":"PHP","readme":"# Nette Xray\n\n![Nette Xray](https://github.com/user-attachments/assets/ca33d964-9724-4024-a12c-17d1425ccd0d)\n\n[![Downloads this Month](https://img.shields.io/packagist/dm/nette/xray.svg)](https://packagist.org/packages/nette/xray)\n[![Tests](https://github.com/nette/xray/workflows/Tests/badge.svg?branch=master)](https://github.com/nette/xray/actions)\n[![Latest Stable Version](https://poser.pugx.org/nette/xray/v/stable)](https://github.com/nette/xray/releases)\n[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/nette/xray/blob/master/license.md)\n\n\n### See exactly how your project uses the Nette ecosystem\n\nEver wondered which Nette methods you call the most? Which Latte filters you actually use? Whether anyone still touches that old configuration key?\n\nNette Xray scans your codebase and gives you a detailed, visual breakdown of your Nette API usage - every method call, every template filter, every config pattern.\n\n✅ deep PHP analysis powered by PHPStan's type system\u003cbr\u003e\n✅ Latte template analysis - tags, filters, n:attributes\u003cbr\u003e\n✅ NEON configuration analysis - services, extensions, settings\u003cbr\u003e\n✅ beautiful standalone HTML report you can explore\u003cbr\u003e\n✅ completely anonymized - no code, no names, just numbers\u003cbr\u003e\n\n \u003c!----\u003e\n\n\nHow It Works\n============\n\nNette Xray uses static analysis to understand your code precisely - not regex, not guessing. It resolves types through inheritance, detects declaring classes, and tracks argument patterns. The result is an accurate picture of how your project interacts with the Nette ecosystem.\n\n**What gets analyzed:**\n\n| PHP / PHPT | Latte templates | NEON config |\n|---|---|---|\n| method \u0026 function calls | tags \u0026 n:attributes | DI service patterns |\n| arguments (positional, named) | filters \u0026 their arguments | extension registration |\n| return value usage | functions \u0026 constants | section usage |\n| property access | syntax variants | configuration keys |\n| class inheritance \u0026 traits | dynamic elements | database keys |\n| method overrides | self-closing tags | |\n| constants \u0026 instantiation | | |\n| callable references | | |\n\n \u003c!----\u003e\n\n\nInstallation\n============\n\n```shell\ncomposer require --dev nette/xray\n```\n\nRequires PHP 8.2 or higher. Runs on PHPStan 2.1. Works with any project using Nette, Latte, Tracy, Dibi, or Texy.\n\n \u003c!----\u003e\n\n\nUsage\n=====\n\nPoint it at your source directories:\n\n```shell\nvendor/bin/xray app/ src/\n```\n\nThat's it. Within moments you get:\n\n1. **HTML report** (`xray-report.html`) - an interactive visual breakdown you can open in your browser\n2. **JSON data** (`xray-report.json`) - structured data for further processing\n\n```\nNette Xray\n==========\n\nScanning PHP files ... 142/142 done\nScanning NEON files ... 4/4 done\nScanning Latte files ... 87/87 done\n\nReports saved to:\n  xray-report.json\n  xray-report.html\n```\n\n\nThe HTML Report\n---------------\n\nThe HTML report is a standalone file - no server needed, just open it in your browser. It gives you a complete picture:\n\n- Which Nette APIs your project depends on most\n- How you pass arguments - positionally or by name\n- Which methods you override from Nette base classes\n- Which Latte filters and tags dominate your templates\n- How your DI configuration is structured\n\nIt's your project's X-ray.\n\n\nConfiguration\n-------------\n\nCreate a `nette-xray.neon` file in your project root to customize behavior:\n\n```neon\n# Default analysis paths (used when no CLI arguments given)\npaths:\n    - app\n    - src\n\n# Additional directories to exclude (vendor, temp, node_modules, .git excluded by default)\nexcludeDirs:\n    - generated\n\n# Auto-upload without asking (default: false)\nupload: true\n```\n\n \u003c!----\u003e\n\n\nHelp Shape the Future of Nette\n===============================\n\nWhen you run Nette Xray, you can optionally send the anonymized report to help guide Nette's development:\n\n```\nShare anonymized data with Nette? [y/N] y\nData sent. Thank you!\n```\n\n**What gets sent:** only aggregated numbers - how many times each API is called, which patterns are used. No file paths, no variable names, no business logic. Just statistics.\n\n**Why it matters:** real usage data helps prioritize what to improve, what to keep, and what can safely evolve. It's far more reliable than surveys.\n\n\n \u003c!----\u003e\n\n\nPrivacy\n=======\n\nNette Xray is designed with privacy as a core principle:\n\n- **No code is collected** - only counts and patterns\n- **No file paths** - you can't tell what the project does\n- **No string values** - argument values are never captured\n- **Completely optional** - data is only sent if you explicitly confirm\n- **Open source** - you can read exactly what gets collected\n\nThe JSON report is saved locally first. You can inspect it before deciding to share.\n\n \u003c!----\u003e\n\n\n[Support Me](https://github.com/sponsors/dg)\n=============================================\n\nDo you like Nette Xray? Are you looking forward to the new features?\n\n[![Buy me a coffee](https://files.nette.org/icons/donation-3.svg)](https://github.com/sponsors/dg)\n\nThank you!\n","funding_links":["https://github.com/sponsors/dg","https://nette.org/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnette%2Fxray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnette%2Fxray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnette%2Fxray/lists"}