Convoy CLI
The Convoy CLI is our client-side command-line tool used to debug webhook events locally. With it, users can stream events from a Convoy server to their local server to debug events failing in production.
Install the Convoy CLI
The Convoy CLI can be installed directly from your package manager or by building from the GitHub source:
Install the Convoy CLI to your Mac from brew:
Using the CLI
To view the list of the available commands at any time, just run convoy-cli
in your terminal with no arguments:
To get help for any specific command, pass the -h
flag to the relevant subcommand. For example, to get help about the worker subcommand
Login
Command: convoy-cli login
Description
The login command authenticates your Client CLI with a Personal API Key to give access to your Convoy instance.
Command Flags
--help
: Get help on the login command.--api-key
: This flag specifies the Personal API key for authenticating the CLI. This is a required parameter that must be passed when running the command.--host
: This flag specifies the host for your Convoy instance. For cloud users, the default host ishttps://cli.getconvoy.io
.
Logout
Command: convoy-cli logout
Synopsis
Description
The logout command logs out of your Convoy instance
Command Flags
--help
: Get help on the logout command.
Listen
Command: convoy-cli listen
Synopsis
Description
The listen command forwards events streamed from a source in your Convoy instance to a defined web server. The listen command starts a websocket client that listens to events streamed by the servcer.
Command Flags
--help
: Help for listen--forward-to
: The host/web server you want to forward events to.--since
: Send discarded events since a timestamp (e.g. 2013-01-02T13:23:37Z) or relative time (e.g. 42m for 42 minutes).--source-name
: The name of the source you want to receive events from (only applies to incoming projects).