@emtai/xray-index
v1.0.0
Published
Local codebase indexer for XRay-Vision - extracts code structure and uploads to server
Maintainers
Readme
@emtai/xray-index
Local codebase indexer for XRay-Vision. Extracts code structure (functions, classes, imports, call graphs) and uploads to the XRay-Vision server for analysis.
Quick Start
npx @emtai/xray-index /path/to/your/repo --upload --token YOUR_API_KEYUsage
xray-index <repo-path> [options]Options
| Option | Description | Default |
|--------|-------------|---------|
| --upload | Upload results to XRay-Vision server | off |
| --token <token> | API key for upload authentication | - |
| --server <url> | XRay-Vision server URL | https://emtai-xray.emtailabs.com |
| --shadow-path <path> | Custom shadow copy location | ~/.xray-vision/shadows |
| --skip-shadow-prompt | Skip shadow copy confirmation | off |
| --output <file> | Save results to file instead of uploading | - |
| -v, --verbose | Verbose output | off |
How It Works
- Shadow copy - Creates a safe copy of your codebase (excluding
node_modules,.git, etc.) - Extraction - Parses TypeScript/JavaScript/Python/Go/Rust/Java files to extract functions, classes, imports, and call relationships
- Upload - Sends the extracted data to XRay-Vision for graph-based analysis
Examples
Index and upload
npx @emtai/xray-index ./my-project --upload --token xray-abc123Index and save locally
npx @emtai/xray-index ./my-project --output analysis.jsonCustom server
npx @emtai/xray-index ./my-project --upload --token xray-abc123 --server https://your-server.comGet an API Key
Get your API key from the XRay-Vision dashboard under Settings > API Keys.
Requirements
- Node.js >= 18.0.0
