{"_id":"@ashutoshpaliwal26/code-x-ray","name":"@ashutoshpaliwal26/code-x-ray","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@ashutoshpaliwal26/code-x-ray","version":"1.0.0","description":"High-performance AST scanner for Node.js","main":"index.js","repository":{"type":"git","url":"git+https://github.com/ashutoshpaliwal26/code-x-ray.git"},"license":"MIT","browser":"browser.js","keywords":["napi-rs","NAPI","N-API","Rust","node-addon","ast","parser"],"napi":{"binaryName":"code-x-ray","targets":["x86_64-unknown-linux-gnu","x86_64-pc-windows-msvc","x86_64-apple-darwin","aarch64-apple-darwin"],"packageJson":{"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}},"engines":{"node":">= 10.16.0 < 11 || >= 11.8.0 < 12 || >= 12.0.0"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"scripts":{"artifacts":"napi artifacts","bench":"node --import @oxc-node/core/register benchmark/bench.ts","build":"napi build --platform --release","build:debug":"napi build --platform","format":"run-p format:prettier format:rs format:toml","format:prettier":"prettier . -w","format:toml":"taplo format","format:rs":"cargo fmt","lint":"oxlint .","prepublishOnly":"napi prepublish -t npm","test":"ava","preversion":"napi build --platform && git add .","version":"napi version","prepare":"husky"},"devDependencies":{"@emnapi/core":"^1.5.0","@emnapi/runtime":"^1.5.0","@napi-rs/cli":"^3.2.0","@oxc-node/core":"^0.0.35","@taplo/cli":"^0.7.0","@tybys/wasm-util":"^0.10.0","ava":"^6.4.1","chalk":"^5.6.2","husky":"^9.1.7","lint-staged":"^16.1.6","npm-run-all2":"^8.0.4","oxlint":"^1.14.0","prettier":"^3.6.2","tinybench":"^6.0.0","typescript":"^5.9.2"},"lint-staged":{"*.@(js|ts|tsx)":["oxlint --fix"],"*.@(js|ts|tsx|yml|yaml|md|json)":["prettier --write"],"*.toml":["taplo format"]},"ava":{"extensions":{"ts":"module"},"timeout":"1m","workerThreads":false,"environmentVariables":{"OXC_TSCONFIG_PATH":"./__test__/tsconfig.json"},"nodeArguments":["--import","@oxc-node/core/register"]},"prettier":{"printWidth":120,"semi":false,"trailingComma":"all","singleQuote":true,"arrowParens":"always"},"packageManager":"yarn@4.12.0","optionalDependencies":{"@ashutoshpaliwal26/code-x-ray-linux-x64-gnu":"1.0.0","@ashutoshpaliwal26/code-x-ray-win32-x64-msvc":"1.0.0","@ashutoshpaliwal26/code-x-ray-darwin-x64":"1.0.0","@ashutoshpaliwal26/code-x-ray-darwin-arm64":"1.0.0"},"_id":"@ashutoshpaliwal26/code-x-ray@1.0.0","gitHead":"274660a914965d1f84179cbb3ac84e50dec33652","types":"./index.d.ts","bugs":{"url":"https://github.com/ashutoshpaliwal26/code-x-ray/issues"},"homepage":"https://github.com/ashutoshpaliwal26/code-x-ray#readme","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-K6gVzmMj+2QSWzzewQetPl7LC8KxPdxyuheT4Hq1Z1p0/CPm7hN+Trfx5znw+Pa2xCzJvwEC5tl0E2KkDP6jVA==","shasum":"2301880e93a431db13f06d4c60d9c33a3a511dfb","tarball":"https://registry.npmjs.org/@ashutoshpaliwal26/code-x-ray/-/code-x-ray-1.0.0.tgz","fileCount":5,"unpackedSize":32384,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ashutoshpaliwal26%2fcode-x-ray@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCH2z3S12wD7v1WSuNzmDZdi1ttIeeELT/huEMjnAJDOcCIQDkzITBchpGTFvD3ELlkbjqrGz11VFonMTu2Xk/FSj73A=="}]},"_npmUser":{"name":"ashutoshpaliwal26","email":"ashutoshpaliwal26@gmail.com"},"directories":{},"maintainers":[{"name":"ashutoshpaliwal26","email":"ashutoshpaliwal26@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/code-x-ray_1.0.0_1766896374304_0.9769294326776639"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-28T04:32:54.207Z","1.0.0":"2025-12-28T04:32:54.444Z","modified":"2025-12-28T04:32:54.951Z"},"maintainers":[{"name":"ashutoshpaliwal26","email":"ashutoshpaliwal26@gmail.com"}],"description":"High-performance AST scanner for Node.js","homepage":"https://github.com/ashutoshpaliwal26/code-x-ray#readme","keywords":["napi-rs","NAPI","N-API","Rust","node-addon","ast","parser"],"repository":{"type":"git","url":"git+https://github.com/ashutoshpaliwal26/code-x-ray.git"},"bugs":{"url":"https://github.com/ashutoshpaliwal26/code-x-ray/issues"},"license":"MIT","readme":"<div align=\"center\">\n\n# ⚡️ C O D E - X - R A Y\n\n**The High-Performance AST Scanner for the Modern Web**\n\n[![CI Status](https://img.shields.io/github/actions/workflow/status/YOUR_USERNAME/code-x-ray/CI.yml?style=for-the-badge&logo=github&labelColor=18181b&color=22c55e)](https://github.com/YOUR_USERNAME/code-x-ray/actions)\n[![NPM Version](https://img.shields.io/npm/v/code-x-ray?style=for-the-badge&logo=npm&labelColor=18181b&color=cb3030)](https://www.npmjs.com/package/code-x-ray)\n[![Built With Rust](https://img.shields.io/badge/Powered_By-Rust-orange?style=for-the-badge&logo=rust&labelColor=18181b&color=ef4444)](https://www.rust-lang.org/)\n[![License](https://img.shields.io/npm/l/code-x-ray?style=for-the-badge&labelColor=18181b&color=3b82f6)](LICENSE)\n\n<br />\n\n**Give your AI Agents \"Eyes\" into your codebase.**\n<br />\n*Scan 10,000 files in seconds. Extract symbols instantly. Zero overhead.*\n\n[Report Bug](https://github.com/YOUR_USERNAME/code-x-ray/issues) · [Request Feature](https://github.com/YOUR_USERNAME/code-x-ray/issues)\n\n</div>\n\n---\n\n## 🔮 The Problem\nNode.js is fantastic, but it struggles with heavy computation. Trying to parse thousands of TypeScript or Python files in a single thread is slow, fragile, and memory-intensive.\n\n## ⚡️ The Solution: **Code X-Ray**\nWe moved the heavy lifting to **Rust**.\nBy bridging Node.js with a compiled Rust binary, we bypass the event loop entirely, utilizing **Parallel Computing** to scan your project at the speed of disk I/O.\n\n### 🔥 Why Developers Choose X-Ray\n\n| 🚀 Blazing Performance | 🛡️ Bulletproof Safety | 🧠 Intelligent Parsing |\n| :--- | :--- | :--- |\n| Uses `Rayon` to multithread across all CPU cores. Scans **~1.5ms per file**. | Sandboxed file access. Respects `.gitignore` automatically. No crashes. | Powered by **Tree-Sitter**. Understands code structure, not just regex matches. |\n\n---\n\n## 📦 Installation\n\nAdd it to your project with a single command. It detects your OS (Windows/Linux/Mac) and downloads the correct optimized binary automatically.\n\n```bash\nnpm install code-x-ray\n\n```\n💻 Developer Experience\nWe designed Code X-Ray to feel like a native part of your toolchain. It’s fully typed, asynchronous-ready, and zero-config.\n\n1. The \"Hello World\" Scan\nGet a complete map of your project in 3 lines of code.\n\nTypeScript\n```\nimport { scanProject } from 'code-x-ray';\n```\n## 🚀 Fire up the engine (scans recursively)\n```\nconsole.time(\"✨ Magic Time\");\nconst context = scanProject(\"./src\");\nconsole.timeEnd(\"✨ Magic Time\");\n\nconsole.log(`\\n📦 Scanned ${context.files_scanned} files in ${context.duration_ms}ms`);\n```\n\n### 2. Powerful Filtering\nDon't just scan—understand. Filter the raw AST data to find exactly what you need.\n\nTypeScript\n```\n// Example: Find all 'TODO' comments or specific function definitions\nconst context = scanProject(\"./src\");\n\n// 🔍 Filter for TypeScript functions only\nconst functions = context.files\n  .filter(f => f.language === 'TypeScript')\n  .flatMap(f => f.symbols)\n  .filter(s => s.kind === 'function');\n\nconsole.table(functions.map(fn => ({\n  Name: fn.name,\n  Location: `L${fn.start.row}:${fn.start.column}`,\n  Signature: fn.signature || '(unknown)'\n})));\n```\n### 3. The \"Context\" Payload\nThe engine returns a clean, highly-structured JSON object optimized for LLM Context Windows (GPT-4, Claude, Llama 3).\n\n<details> <summary><b>👀 Click to view sample JSON Output</b></summary>\n\nJSON\n```\n{\n  \"root_dir\": \"./src\",\n  \"stats\": {\n    \"duration_ms\": 142.5,\n    \"files_processed\": 45,\n    \"threads_active\": 12\n  },\n  \"files\": [\n    {\n      \"path\": \"src/services/auth.ts\",\n      \"language\": \"TypeScript\",\n      \"size\": 2048,\n      \"symbols\": [\n        {\n          \"name\": \"authenticateUser\",\n          \"kind\": \"function\",\n          \"range\": { \n            \"start\": { \"row\": 15, \"col\": 0 }, \n            \"end\": { \"row\": 25, \"col\": 1 } \n          },\n          \"signature\": \"async (token: string) => Promise<User>\"\n        }\n      ]\n    }\n  ]\n}\n```\n</details>\n","readmeFilename":"README.md","_rev":"1-7eff4d90bcba0ae7cabb7e53d15feb0e"}