Skip to content

CLI Commands

Synclet is distributed as a single binary. All operations — running the server, managing migrations, and executing syncs — are subcommands of synclet.

CommandDescription
synclet serverStart the API server.
synclet server --standaloneStart the API server with background jobs and sync executor in a single process.
synclet jobsRun background jobs (scheduler, workers) as a separate process.
synclet docker-executorRun the Docker sync executor daemon.
synclet k8s-executorRun the Kubernetes sync executor daemon.
synclet migrate upApply all pending database migrations.
synclet migrate downRoll back the last applied migration.
synclet migrate statusShow migration status.
synclet migrate create <module> <name>Create a new migration file.
synclet generate dotenvGenerate a .env file with all available environment variables and their defaults.
FlagDescription
--dotenv <path>Load environment variables from the specified .env file(s). Can be repeated.
--versionPrint the Synclet version.

synclet server starts the HTTP API. In standalone mode (--standalone), it also starts background jobs (scheduler, workers) and the sync executor in the same process — this is the simplest way to run Synclet.

Terminal window
# Start in standalone mode (API + jobs + executor in one process)
DB_DSN=postgres://user:pass@localhost:5432/synclet \
AUTH_JWT_SECRET=your-secret \
SECRET_ENCRYPTION_KEY=your-base64-key \
synclet server --standalone
# Load config from a .env file
synclet server --standalone --dotenv .env

In standalone mode, the executor is automatically selected: Docker on regular hosts, Kubernetes when running inside a K8s pod (detected via the in-cluster environment).

The public HTTP server binds to 0.0.0.0:8080 by default (configurable via PUBLIC_HTTP_SERVER_ADDR). See Environment Variables for the full list of configuration options.

For larger deployments, you can run the API server, background jobs, and executor as separate processes:

Terminal window
# Process 1: API server only
synclet server
# Process 2: Background jobs
synclet jobs
# Process 3: Docker executor
synclet docker-executor
# Or Kubernetes executor
synclet k8s-executor

The docker-executor and k8s-executor commands also accept a --standalone flag to use direct DB access instead of connecting to the API server via RPC.

Database migrations run automatically when the server starts. You can also run them manually:

Terminal window
# Apply all pending migrations
synclet migrate up
# Roll back the last migration
synclet migrate down
# Check migration status
synclet migrate status
# Create a new migration file
synclet migrate create auth add_api_tokens

The --module flag can be used with up, down, and status to target a specific module.

Migrations are idempotent — running migrate up on an already up-to-date database is a no-op.

Generates a .env file containing all available environment variables with their default values. If a .env file already exists, new variables are appended without overwriting existing values.

Aliases: synclet gen dotenv, synclet generate env

Terminal window
# Generate a .env file with all variables
synclet generate dotenv

This is useful when setting up a new environment or after upgrading to discover newly added configuration options.

Airbyte is a trademark of Airbyte, Inc. Synclet is not affiliated with, endorsed by or sponsored by Airbyte, Inc. Connector images keep their own licenses: see Connector licenses.