The sync-cli is the official command-line interface for Sync
$ npm install -g @pnodev/sync-cli
$ sync-cli COMMAND
running command...
$ sync-cli (--version)
@pnodev/sync-cli/0.3.0 linux-x64 node-v20.5.1
$ sync-cli --help [COMMAND]
USAGE
$ sync-cli COMMAND
...Send a payload to a topic channel
USAGE
$ sync-cli generate-types --appId <value> --key <value> [--exportName <value>] [--output <value>]
FLAGS
--appId=<value> (required) App ID
--exportName=<value> [default: payload] Name of the generated type
--key=<value> (required) Public Key
--output=<value> [default: stdout] Output target: "stdout" (default) or filename (e.g. types.ts)
DESCRIPTION
Send a payload to a topic channel
See code: src/commands/generate-types.ts
Display help for sync-cli.
USAGE
$ sync-cli help [COMMAND...] [-n]
ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for sync-cli.
See code: @oclif/plugin-help
Send a payload to a topic channel
USAGE
$ sync-cli send --appId <value> --key <value> --topic <value> [--payload <value>]
FLAGS
--appId=<value> (required) App ID
--key=<value> (required) Public Key
--payload=<value> JSON payload to send
--topic=<value> (required) Topic-Name
DESCRIPTION
Send a payload to a topic channel
See code: src/commands/send.ts
The behavior of sync-cli can be customized using environment variables. These can be defined in a local .env file.
To use a custom Sync Engine URL, create a .env file in your project root and add the following line:
SYNC_ENGINE_URL=https://your-sync-engine-url.example.com