Miss any of our Open RFC calls?Watch the recordings here! »

@mparticle/cli

1.0.0-alpha.0 • Public • Published


mParticle CLI

mParticle Command Line Interface

oclif Version

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 (NOT SUPPORTED YET)

npm -g install @mparticle/cli

$ npm install -g @mparticle/cli
$ mp COMMAND
running command...
$ mp (-v|--version|version)
@mparticle/cli/1.0.0-alpha.0 darwin-x64 node-v10.15.3
$ mp --help [COMMAND]
USAGE
  $ mp COMMAND
...

Commands

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
  --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
  --versionNumber=versionNumber              Data Plan Version Number

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: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)
  --accountId=accountId                    (required) mParticle Account ID
  --dataPlanId=dataPlanId                  (required) Data Plan ID
  --logLevel=error|warn|info|debug|silent  [default: info] Log Level
  --orgId=orgId                            (required) mParticle Organization ID
  --token=token                            (required) mParticle Token
  --versionNumber=versionNumber            (required) Data Plan Version Number
  --workspaceId=workspaceId                (required) 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] --orgId=[ORG_ID] 
  --accountId=[ACCOUNT_ID] --workspaceId=[WORKSPACE_ID]

See code: src/commands/planning/data-plan-versions/fetch.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)
  --accountId=accountId                    (required) mParticle Account ID
  --dataPlanId=dataPlanId                  (required) Data Plan ID
  --logLevel=error|warn|info|debug|silent  [default: info] Log Level
  --orgId=orgId                            (required) mParticle Organization ID
  --token=token                            (required) mParticle Token
  --workspaceId=workspaceId                (required) 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] --orgId=[ORG_ID] --accountId=[ACCOUNT_ID] 
  --workspaceId=[WORKSPACE_ID]

See code: src/commands/planning/data-plans/fetch.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)
  --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
  --versionNumber=versionNumber              Data Plan Version Number

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 --eventFile=/path/to/event --dataPlanFile=/path/to/dataplan 
  --versionNumber=[VERSION_NUMBER]
  $ mp planning:events:validate --eventFile=/path/to/event --dataPlanVersionFile=/path/to/dataplanversion

See code: src/commands/planning/events/validate.ts

Keywords

Install

npm i @mparticle/[email protected]

Version

1.0.0-alpha.0

License

Apache-2.0

Unpacked Size

41 kB

Total Files

19

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar