Skip to main content

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.com

Platform Detection

By default the scanner auto-detects your platform based on file presence:

PlatformDetection
iOSDetected when *.xcodeproj or Package.swift is found. Searches .swift files for analytics call patterns.
AndroidDetected when build.gradle is found. Searches .kt and .java files for analytics call patterns.
BackendSearches 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,./workers

Coverage 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.com

Add ORDAZE_TOKEN to your repository secrets. The scanner will auto-detect your platform and report results on every push.

CLI Options

FlagDescription
--tokenAPI token (or ORDAZE_TOKEN env var)
--urlOrdaze URL (or ORDAZE_URL env var)
--platformios, android, backend, or auto (default: auto-detect)
--dirProject root(s) to scan, comma-separated (default: .)
--extFile extensions for backend (default: *.php *.py *.go *.js *.ts *.rb *.java)
--versionApp version (default: git describe)
--repoRepository name (default: auto-detect from git remote)
--appendMerge with existing results (for multi-repo scanning)
--dry-runScan without reporting to Ordaze
--quietMinimal output for CI logs