Socket
Socket
Sign inDemoInstall

carotte-cli

Package Overview
Dependencies
110
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    carotte-cli

Run carotte functions from the command line


Version published
Maintainers
3
Created

Readme

Source

carotte-cli

CircleCI

npm version

Install

# 1. install latest version yarn or npm
npm i -g carotte-cli
yarn global add carotte-cli

# 2. read help
carotte help

# 3. add autocomplete (or ~/.bashrc)
carotte completion >> ~/.zshrc
carotte-bulk completion >> ~/.zshrc

Usage carotte help

carotte <cmd> [args]

Commands:
  carotte completion            Generate completion script to be added to your
                                shell startup
  carotte invoke <qualifier>    Publish a message and await response
  carotte publish <qualifier>   Publish a message
  carotte describe <qualifier>  Describe consumer behind this qualifier

Options:
  --version  Show version number                                       [boolean]
  --help     Show usage instructions.                                  [boolean]

carotte help invoke

carotte invoke <qualifier>

Publish a message and await response

Positionals:
  qualifier  Message qualifier to be published e.g. user.read:v1 or
             topic/user.created:v1                           [string] [required]

Options:
  --version                 Show version number                        [boolean]
  --help                    Show usage instructions.                   [boolean]
  -r, --reporter            Listens to task suite events and formats input /
                            output.
                               [choices: "dotted", "simple"] [default: "simple"]
  -y, --bypassConfirmation  Bypass user confirmation prompt.
                                                      [boolean] [default: false]
  -c, --context             Context given to published message. File path
                            allowed.                                    [string]
  -p, --payload             Payload given to published message. If none, payload
                            will be read from stdin. File path allowed. [string]
  --timeout                 Carotte invoke timeout in milliseconds.
                                                       [number] [default: 10000]
  -t, --template            Template used to assemble payload into JSON
                            payloads. If none, payload will be assumed to be
                            JSON payloads.                              [string]
  --bulk                    Bulk process all lines in given payload. Use in
                            conjunction with --template (mandatory).
                                                      [boolean] [default: false]
  --concurrency             Maximum concurrency calls.    [number] [default: 50]
  -b, --break-on-error      Abort run suite on first task error.
                                                      [boolean] [default: false]
  -f, --force               Force call thus bypassing schema validation.
                                                      [boolean] [default: false]

Environment variables

CAROTTE_HOST                              set to your local broker endpoint e.g. amqp:5672
CAROTTE_DEFAULT_CONCURRENCY               set to an integer to have it configured by default
CAROTTE_CLI_BYPASS_CONFIRMATION           set to "true" if you want to bypass always
CAROTTE_CLI_BYPASS_RESPONSE_VALIDATION    set to "true" if you want to bypass response validation
CAROTTE_CLI_DD_API_KEY                    set to Datadog API Key to enable its log transport
COLUMN_SEPARATOR                          set the column separator for CSV file (e.g. `COLUMN_SEPARATOR="\n"`)
CAROTTE_CLI_DD_SOURCE                     log DD source configuration
CAROTTE_CLI_DD_LOG_DELAY                  log DD delay waiting for logs to be pushed
CAROTTE_CLI_USER                          log DD user appended to each log

FAQs

Last updated on 27 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc