@meshqa/cli
v0.1.3
Published
MeshQA CLI - 3D asset validation tool
Maintainers
Readme
@meshqa/cli
Command-line tool for validating 3D assets. Scan ZIP archives containing GLB, FBX, OBJ, and texture files for quality issues, security risks, and engine compatibility.
Installation
# Install globally
npm install -g @meshqa/cli
# Or run directly with npx
npx @meshqa/cli --helpQuick Start
# Scan a ZIP archive
meshqa scan my-asset.zip
# Scan multiple files
meshqa scan *.zip
# Output reports to a directory
meshqa scan my-asset.zip --output ./reportsCommands
meshqa scan <files...>
Validate 3D asset files.
meshqa scan my-asset.zip [options]Options:
| Option | Description | Default |
|--------|-------------|---------|
| -e, --engine <engine> | Target engine (unity, unreal, godot, generic) | generic |
| -p, --platform <platform> | Target platform (mobile, desktop, vr, web) | desktop |
| -s, --strict | Enable strict validation mode | false |
| -l, --local | Local-only mode (no API calls) | false |
| -o, --output <dir> | Output directory for reports | - |
| -f, --format <format> | Report format (json, markdown, both) | both |
| -r, --rules <rules> | Comma-separated rule IDs (Pro+ tier) | - |
| -w, --watch | Watch mode - rescan on file changes | false |
| --json | Output results as JSON | false |
| --quiet | Minimal output | false |
Examples:
# Scan for Unity mobile
meshqa scan game-props.zip --engine unity --platform mobile
# Generate JSON report
meshqa scan asset.zip --output ./reports --format json
# Strict mode with quiet output
meshqa scan *.zip --strict --quiet
# Apply validation rules (Pro+ tier)
meshqa scan asset.zip --rules max-vertices-50k,pbr-requiredCustom Validation Rules (Pro+ Tier)
Apply built-in validation rules to enforce asset standards:
# Single rule
meshqa scan asset.zip --rules max-vertices-50k
# Multiple rules
meshqa scan asset.zip --rules max-vertices-50k,pbr-required,single-mesh
# Short flag
meshqa scan asset.zip -r max-triangles-50kAvailable Built-in Rules:
| Category | Rule ID | Description |
|----------|---------|-------------|
| Geometry | max-vertices-10k | Max 10,000 vertices (mobile) |
| Geometry | max-vertices-50k | Max 50,000 vertices (standard) |
| Geometry | max-vertices-100k | Max 100,000 vertices (high-detail) |
| Geometry | max-triangles-5k | Max 5,000 triangles (low-poly) |
| Geometry | max-triangles-25k | Max 25,000 triangles (mobile) |
| Geometry | max-triangles-50k | Max 50,000 triangles (standard) |
| Geometry | max-triangles-100k | Max 100,000 triangles (high-detail) |
| Texture | max-materials-1 | Single material only |
| Texture | max-materials-3 | Max 3 materials |
| Texture | max-materials-5 | Max 5 materials |
| Texture | pbr-required | Must use PBR materials |
| Texture | no-pbr | Must not use PBR |
| Optimization | single-mesh | Must be a single mesh |
| Optimization | max-meshes-5 | Max 5 meshes |
| Optimization | max-meshes-10 | Max 10 meshes |
| Optimization | max-bones-60 | Max 60 bones (mobile) |
| Optimization | max-bones-100 | Max 100 bones (standard) |
| Optimization | max-bones-150 | Max 150 bones (high) |
| Optimization | has-animations | Must have animations |
| Optimization | no-animations | Must not have animations |
| Optimization | has-rig | Must have skeleton/rig |
| Optimization | no-rig | Must not have rig |
| Naming | naming-lowercase | Names must be lowercase |
| Naming | naming-snake-case | Names must use snake_case |
| Naming | naming-no-spaces | Names must not have spaces |
meshqa auth
Manage API authentication.
# Create a new account (with email verification)
meshqa auth signup
# Login with email and password
meshqa auth login --email
# Login with API key
meshqa auth login
# Check authentication status
meshqa auth status
# Show current user and usage
meshqa auth whoami
# Upgrade your subscription plan
meshqa auth upgrade
# Logout
meshqa auth logoutmeshqa auth signup
Create a new MeshQA account directly from the CLI:
$ meshqa auth signup
MeshQA Account Registration
---------------------------
Email: [email protected]
Password: ********
Confirm Password: ********
✓ Account created! Check your email for verification link.
Waiting for email verification... (press Ctrl+C to cancel)
Checking... ◐
✓ Email verified!
✓ API key generated and stored
Welcome to MeshQA! Your free tier includes:
- 10 validations per month
- 50MB max file sizemeshqa auth login --email
Login with your email and password (instead of API key):
meshqa auth login --emailmeshqa auth upgrade
Upgrade your subscription to access more features:
meshqa auth upgradeThis will show available plans and open a browser for secure checkout via Stripe.
meshqa init
Create a .meshqa.yml configuration file.
# Interactive setup
meshqa init
# Accept defaults
meshqa init --yesConfiguration
Create a .meshqa.yml file in your project root:
# Default validation options
defaults:
engine: unity
platform: desktop
strict: false
# Health score thresholds
thresholds:
minScore: 70
maxTriangles: 100000
maxTextureSize: 2048
maxFileSize: 50MB
# Validation rules (Pro+ tier)
rules:
builtIn:
- max-vertices-50k
- pbr-required
- naming-no-spaces
# Report settings
reports:
format: both
outputDir: ./meshqa-reportsHealth Score
MeshQA calculates a health score (0-100) based on:
- Geometry (30%) - Triangle count, mesh complexity, topology
- Textures (25%) - Resolution, format, compression
- Structure (20%) - File organization, naming conventions
- Security (15%) - Dangerous file detection, extension validation
- Compatibility (10%) - Engine-specific requirements
Grades:
- Excellent (90-100) - Production ready
- Good (70-89) - Minor improvements suggested
- Fair (50-69) - Several issues to address
- Poor (0-49) - Significant problems detected
Getting Started
Create an Account
The easiest way to get started is to create an account directly from the CLI:
meshqa auth signupThis will:
- Prompt for your email and password
- Send a verification email
- Wait for you to click the verification link
- Automatically generate and store your API key
Already Have an Account?
Login with email and password:
meshqa auth login --emailOr with an existing API key:
meshqa auth login
# Enter your API key when promptedUpgrade Your Plan
For advanced features like priority queue, custom rules, and webhooks:
meshqa auth upgradeExit Codes
| Code | Meaning |
|------|---------|
| 0 | All validations passed |
| 1 | One or more validations failed |
| 2 | Configuration error |
| 3 | Authentication error |
| 4 | Network/API error |
Development
Prerequisites
- Node.js 20+
- pnpm (recommended) or npm
Setup
# Clone the repository
git clone https://github.com/meshmarket/meshqa.git
cd meshqa
# Install dependencies
pnpm install
# Build the CLI
pnpm --filter @meshqa/cli buildTesting
# Run tests
pnpm --filter @meshqa/cli test
# Run tests in watch mode
pnpm --filter @meshqa/cli test:watch
# Test CLI locally
node packages/cli/bin/meshqa.js --help
node packages/cli/bin/meshqa.js scan test-asset.zipPre-publish Verification
Before publishing, verify everything works:
# 1. Build succeeds
pnpm --filter @meshqa/cli build
# 2. CLI executes correctly
node packages/cli/bin/meshqa.js --version
node packages/cli/bin/meshqa.js --help
node packages/cli/bin/meshqa.js scan --help
# 3. Tests pass
pnpm --filter @meshqa/cli test
# 4. Check package contents
cd packages/cli
npm pack --dry-run
# 5. Verify package size (<5MB)
npm pack
ls -la *.tgzLinks
Support
- Email: [email protected]
- Website: https://meshqa.meshmarket.net
License
See LICENSE.md for full licensing and rights details.
MeshQA is operated by MESH MARKET PTY LTD (ABN: 21 693 874 707)
