CLI Usage
Validate 3D assets from the command line with privacy-first local validation.
Installation
Install the MeshQA CLI globally using npm:
npm install -g @meshqa/cliOr use it directly with npx:
npx @meshqa/cli scan model.glbNote: If using npx, replace meshqa with npx @meshqa/cli in all commands below.
Authentication
Set your API key using the auth login command:
meshqa auth loginOr use an environment variable:
export MESHQA_API_KEY=mqk_live_your_api_keyNote: Authentication is optional for local-only validation. See Local Mode below.
| Command | Description |
|---|---|
meshqa auth login | Interactive login flow |
meshqa auth logout | Clear stored credentials |
meshqa auth status | Show current authentication status |
meshqa auth whoami | Display current user info and tier |
When to Use Local vs API Mode
The CLI supports two modes: local (offline) and API (cloud). Choose based on your needs:
| Feature | Local Mode | API Mode |
|---|---|---|
| Privacy | Files never leave machine | Files uploaded for scanning |
| Offline support | Works offline | Requires internet |
| VirusTotal scanning | — | Yes (Starter+) |
| Webhooks | — | Yes (Starter+) |
| Cloud caching | — | Yes |
| Report exports | — | Yes (tier limits) |
| Rate limits | Unlimited | Tier-based |
| Team usage tracking | — | Yes |
Local Mode (Privacy-First)
Run validations entirely on your machine with zero data transmission:
meshqa scan ./model.glb --localBasic Usage
Validate a single file:
meshqa scan model.glbValidate multiple files with glob patterns:
meshqa scan ./assets/*.glbScan GLB files directly (no ZIP required):
meshqa scan character.glb --engine unity --platform mobilePlatform Targeting
Validate assets for specific target platforms:
meshqa scan ./character.glb --platform mobile --engine unity| Platform | Description |
|---|---|
mobile | Mobile-optimized checks (texture size, poly count limits) |
desktop | Standard desktop validation (default) |
vr | VR-specific requirements (draw calls, LODs) |
web | WebGL constraints (file size, format support) |
Batch Scanning
Scan multiple files using glob patterns:
meshqa scan ./assets/**/*.glb --output ./reportsFor large batches (>100 files), use --yes to skip confirmation:
meshqa scan ./assets/**/*.glb --yesReport Exports
Export detailed reports in JSON or Markdown:
meshqa scan ./model.glb --output ./reports --format both| Format | Description |
|---|---|
json | Machine-readable structured data |
markdown | Human-readable with tables and recommendations |
both | Generate both formats (default) |
Options
| Option | Description |
|---|---|
-e, --engine | Target engine (unity, unreal, godot, generic) |
-p, --platform | Target platform (mobile, desktop, vr, web) |
-l, --local | Local-only mode (no API calls, works offline) |
-s, --strict | Enable strict validation mode |
-o, --output | Output directory for reports |
-f, --format | Report format (json, markdown, both) |
-y, --yes | Skip confirmation prompts (for CI/CD) |
--json | Output results as JSON (requires auth) |
-w, --watch | Watch mode - rescan on file changes |
-q, --quiet | Only output on errors |
Examples
Local Validation (Privacy-First)
# Validate locally without any API calls
meshqa scan ./character.glb --local
# Local mode with platform targeting
meshqa scan ./assets/*.glb --local --platform mobileUnity Project with Reports
meshqa scan ./Assets/Models/**/*.glb \
--engine unity \
--platform mobile \
--output ./reports \
--format bothCI/CD Integration
# Run validation in CI with automatic confirmation
meshqa scan ./Assets/**/*.glb --yes --quiet
# Exit code 0 = all passed
# Exit code 1 = validation failedBatch Scanning with JSON Output
# Scan all GLB files and output JSON for parsing
meshqa scan ./assets/**/*.glb --json --yesExit Codes
| Code | Meaning |
|---|---|
| 0 | All validations passed |
| 1 | Validation failed |
| 2 | CLI error (invalid arguments, auth failure, etc.) |
| 130 | Scan interrupted (Ctrl+C) |