See Stacksync in action with a solution architect. Book a demo ↗

CLI Command Reference

Reference for all Stacksync CLI commands.

Reference for all Stacksync CLI commands.

Run the following to view available options for any command:

stacksync <command> --help

Setup

CommandDescription
stacksyncShow the welcome screen and getting-started steps.
stacksync --helpList all available commands.
stacksync loginAuthenticate the CLI with your Stacksync workspace.
stacksync updateUpdate the CLI to the latest available version.
stacksync envView or update CLI configuration.
stacksync --version, stacksync -VDisplay the installed CLI version.

Login

stacksync login

By default, the command prompts you to authenticate through the web or provide an API key.

Options

OptionDescription
--api-key <key>Authenticate with an API key without using the interactive prompts.
--workspace <id>Set the default workspace. Use with --api-key for non-interactive authentication.
--checkPrint the current login status and exit. Returns exit code 0 when authenticated and 1 otherwise.

Non-interactive authentication

Use API key authentication for CI environments, scripts, remote systems, and agents:

stacksync login --api-key <key> --workspace <id>

Update

stacksync update

Options

OptionDescription
--forceReinstall the CLI even when the installed version is already current.

Environment Configuration

Use stacksync env to view or modify CLI configuration.

CommandDescription
stacksync envList all configuration values.
stacksync env <key>Display a specific configuration value.
stacksync env <key> <value>Set a configuration value.

Workflow Connectors

CommandDescription
stacksync workflow-connector create "<name>"Create a Workflow Connector project in the current directory.
stacksync workflow-connector runRun the current connector locally and connect it to your workspace for testing.
stacksync workflow-connector deployDeploy the current connector to your Stacksync workspace.
stacksync workflow-connector deleteDelete the current connector.
stacksync workflow-connector replay <selector>Replay a logged request against the local connector for debugging.
stacksync workflow-connector cdk [ref]Display the tracked CDK version or switch to another version or release channel.

Run a Workflow Connector

stacksync workflow-connector run

Options

OptionDefaultDescription
--port <n>2323Set the local port. If the port is unavailable, the CLI automatically selects the next available port.
--sync-buildEnabledContinuously copy changed files into .stacksync_build for hot reload.
--no-sync-build—Disable continuous build synchronization.

Replay a Request

Replay a previously logged request against a connector running locally:

stacksync workflow-connector replay <selector>

The selector can be:

SelectorDescription
<trace-id>Replay the request matching the specified UUID trace ID.
firstReplay the first logged request.
lastReplay the most recent logged request.
first+nReplay the request n positions after the first request.
last-nReplay the request n positions before the most recent request.

Options

OptionDefaultDescription
--port <n>2323Local port where the connector is running.

Manage the CDK Version

Display or change the CDK version tracked by the current connector.

stacksync workflow-connector cdk

Examples:

stacksync workflow-connector cdk
stacksync workflow-connector cdk v2
stacksync workflow-connector cdk v1.0.0
stacksync workflow-connector cdk prod
ReferenceDescription
No referenceDisplay the currently tracked CDK version.
v2Track the latest release in the v2 major version.
v1.0.0Pin the connector to an exact CDK release.
prodTrack the latest production build.

Workflow Modules

CommandDescription
stacksync workflow-module create "<name>"Add a module to the current Workflow Connector.
stacksync workflow-module delete "<name>"Remove a module from the current Workflow Connector. Run this command from the connector root or the module directory.

On this page