npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

leryk-cli-mova

v0.4.0

Published

MOVA CLI: validate, schema:sync, snippet:generate commands

Downloads

40

Readme

MOVA CLI

Command-line interface for MOVA workflows, traces, mocks, and connectors

npm version License

Installation

npm install -g leryk-cli-mova

Or use with npx:

npx leryk-cli-mova [command]

Quick Start

# Run a workflow in mock mode
mova run ./workflow.json --mode mock --trace

# List recent traces
mova trace:list --limit 10

# View connector info
mova connectors:info slack

# Set mock mode
mova mock:mode hybrid

Commands

🚀 Run Workflows

Execute MOVA envelopes with various modes and options.

mova run <envelope> [options]

Options:
  --mode <mode>        Execution mode: mock|live|hybrid|record (default: mock)
  --inputs <file>      Input data JSON file
  --secrets <file>     Secrets JSON file  
  --trace              Show execution trace after completion
  --executor <type>    Executor type: local|remote (default: remote)
  --json               Output as JSON
  --base-url <url>     Sandbox base URL
  --token <token>      Auth token

Examples:

# Run in mock mode with trace
mova run ./envelopes/slack.message.json --mode mock --trace

# Run with inputs and secrets
mova run ./workflow.json --inputs ./data.json --secrets ./secrets.json

# Run in hybrid mode (use fixtures when available, otherwise real API)
mova run ./workflow.json --mode hybrid

# Output as JSON for parsing
mova run ./workflow.json --json > result.json

📊 Traces

View and monitor workflow execution traces.

List Traces

mova trace:list [options]

Options:
  --limit <n>      Number of runs to show (default: 10)
  --json           Output as JSON

Show Trace Details

mova trace:show <run_id> [options]

Options:
  --json           Output as JSON

Tail Trace (Live)

mova trace:tail <run_id> [options]

Options:
  --interval <ms>  Poll interval in milliseconds (default: 2000)

Examples:

# List last 20 traces
mova trace:list --limit 20

# Show trace details
mova trace:show abc12345

# Tail a running workflow
mova trace:tail abc12345 --interval 1000

🎭 Mocks

Control Mock Manager for testing workflows without real APIs.

Mock Mode

# Get current mode
mova mock:mode

# Set mode
mova mock:mode <mock|live|hybrid|record>

List Fixtures

# List all fixtures
mova mock:list

# List fixtures for specific service
mova mock:list slack

Record & Replay

# Start recording
mova mock:record:start [options]

Options:
  --service <name>      Filter by service
  --sanitize <fields>   Comma-separated fields to sanitize

# Stop recording
mova mock:record:stop

Hit Log

# View recent mock hits (for debugging)
mova mock:hitlog

Examples:

# Switch to hybrid mode
mova mock:mode hybrid

# List all fixtures
mova mock:list

# Record Slack API calls
mova mock:record:start --service slack --sanitize authorization,api_key

# Stop recording
mova mock:record:stop

# Check what was matched
mova mock:hitlog

🔌 Connectors

Explore and diagnose connector configurations.

List Connectors

mova connectors:list

Connector Info

mova connectors:info <name>

Connector Doctor

mova connectors:doctor <name>

Examples:

# List all connectors
mova connectors:list

# View Slack connector details
mova connectors:info slack

# Check Stripe connector configuration
mova connectors:doctor stripe

✅ Validate

Validate MOVA envelope files.

mova validate <file> [options]

Options:
  --output <type>  Output format: json, text (default: text)

🔧 Utilities

Schema Sync

mova schema:sync [url]

Snippet Generate

mova snippet:generate <type>

Configuration

Config File: ~/.mova/config.json

{
  "sandbox": {
    "baseUrl": "http://localhost:4000",
    "authToken": ""
  },
  "defaultMode": "mock",
  "output": {
    "colors": true
  },
  "executor": "remote"
}

Environment Variables

# Sandbox URL
export MOVA_SANDBOX_URL=http://localhost:4000

# Auth token
export MOVA_TOKEN=your_token_here

# Default mode
export MOVA_MODE=mock

# Executor type
export MOVA_EXECUTOR=remote

# Disable colors
export NO_COLOR=1

Configuration Priority

  1. CLI flags (highest)
  2. Environment variables
  3. Config file (~/.mova/config.json)
  4. Defaults (lowest)

Output Formats

Human-Readable (Default)

Colored, formatted output with tables and trees.

mova trace:list

run_id    started_at           duration  status   mode
abc123    2025-10-18 10:30     1.2s     success  mock
def456    2025-10-18 10:25     0.8s     success  hybrid

JSON Output

Machine-readable JSON for parsing and automation.

mova trace:list --json

[
  {
    "run_id": "abc123",
    "started_at": "2025-10-18T10:30:00Z",
    "duration_ms": 1200,
    "status": "success",
    "mode": "mock"
  }
]

Exit Codes

  • 0 - Success
  • 1 - CLI error (invalid input, network error, etc.)
  • 2 - Workflow execution error (failed step)

Examples

Complete Workflow Testing

# 1. Set mock mode
mova mock:mode mock

# 2. Run workflow
mova run ./workflow.json --trace

# 3. View traces
mova trace:list --limit 5

# 4. Check specific trace
mova trace:show abc123

# 5. List available fixtures
mova mock:list slack

Recording Real API Responses

# 1. Start recording
mova mock:record:start --service slack --sanitize authorization

# 2. Switch to record mode
mova mock:mode record

# 3. Run workflow (will call real API and save responses)
mova run ./workflow.json

# 4. Stop recording
mova mock:record:stop

# 5. Switch back to mock mode
mova mock:mode mock

# 6. Run again (will use recorded responses)
mova run ./workflow.json --trace

Hybrid Mode Testing

# Use fixtures when available, fallback to real API
mova mock:mode hybrid
mova run ./workflow.json --trace

# Check what was mocked vs live
mova mock:hitlog

CI/CD Integration

#!/bin/bash

# Run tests in mock mode
export MOVA_MOCK_MODE=mock
export MOVA_SANDBOX_URL=http://localhost:4000

# Run workflow
if mova run ./tests/workflow.json --json > result.json; then
  echo "✅ Workflow passed"
  cat result.json | jq '.duration_ms'
else
  echo "❌ Workflow failed"
  exit 1
fi

Troubleshooting

Cannot find module errors

Make sure you're using Node.js 18+:

node --version

Sandbox connection failed

Check if the Sandbox is running:

curl http://localhost:4000/__mock/health

Update the URL if needed:

mova run ./workflow.json --base-url http://your-sandbox:4000

Connector not found

Make sure @mova-ai/connectors is installed:

npm install @mova-ai/connectors

Development

# Clone repository
git clone https://github.com/leryk-inc/mova.git
cd mova/packages/cli

# Install dependencies
npm install

# Build
npm run build

# Link for local testing
npm link

# Test CLI
mova --help

Related Packages

License

Apache-2.0 © Sergii Miasoiedov

Support

  • Issues: https://github.com/leryk-inc/mova/issues
  • Discussions: https://github.com/leryk-inc/mova/discussions
  • Email: [email protected]