@vtex/toolbelt-config-cli
CLI for interacting with toolbelt-config-server
Last updated 2 months ago by tiagonapoli .
Original npm · Tarball · package.json
$ cnpm install @vtex/toolbelt-config-cli 
SYNC missed versions from official npm registry.

toolbelt-config-cli

oclif Version

This CLI is a utility for interacting with toolbelt-config-server, responsible for serving configs for VTEX's toolbelt.

Install

$ yarn global add @vtex/toolbelt-config-cli

Usage

$ toolbelt-conf COMMAND
running command...

$ toolbelt-conf (-v|--version|version)
@vtex/toolbelt-config-cli/0.0.0 linux-x64 node-v12.16.1

$ toolbelt-conf --help [COMMAND]
USAGE
  $ toolbelt-conf COMMAND
...

Messages Editing

When editing a message for changing it on toolbelt-config-server ideally you should preview it first and only the commit it.

For previewing you use:

$ toolbelt-conf message:preview --file fileWithMessage.json

In fileWithMessage.json you'll have to add a JSON following the format:

{
  "messageName": {
    ... here goes message data ...
  }
}

For example:

{
  "messageName": {
    "type": "box",
    "boxOptions": {
      "padding": 2
    },
    "content": "{blue Hello} world {{emoji.thumbsUp}}"
  }
}

The message data follows the API from toolbelt-message-template.

After creating the desired message you can commit it to toolbelt-config-server:

$ toolbelt-data message:set --file ./fileWithMessage.json

If the message name doesn't exists yet you have to use the create flag:

$ toolbelt-data message:set -f ./fileWithMessage.json --create

Commands

toolbelt-conf config:get

Get all or a specific remote config

USAGE
  $ toolbelt-conf config:get

OPTIONS
  -h, --help       show CLI help
  -n, --name=name  Get a specific config name

EXAMPLES
  toolbelt-data config:get
  toolbelt-data config:get -n minimumToolbeltVersion
  toolbelt-data config:get --name minimumToolbeltVersion

toolbelt-conf config:set

Set a specific remote config

USAGE
  $ toolbelt-conf config:set

OPTIONS
  -h, --help         show CLI help
  -n, --name=name    (required) Config name to set
  -v, --value=value  (required) Value to set on config field

EXAMPLE
  toolbelt-data config set -f minimumToolbeltVersion -v 2.92.0

toolbelt-conf help [COMMAND]

display help for toolbelt-conf

USAGE
  $ toolbelt-conf help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

toolbelt-conf message:get

Get all or a specific remote message

USAGE
  $ toolbelt-conf message:get

OPTIONS
  -h, --help       show CLI help
  -n, --name=name  Get a specific message by name
  -r, --render     Render message

EXAMPLES
  toolbelt-data message:get
  toolbelt-data message:get -n releaseNotes
  toolbelt-data message:get --name releaseNotes

toolbelt-conf message:preview

Show preview of a message renderization

USAGE
  $ toolbelt-conf message:preview

OPTIONS
  -f, --file=file  (required) File containing the message to preview
  -h, --help       show CLI help

EXAMPLES
  toolbelt-data message:preview -f ./fileWithMessage.json
  toolbelt-data message:preview --file ./fileWithMessage.json

toolbelt-conf message:set

Update or create a specific remote message

USAGE
  $ toolbelt-conf message:set

OPTIONS
  -c, --create     Create new message
  -f, --file=file  (required) File to read message data and name
  -h, --help       show CLI help
  -r, --render     Render message

DESCRIPTION
  It will require a file with the message content, which have to be a JSON with the format:
  {
     "aMessageName": {
       "content": "This is an string"
     }
  }

EXAMPLES
  toolbelt-data message:set -f ./fileWithMessage.json
  toolbelt-data message:set --file ./fileWithMessage.json
  toolbelt-data message:set -f ./fileWithMessage.json -r
  toolbelt-data message:set -f ./fileWithMessage.json --render
  toolbelt-data message:set -f ./fileWithMessage.json -c
  toolbelt-data message:set -f ./fileWithMessage.json --create

Current Tags

  • 0.0.1-beta                                ...           beta (2 months ago)
  • 0.0.1                                ...           latest (2 months ago)

2 Versions

  • 0.0.1                                ...           2 months ago
  • 0.0.1-beta                                ...           2 months ago

Copyright 2014 - 2016 © taobao.org |