Scanner CLI
Scan your codebase for event usage and report results to Ordaze. Auto-detects platform, repo name, and version from your git environment.
Quick Start
Run directly
Download and execute in one step. No installation required.
ORDAZE_TOKEN=YOUR_TOKEN ORDAZE_URL=https://app.ordaze.com bash <(curl -sL https://app.ordaze.com/api/v1/scanner)Download & commit to repo
Save the script to your repository for repeatable builds.
curl -sL https://app.ordaze.com/api/v1/scanner -o ordaze-scan.sh && chmod +x ordaze-scan.sh
./ordaze-scan.sh --token=YOUR_TOKEN --url=https://app.ordaze.comPlatform Detection
By default the scanner auto-detects your platform based on file presence:
| Platform | Detection |
|---|---|
| iOS | Detected when *.xcodeproj or Package.swift is found. Searches .swift files for analytics call patterns. |
| Android | Detected when build.gradle is found. Searches .kt and .java files for analytics call patterns. |
| Backend | Searches for quoted event names ('event_name' or "event_name") in PHP, Python, Go, Ruby, Java, JS, and TS files. |
Auto-detected values: repo name (from git remote), version (from git tags), platform naming conventions (camelCase, snake_case, etc.).
Backend Scanning
Use --platform=backend and --ext to limit file types for backend projects.
# Laravel / PHP project
ordaze-scan.sh --token=YOUR_TOKEN --url=https://app.ordaze.com \
--platform=backend --dir=./my-laravel-app --ext="*.php"# Node.js / TypeScript backend
ordaze-scan.sh --token=YOUR_TOKEN --url=https://app.ordaze.com \
--platform=backend --dir=./my-api --ext="*.ts *.js"Multi-repo Scanning
When backend events span multiple repositories, use --append to merge results. Repo name is auto-detected from git remote, or set it with --repo.
# Scan each repo separately (repo name auto-detected from git)
cd ./api && ordaze-scan.sh --token=YOUR_TOKEN --url=https://app.ordaze.com --append
cd ./workers && ordaze-scan.sh --token=YOUR_TOKEN --url=https://app.ordaze.com --append# Or scan multiple directories at once
ordaze-scan.sh --token=YOUR_TOKEN --url=https://app.ordaze.com \
--platform=backend --dir=./api,./workersCoverage results show repo / filename for each match. With --append, each scan replaces only its own repo's results — other repos are preserved.
CI/CD Integration
GitHub Actions
- name: Scan events
run: bash <(curl -sL https://app.ordaze.com/api/v1/scanner)
env:
ORDAZE_TOKEN: ${{ secrets.ORDAZE_TOKEN }}
ORDAZE_URL: https://app.ordaze.comAdd ORDAZE_TOKEN to your repository secrets. The scanner will auto-detect your platform and report results on every push.
CLI Options
| Flag | Description |
|---|---|
| --token | API token (or ORDAZE_TOKEN env var) |
| --url | Ordaze URL (or ORDAZE_URL env var) |
| --platform | ios, android, backend, or auto (default: auto-detect) |
| --dir | Project root(s) to scan, comma-separated (default: .) |
| --ext | File extensions for backend (default: *.php *.py *.go *.js *.ts *.rb *.java) |
| --version | App version (default: git describe) |
| --repo | Repository name (default: auto-detect from git remote) |
| --append | Merge with existing results (for multi-repo scanning) |
| --dry-run | Scan without reporting to Ordaze |
| --quiet | Minimal output for CI logs |