@mparticle/cli
v1.0.8
Published
mParticle Command Line Interface
Downloads
110
Maintainers
Keywords
Readme
mParticle CLI
mParticle Command Line Interface
Usage
DEMO Usage
- Clone the repo and
cd
into the directory npm install
npm link
Run mp
Unlink when you're done
Run npm unlink
in the directory. This will remove the link to mp
.
Note: Ignore the usage section below. That's for when we get into production)
Production Usage
npm -g install @mparticle/cli
$ npm install -g @mparticle/cli
$ mp COMMAND
running command...
$ mp (-v|--version|version)
@mparticle/cli/1.0.8 darwin-x64 node-v10.15.3
$ mp --help [COMMAND]
USAGE
$ mp COMMAND
...
Commands
mp autocomplete [SHELL]
mp help [COMMAND]
mp planning:batches:validate
mp planning:data-plan-versions:create
mp planning:data-plan-versions:delete
mp planning:data-plan-versions:fetch
mp planning:data-plan-versions:update
mp planning:data-plans:create
mp planning:data-plans:delete
mp planning:data-plans:fetch
mp planning:data-plans:fetch-all
mp planning:data-plans:update
mp planning:events:validate
mp autocomplete [SHELL]
display autocomplete installation instructions
USAGE
$ mp autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ mp autocomplete
$ mp autocomplete bash
$ mp autocomplete zsh
$ mp autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
mp help [COMMAND]
display help for mp
USAGE
$ mp help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
mp planning:batches:validate
Validates Event Batches
USAGE
$ mp planning:batches:validate
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--batch=batch Batch as Stringified JSON
--batchFile=batchFile Path to saved JSON file of a Batch
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlan=dataPlan Data Plan as Stringified JSON
--dataPlanFile=dataPlanFile Path to saved JSON file of a Data Plan
--dataPlanVersion=dataPlanVersion Data Plan Version Document as Stringified JSON
--dataPlanVersionFile=dataPlanVersionFile Path to saved JSON file of a Data Plan Version
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--serverMode Validate using mParticle Server-side validation
--versionNumber=versionNumber Data Plan Version Number
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Version Documents and are used to validate a Batch.
A Data Plan Version can be directly referenced by using either the --dataPlanVersion or --dataPlanVersionFile flags
Otherwise, a --dataPlan or --dataPlanFile must be accompanied by a --versionNumber.
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:b:val
EXAMPLES
$ mp planning:batches:validate --batch=[BATCH] --dataPlan=[DATA_PLAN] --versionNumber=[VERSION_NUMBER]
$ mp planning:batches:validate --batch=[BATCH] --dataPlanVersion=[DATA_PLAN_VERSION]
$ mp planning:batches:validate --batchFile=/path/to/batch --dataPlanFile=/path/to/dataplan
--versionNumber=[VERSION_NUMBER]
$ mp planning:batches:validate --batchFile=/path/to/batch --dataPlanVersion=/path/to/dataplanversion
See code: src/commands/planning/batches/validate.ts
mp planning:data-plan-versions:create
Creates a Data Plan Version and uploads to mParticle
USAGE
$ mp planning:data-plan-versions:create
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlanId=dataPlanId Data Plan ID
--dataPlanVersion=dataPlanVersion Data Plan Version as Stringified JSON
--dataPlanVersionFile=dataPlanVersionFile Path to saved JSON file of a Data Plan Version
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Data Plan Versions.
A Version Document can be fetched by using your account credentials and a --versionNumber and --dataPlanId.
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:dpv:create
EXAMPLE
$ mp planning:data-plan-versions:create --workspaceId=[WORKSPACE_ID] --dataPlanId=[DATA_PLAN_ID]
--dataPlan=[DATA_PLAN]
See code: src/commands/planning/data-plan-versions/create.ts
mp planning:data-plan-versions:delete
Deletes a Data Plan Version and uploads to mParticle
USAGE
$ mp planning:data-plan-versions:delete
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlanId=dataPlanId Data Plan ID
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--versionNumber=versionNumber Data Plan Version Number
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Data Plan Versions.
A Version Document can be fetched by using your account credentials and a --versionNumber and --dataPlanId.
Note: Delete will NOT read dataPlanId or versionNumber from config as a precaution to prevent accidental deletion
of records
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:dpv:delete
EXAMPLE
$ mp planning:data-plan-versions:delete --workspaceId=[WORKSPACE_ID] --dataPlanId=[DATA_PLAN_ID]
--versionNumber=[VERSION_NUMBER]
See code: src/commands/planning/data-plan-versions/delete.ts
mp planning:data-plan-versions:fetch
Fetches a Data Plan Version
USAGE
$ mp planning:data-plan-versions:fetch
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlanId=dataPlanId Data Plan ID
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--versionNumber=versionNumber Data Plan Version Number
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plan Versions are a subset of Data Plans and are used to validate batches.
A Version Document can be fetched by using your account credentials and a --versionNumber and --dataPlanId.
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:dpv:fetch
EXAMPLE
$ mp planning:data-plan-versions:fetch --dataPlanId=[DATA_PLAN_ID] --versionNumber=[VERSION_NUMBER]
--workspaceId=[WORKSPACE_ID]
See code: src/commands/planning/data-plan-versions/fetch.ts
mp planning:data-plan-versions:update
Updates a Data Plan Version and uploads to mParticle
USAGE
$ mp planning:data-plan-versions:update
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlanId=dataPlanId Data Plan ID
--dataPlanVersion=dataPlanVersion Data Plan Version as Stringified JSON
--dataPlanVersionFile=dataPlanVersionFile Path to saved JSON file of a Data Plan Version
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--versionNumber=versionNumber Data Plan Version Number
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Data Plan Versions.
A Version Document can be fetched by using your account credentials and a --versionNumber and --dataPlanId.
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:dpv:update
EXAMPLE
$ mp planning:data-plan-versions:update --workspaceId=[WORKSPACE_ID] --dataPlanId=[DATA_PLAN_ID]
--versionNumber=[VERSION_NUMBER] --dataPlanVersion=[DATA_PLAN_VERSION]
See code: src/commands/planning/data-plan-versions/update.ts
mp planning:data-plans:create
Creates a Data Plan and uploads to mParticle
USAGE
$ mp planning:data-plans:create
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlan=dataPlan Data Plan as Stringified JSON
--dataPlanFile=dataPlanFile Path to saved JSON file of a Data Plan
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Data Plan Versions.
A Data Plan can be fetched using your account credentials and using a valid --dataPlanId
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:dp:create
EXAMPLE
$ mp planning:data-plan:create --workspaceId=[WORKSPACE_ID] --dataPlan=[DATA_PLAN]
See code: src/commands/planning/data-plans/create.ts
mp planning:data-plans:delete
Deletes a Data Plan and uploads to mParticle
USAGE
$ mp planning:data-plans:delete
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlanId=dataPlanId Data Plan ID
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Data Plan Versions.
A Data Plan can be fetched using your account credentials and using a valid --dataPlanId
Note: Delete will NOT read dataPlanId from config as a precaution to prevent accidental deletion of records
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:dp:delete
EXAMPLE
$ mp planning:data-plan:delete --workspaceId=[WORKSPACE_ID] --dataPlanId=[DATA_PLAN_ID]
See code: src/commands/planning/data-plans/delete.ts
mp planning:data-plans:fetch
Fetches a Data Plan
USAGE
$ mp planning:data-plans:fetch
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlanId=dataPlanId Data Plan ID
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Data Plan Versions.
A Data Plan can be fetched using your account credentials and using a valid --dataPlanId
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:dp:fetch
EXAMPLE
$ mp planning:data-plan:fetch --dataPlanId=[DATA_PLAN_ID] --workspaceId=[WORKSPACE_ID]
See code: src/commands/planning/data-plans/fetch.ts
mp planning:data-plans:fetch-all
Fetches All Data Plans
USAGE
$ mp planning:data-plans:fetch-all
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
-s, --split Split Data Plans into Data Plan Version files
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--outPath=outPath Output path for split files
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Data Plan Versions.
All of your Data Plans will be fetched using your account credentials
and saved with the filename format of: <data_plan_id>.<version_number>.json
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:dp:fetchAll
EXAMPLE
$ mp planning:data-plan:fetch-all --workspaceId=[WORKSPACE_ID]
See code: src/commands/planning/data-plans/fetch-all.ts
mp planning:data-plans:update
Updates a Data Plan and uploads to mParticle
USAGE
$ mp planning:data-plans:update
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlan=dataPlan Data Plan as Stringified JSON
--dataPlanFile=dataPlanFile Path to saved JSON file of a Data Plan
--dataPlanId=dataPlanId Data Plan ID
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Data Plan Versions.
A Data Plan can be fetched using your account credentials and using a valid --dataPlanId
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:dp:update
EXAMPLE
$ mp planning:data-plan:update --workspaceId=[WORKSPACE_ID] --dataPlanId=[DATA_PLAN_ID] --dataPlan=[DATA_PLAN]
See code: src/commands/planning/data-plans/update.ts
mp planning:events:validate
Validates an Event
USAGE
$ mp planning:events:validate
OPTIONS
-o, --outFile=outFile (optional) Output file for results (defaults to standard output)
--clientId=clientId Client ID for Platform API
--clientSecret=clientSecret Client Secret for Platform API
--config=config mParticle Config JSON File
--dataPlan=dataPlan Data Plan as Stringified JSON
--dataPlanFile=dataPlanFile Path to saved JSON file of a Data Plan
--dataPlanVersion=dataPlanVersion Data Plan Version Document as Stringified JSON
--dataPlanVersionFile=dataPlanVersionFile Path to saved JSON file of a Data Plan Version
--event=event Event as Stringified JSON
--eventFile=eventFile Path to saved JSON file of an Event
--logLevel=error|warn|info|debug|silent [default: info] Log Level
--serverMode Validate using mParticle Server-side validation
--translateEvents Translate minified event into standard event
--versionNumber=versionNumber Data Plan Version Number
--workspaceId=workspaceId mParticle Workspace ID
DESCRIPTION
Data Plans are comprised of one or more Data Plan Versions and are used to validate an Event.
A Data Plan Version can be directly referenced by using either the --dataPlanVersion or --dataPlanVersionFile flags
Otherwise, a --dataPlan or --dataPlanFile must be accompanied by a --versionNumber.
For more information, visit: https://github.com/mParticle/mparticle-cli
ALIASES
$ mp plan:e:val
EXAMPLES
$ mp planning:events:validate --event=[EVENT] --dataPlan=[DATA_PLAN] --versionNumber=[VERSION_NUMBER]
$ mp planning:events:validate --event=[EVENT] --dataPlanVersion=[DATA_PLAN_VERSION]
$ mp planning:events:validate --event=[EVENT] --dataPlanVersion=[DATA_PLAN_VERSION] --translateEvents
$ mp planning:events:validate --eventFile=/path/to/event --dataPlanFile=/path/to/dataplan
--versionNumber=[VERSION_NUMBER]
$ mp planning:events:validate --eventFile=/path/to/event --dataPlanVersionFile=/path/to/dataplanversion
$ mp planning:events:validate --eventFile=/path/to/event --dataPlanVersionFile=/path/to/dataplanversion
--translateEvents
See code: src/commands/planning/events/validate.ts