Eventvisor

Advanced

Command Line Interface

Use the CLI through npx eventvisor. Run any command with --help for its typed options.

npx @eventvisor/cli init
npx eventvisor lint
npx eventvisor test
npx eventvisor build
npx eventvisor catalog

Choose a reference scaffold during initialization:

npx @eventvisor/cli init --project=demo
npx @eventvisor/cli init --project=environments

Available learning-oriented scaffolds include demo, no-environments, environments, and test-environments. YAML remains the default.

Run against another checkout with --rootDirectoryPath <path>. The kebab-case --root-directory-path and --projectDirectoryPath forms are also accepted.

Inspecting a project

npx eventvisor config
npx eventvisor list event
npx eventvisor info event pageView
npx eventvisor find-usage attribute userId
npx eventvisor list schema
npx eventvisor find-usage schema identifier
npx eventvisor find-usage --unused-attributes --unused-schemas --unused-destinations

Supported entity types include events, attributes, destinations, effects, Schemas, Targets, and tests.

Commands that print data support JSON where appropriate. Add --pretty when formatted JSON is easier to inspect.

Runtime simulation

npx eventvisor simulate pageView --value='{"url":"https://example.com"}'
npx eventvisor benchmark pageView -n 1000000 --value='{"url":"https://example.com"}'

The benchmark warms up the SDK before measuring. Output reports minimum, average, maximum, p50, p95, and p99 duration for individual evaluations in microseconds.

Selection

Project commands accept --set in Set projects. Build, test, simulation, benchmark, and code generation accept repeatable --tag and --target options.

npx eventvisor generate-code --language typescript --out-dir src/generated --target checkout --target account

Promotion

npx eventvisor promote --from development --to staging
npx eventvisor promote --from development --to staging --target checkout --apply --audit

Promotion is available to Set projects. Preview is the default. See Promotions.

Project plugins

Register project-specific commands in eventvisor.config.js with a type-safe plugin:

const { definePlugin } = require("@eventvisor/core");
module.exports = {
plugins: [
definePlugin({
command: "publish-preview",
description: "publish a preview datafile",
options: {},
examples: [],
async handler({ datasource }) {
console.log(await datasource.readRevision());
},
}),
],
};

Custom commands run with the same resolved project configuration and datasource as built-in commands. Duplicate command names are ignored with a warning.

Version

npx eventvisor --version
Previous
React Native
Next
Tags