CLI reference
Three first-level commands and no others: syndroo connect, syndroo publish and syndroo status. Retrying is a mode of syndroo publish, and querying is read-only in syndroo status. Every command and flag on this page is checked against the built CLI when the site is published.
Global flags
These are read before the command, so they work in any position on the line and are never passed to a command.
| Flag | Meaning |
|---|---|
--config | Select the configuration file. The path must be absolute. |
--json | Print one JSON envelope and never prompt. |
--verbose | Add diagnostics, such as the request id a call recorded. |
--no-color | Disable colour in human output. NO_COLOR does the same. |
--help | Print usage for the whole CLI, or for one command. |
--version | Print the candidate version and the Node.js version that ran it. |
Repeating a global flag is a usage error rather than a silent last-one-wins. A bare syndroo prints the same usage and exits 0 without touching the configuration or creating any state.
syndroo connect
syndroo connect [options] [provider]Starts, resumes or maintains one connection. Exactly one mode per run: a provider positional starts a connection, --update and --disconnect maintain an existing one, and --input reads a whole request document.
| Flag | Meaning |
|---|---|
--label | Name the connection. |
--connection | Reconnect or refresh an existing connection id. |
--from-env | Read the credentials from SYNDROO_CREDENTIALS. |
--credential-file | Read the credentials from one private JSON file. |
--update | Change a connection's label or default flag. |
--disconnect | Remove one stored connection. Never revokes a platform credential. |
--input | Read a machine request document; - reads standard input. |
--redirect-uri <uri> | Choose the OAuth redirect the CLI binds itself. Defaults to a pre-registerable loopback URI; the CLI serves that host, port and path and receives one redirect, which needs a controlling terminal. |
--callback-url <url> | Complete a redirect with the URL the browser landed on. - reads it from standard input; a URL that carries code or state is refused on the command line. |
--default | Mark the connection as the default target. |
--no-default | Clear the default flag. |
--from-env and --credential-file are mutually exclusive, and a resume request is only ever accepted from standard input. A connect step that still needs input reports the pending action and exits 0 instead of blocking; on a terminal the same run prompts for the fields the provider declared. For the OAuth providers (linkedin, threads and mastodon) --redirect-uri names the loopback callback the CLI binds itself and --callback-url - takes the redirected URL on standard input; that local callback path is fixture-tested against local servers only.
syndroo publish
syndroo publish [options]Prepares, executes or retries a publication. Exactly one input source is required, and a request whose type is execute may only come from standard input.
| Flag | Meaning |
|---|---|
--input | Read the request document from a file; - reads standard input. |
--data | Take the request document inline. Never a place for credentials. |
--retry | Retry the eligible targets of an earlier operation. |
--to | Name the connection to retry. Repeatable, one per target. |
--request-id | Give this logical call a stable identity. |
--dry-run | Preview only: no state, no credentials, no network request. |
--to requires --retry, and --dry-run refuses a retry. A retry target must be eligible: a delivery whose outcome is unknown is never retried.
syndroo status
syndroo status [options]Read-only. It never creates the state root, never takes a write lock, never reads a secret and never contacts a platform. With no selector it answers the overview.
| Flag | Meaning |
|---|---|
--provider | Ask about one provider; may also filter --connections. |
--connections | List the stored connections. |
--operation | Read one operation by id. |
--operations | Page through the recent operation summaries. |
--limit | Page size for --operations, from 1 to 100. |
--cursor | Opaque cursor for the next --operations page. |
--connections, --operation and --operations are mutually exclusive, --provider cannot be combined with either operation selector, and --limit or --cursor without --operations is a usage error.
Exit codes
An exit code describes the local call, not the platform. Exit 0 can still mean a pending authorization or a preview that has not been executed yet.
| Code | Meaning |
|---|---|
0 | Handled as documented. A result may still need confirmation or authorization. |
1 | Internal or durability failure. Side effects are unknown. |
2 | Usage, configuration, authentication or preflight refusal. Nothing was sent. |
4 | A write may have reached the provider and no result is known. |
5 | A human explicitly declined at the confirmation step. Nothing was sent. |
6 | Execution finished and is known not to be fully successful. |
130 | The local process stopped on a signal. Server-side work was not cancelled. |
Related
- Configuration for the file shape and the state root.
- Credentials for the field names per provider.
- Requests and envelopes for every request and result shape.