From f8dcdd7e866a595414de5c8bc424660d14a3dfbf Mon Sep 17 00:00:00 2001 From: bean1352 Date: Thu, 26 Feb 2026 10:31:10 +0200 Subject: [PATCH 01/10] Update workflow to use new PowerSync CLI and rename sync rules to sync streams --- ...deploy-sync-rules.yml => deploy-sync-streams.yml} | 12 ++++++------ README.md | 4 ++-- sync-rules.yaml | 5 ----- sync_streams.yaml | 11 +++++++++++ 4 files changed, 19 insertions(+), 13 deletions(-) rename .github/workflows/{deploy-sync-rules.yml => deploy-sync-streams.yml} (68%) delete mode 100644 sync-rules.yaml create mode 100644 sync_streams.yaml diff --git a/.github/workflows/deploy-sync-rules.yml b/.github/workflows/deploy-sync-streams.yml similarity index 68% rename from .github/workflows/deploy-sync-rules.yml rename to .github/workflows/deploy-sync-streams.yml index c29e87b..6e708aa 100644 --- a/.github/workflows/deploy-sync-rules.yml +++ b/.github/workflows/deploy-sync-streams.yml @@ -1,11 +1,11 @@ -name: Deploy Sync Rules +name: Deploy Sync Streams on: push: branches: - main paths: - - "sync-rules.yaml" + - "sync_streams.yaml" permissions: contents: read @@ -24,14 +24,14 @@ jobs: node-version-file: node/.nvmrc - name: Install PowerSync CLI - run: npm install powersync + run: npm install powersync-ja/temp-cli - - name: Deploy sync rules + - name: Deploy sync config env: - AUTH_TOKEN: ${{ secrets.POWERSYNC_AUTH_TOKEN }} + PS_ADMIN_TOKEN: ${{ secrets.POWERSYNC_AUTH_TOKEN }} INSTANCE_ID: ${{ secrets.POWERSYNC_INSTANCE_ID }} PROJECT_ID: ${{ secrets.POWERSYNC_PROJECT_ID }} ORG_ID: ${{ secrets.POWERSYNC_ORG_ID }} run: | - npx powersync instance sync-rules deploy --filePath ./sync-rules.yaml -s + npx powersync deploy sync-config --directory=. diff --git a/README.md b/README.md index 5f6470f..3f3e900 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -## GitHub Actions Sync Rules Demo +## GitHub Actions Sync Streams Demo -This repository shows how to deploy PowerSync sync rules to an instance whenever a push to the `main` branch includes changes to `sync-rules.yaml`. The included GitHub Actions workflow installs the PowerSync CLI and runs the deployment command automatically. +This repository shows how to deploy PowerSync sync config to an instance whenever a push to the `main` branch includes changes to `sync_streams.yaml`. The included GitHub Actions workflow installs the PowerSync CLI and runs the deployment command automatically. ## Prerequisites diff --git a/sync-rules.yaml b/sync-rules.yaml deleted file mode 100644 index 2c5d193..0000000 --- a/sync-rules.yaml +++ /dev/null @@ -1,5 +0,0 @@ -bucket_definitions: - global: - data: - - SELECT * FROM lists - - SELECT id FROM todos \ No newline at end of file diff --git a/sync_streams.yaml b/sync_streams.yaml new file mode 100644 index 0000000..f910907 --- /dev/null +++ b/sync_streams.yaml @@ -0,0 +1,11 @@ +streams: + owned_lists: + query: SELECT * FROM lists WHERE owner_id = auth.user_id() + list_todos: + query: SELECT * FROM todos WHERE list_id = subscription.parameter('list_id') AND list_id IN (SELECT id FROM lists WHERE owner_id = auth.user_id()) + +config: + # see https://docs.powersync.com/sync/advanced/compatibility + # this edition also deploys several backwards-incompatible fixes + # see the docs for details + edition: 3 \ No newline at end of file From a8250811ea607d6ebf9f358fb486b0944a06881d Mon Sep 17 00:00:00 2001 From: bean1352 Date: Thu, 26 Feb 2026 10:33:56 +0200 Subject: [PATCH 02/10] Workflow test --- .github/workflows/deploy-sync-streams.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy-sync-streams.yml b/.github/workflows/deploy-sync-streams.yml index 6e708aa..e7e0730 100644 --- a/.github/workflows/deploy-sync-streams.yml +++ b/.github/workflows/deploy-sync-streams.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - new-cli paths: - "sync_streams.yaml" @@ -24,6 +25,7 @@ jobs: node-version-file: node/.nvmrc - name: Install PowerSync CLI + # todo: replace with npm install powersync run: npm install powersync-ja/temp-cli - name: Deploy sync config From a51bb267435be17f05face6f49d2f41a17e8e8d5 Mon Sep 17 00:00:00 2001 From: bean1352 Date: Thu, 26 Feb 2026 10:35:47 +0200 Subject: [PATCH 03/10] Workflow test 2 --- sync_streams.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sync_streams.yaml b/sync_streams.yaml index f910907..891be9f 100644 --- a/sync_streams.yaml +++ b/sync_streams.yaml @@ -1,8 +1,8 @@ streams: owned_lists: query: SELECT * FROM lists WHERE owner_id = auth.user_id() - list_todos: - query: SELECT * FROM todos WHERE list_id = subscription.parameter('list_id') AND list_id IN (SELECT id FROM lists WHERE owner_id = auth.user_id()) + # list_todos: + # query: SELECT * FROM todos WHERE list_id = subscription.parameter('list_id') AND list_id IN (SELECT id FROM lists WHERE owner_id = auth.user_id()) config: # see https://docs.powersync.com/sync/advanced/compatibility From 0769cc0892e4166f18c8034e4a0911ea6abbe3ab Mon Sep 17 00:00:00 2001 From: bean1352 Date: Thu, 26 Feb 2026 10:37:04 +0200 Subject: [PATCH 04/10] Workflow test 3 --- .github/workflows/deploy-sync-streams.yml | 2 +- sync_streams.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-sync-streams.yml b/.github/workflows/deploy-sync-streams.yml index e7e0730..460a57d 100644 --- a/.github/workflows/deploy-sync-streams.yml +++ b/.github/workflows/deploy-sync-streams.yml @@ -26,7 +26,7 @@ jobs: - name: Install PowerSync CLI # todo: replace with npm install powersync - run: npm install powersync-ja/temp-cli + run: npm install https://github.com/powersync-ja/temp-cli.git - name: Deploy sync config env: diff --git a/sync_streams.yaml b/sync_streams.yaml index 891be9f..f910907 100644 --- a/sync_streams.yaml +++ b/sync_streams.yaml @@ -1,8 +1,8 @@ streams: owned_lists: query: SELECT * FROM lists WHERE owner_id = auth.user_id() - # list_todos: - # query: SELECT * FROM todos WHERE list_id = subscription.parameter('list_id') AND list_id IN (SELECT id FROM lists WHERE owner_id = auth.user_id()) + list_todos: + query: SELECT * FROM todos WHERE list_id = subscription.parameter('list_id') AND list_id IN (SELECT id FROM lists WHERE owner_id = auth.user_id()) config: # see https://docs.powersync.com/sync/advanced/compatibility From ea743583ce9be00e5cc010b9af060bfc596603e9 Mon Sep 17 00:00:00 2001 From: bean1352 Date: Thu, 26 Feb 2026 10:42:36 +0200 Subject: [PATCH 05/10] Workflow test 4 --- .github/workflows/deploy-sync-streams.yml | 2 +- sync_streams.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-sync-streams.yml b/.github/workflows/deploy-sync-streams.yml index 460a57d..e3b4966 100644 --- a/.github/workflows/deploy-sync-streams.yml +++ b/.github/workflows/deploy-sync-streams.yml @@ -26,7 +26,7 @@ jobs: - name: Install PowerSync CLI # todo: replace with npm install powersync - run: npm install https://github.com/powersync-ja/temp-cli.git + run: npm install https://${{ secrets.GH_PKG_TOKEN }}@github.com/powersync-ja/temp-cli.git - name: Deploy sync config env: diff --git a/sync_streams.yaml b/sync_streams.yaml index f910907..891be9f 100644 --- a/sync_streams.yaml +++ b/sync_streams.yaml @@ -1,8 +1,8 @@ streams: owned_lists: query: SELECT * FROM lists WHERE owner_id = auth.user_id() - list_todos: - query: SELECT * FROM todos WHERE list_id = subscription.parameter('list_id') AND list_id IN (SELECT id FROM lists WHERE owner_id = auth.user_id()) + # list_todos: + # query: SELECT * FROM todos WHERE list_id = subscription.parameter('list_id') AND list_id IN (SELECT id FROM lists WHERE owner_id = auth.user_id()) config: # see https://docs.powersync.com/sync/advanced/compatibility From eb3caf29c5b02e6e18217b3965a2e8fb03b0a400 Mon Sep 17 00:00:00 2001 From: bean1352 Date: Thu, 26 Feb 2026 14:09:51 +0200 Subject: [PATCH 06/10] Workflow test 5 --- .github/workflows/deploy-sync-streams.yml | 2 +- build-bundle/README.md | 1501 +++ build-bundle/bin/dev.cmd | 3 + build-bundle/bin/dev.js | 15 + build-bundle/bin/run.cmd | 3 + build-bundle/bin/run.js | 5 + build-bundle/oclif.manifest.json | 1483 +++ build-bundle/package.json | 64 + build-bundle/pnpm-lock.yaml | 10179 ++++++++++++++++ .../templates/cloud/powersync/cli.yaml | 3 + .../templates/cloud/powersync/service.yaml | 174 + .../cloud/powersync/sync-config.yaml | 22 + .../self-hosted/base/powersync/cli.yaml | 3 + .../self-hosted/base/powersync/service.yaml | 243 + .../base/powersync/sync-config.yaml | 22 + build-bundle/templates/vscode/settings.json | 3 + sync_streams.yaml | 4 +- 17 files changed, 13726 insertions(+), 3 deletions(-) create mode 100644 build-bundle/README.md create mode 100644 build-bundle/bin/dev.cmd create mode 100755 build-bundle/bin/dev.js create mode 100644 build-bundle/bin/run.cmd create mode 100755 build-bundle/bin/run.js create mode 100644 build-bundle/oclif.manifest.json create mode 100644 build-bundle/package.json create mode 100644 build-bundle/pnpm-lock.yaml create mode 100644 build-bundle/templates/cloud/powersync/cli.yaml create mode 100644 build-bundle/templates/cloud/powersync/service.yaml create mode 100644 build-bundle/templates/cloud/powersync/sync-config.yaml create mode 100644 build-bundle/templates/self-hosted/base/powersync/cli.yaml create mode 100644 build-bundle/templates/self-hosted/base/powersync/service.yaml create mode 100644 build-bundle/templates/self-hosted/base/powersync/sync-config.yaml create mode 100644 build-bundle/templates/vscode/settings.json diff --git a/.github/workflows/deploy-sync-streams.yml b/.github/workflows/deploy-sync-streams.yml index e3b4966..d7da351 100644 --- a/.github/workflows/deploy-sync-streams.yml +++ b/.github/workflows/deploy-sync-streams.yml @@ -26,7 +26,7 @@ jobs: - name: Install PowerSync CLI # todo: replace with npm install powersync - run: npm install https://${{ secrets.GH_PKG_TOKEN }}@github.com/powersync-ja/temp-cli.git + run: npm install ./build-bundle - name: Deploy sync config env: diff --git a/build-bundle/README.md b/build-bundle/README.md new file mode 100644 index 0000000..e8d238c --- /dev/null +++ b/build-bundle/README.md @@ -0,0 +1,1501 @@ +# powersync + +CLI for PowerSync + +[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) +[![Version](https://img.shields.io/npm/v/@powersync/cli.svg)](https://npmjs.org/package/@powersync/cli) +[![Downloads/week](https://img.shields.io/npm/dw/@powersync/cli.svg)](https://npmjs.org/package/@powersync/cli) + + + +- [powersync](#powersync) +- [Getting Started](#getting-started) +- [Overview](#overview) +- [Cloud](#cloud) +- [Self-hosted](#self-hosted) +- [powersync/service.yaml (self-hosted instance config)](#powersyncserviceyaml-self-hosted-instance-config) +- [powersync/cli.yaml (self-hosted)](#powersynccliyaml-self-hosted) +- [Known Limitations](#known-limitations) +- [OCLIF plugins](#oclif-plugins) +- [list installed plugins](#list-installed-plugins) +- [install a published plugin](#install-a-published-plugin) +- [link a local plugin during development](#link-a-local-plugin-during-development) +- [inspect a plugin](#inspect-a-plugin) +- [Usage](#usage) +- [Commands](#commands) + + +# Getting Started + +Install globally or run via `npx`: + +```bash +npm install -g powersync +``` + +```bash +npx powersync --version +``` + +# Overview + +The PowerSync CLI lets you manage PowerSync instances and run commands (generate schemas, tokens, validate config, fetch status, and more). Support is split into two modes: + +- **Cloud** – Full support for [PowerSync Cloud](https://powersync.com). You can create new instances, deploy and pull config from the Dashboard, and run all Cloud commands. Authenticate with **`powersync login`** (or the `PS_ADMIN_TOKEN` env var), then use **`powersync init cloud`** / **`powersync link cloud`** or **`powersync pull instance`** to work with projects. +- **Self-hosted** – Limited support for your own PowerSync Service. You link to an existing running instance and can run a subset of commands (e.g. **`powersync fetch status`**, **`powersync generate schema`**, **`powersync validate`**). The CLI does not create, deploy to, or pull config from self-hosted instances; you manage the server and its config yourself. We also expose a [PowerSync Docker topic](../plugins/docker/README.md) for local self-hosted development. + +The sections below go into detail for [Cloud](#cloud) and [Self-hosted](#self-hosted). + +# Cloud + +The CLI supports **PowerSync Cloud** for creating instances, deploying config, pulling config, and running commands. Cloud workflows use a **config directory** (default `powersync/`) containing **`service.yaml`**, **`sync-config.yaml`**, and optionally **`cli.yaml`** (the link file written by **powersync link cloud**). All PowerSync YAML files support the **`!env`** custom tag (e.g. `!env MY_VAR` or `!env MY_VAR::number`) for secrets and environment-specific values. + +## Login + +Cloud commands require a PowerSync **personal access token (PAT)**. You can authenticate in two ways: + +**1. Interactive login (recommended for local use)** +Run **`powersync login`**. You can either open a browser to create a token in the [PowerSync Dashboard](https://dashboard.powersync.com/account/access-tokens/create) or paste an existing token. + +- If secure storage is available, the token is saved there (for example, macOS Keychain). +- If secure storage is unavailable, the CLI asks for confirmation before storing the token in plaintext at **`$XDG_CONFIG_HOME/powersync/config.yaml`** (or **`~/.config/powersync/config.yaml`** when `XDG_CONFIG_HOME` is unset). +- If you decline, login exits without storing a token. + +**2. Environment variable (CI, scripts, or non-persistent use)** +Set **`PS_ADMIN_TOKEN`** to your PAT. The CLI uses **`PS_ADMIN_TOKEN`** when set; otherwise it uses the token from **`powersync login`**. Example: + +```sh +export PS_ADMIN_TOKEN=your-personal-access-token +powersync fetch instances --project-id= +``` + +To stop using stored credentials, run **`powersync logout`**. This clears the stored token from the active backend (secure storage or config-file fallback). + +## Creating a new instance + +Run **`powersync init cloud`** to scaffold the config directory. Configure **`service.yaml`** (name, region, replication, optional client auth) and sync config; use **`!env`** for all secrets. Then run **`powersync link cloud --create`** with `--project-id` to create the instance and write **`cli.yaml`**. (Add `--org-id` only if your token has access to multiple organizations.) After that you can run **`powersync deploy`** and manage config from the project (or switch to managing it externally if you prefer). + +```sh +powersync init cloud + # then edit powersync/service.yaml and sync config +powersync login +powersync link cloud --create --project-id= # add --org-id if token has multiple orgs +powersync deploy +``` + +Use `--directory` for a different config folder. The **powersync init cloud** command has a `--vscode` flag to configure your workspace for YAML custom tag support. + +## Cloud secrets format (`service.yaml`) + +For Cloud config, secret-backed fields use an object shape. For example, the replication connection password is configured as `replication.connections[].password`. + +Use `secret: !env ...` when you want to provide the value from an environment variable during deploy: + +```yaml +replication: + connections: + - type: postgresql + password: + secret: !env POWERSYNC_DATABASE_PASSWORD +``` + +After an initial deploy, you can keep using the same stored value by switching to `secret_ref` and referencing the default password secret: + +```yaml +replication: + connections: + - type: postgresql + password: + secret_ref: default_password +``` + +This avoids re-supplying the raw password in subsequent deploys while reusing the previously stored secret. + +## Using an existing instance (pull) + +Run **`powersync pull instance`** with the instance identifiers (from the PowerSync Dashboard URL or **`powersync fetch instances`**). This creates the config directory, writes **`cli.yaml`**, and downloads **`service.yaml`** and **`sync-config.yaml`**. Edit as needed, then run **`powersync deploy`**. + +```sh +powersync login +powersync pull instance --project-id= --instance-id= # add --org-id if multiple orgs + # then edit powersync/service.yaml and sync-config.yaml as needed +powersync deploy +``` + +To refresh local config after external edits from the cloud when already linked, run **`powersync pull instance`** again. + +## Running commands against externally managed instances + +You can run CLI commands (e.g. **`powersync generate schema`**, **`powersync generate token`**, **`powersync fetch status`**) against a Cloud instance whose configuration is managed elsewhere—for example in the PowerSync Dashboard. No local config directory or link file is required. + +Specify the instance using **environment variables** or **CLI flags** (flags take precedence): `--instance-id` and `--project-id` (or `INSTANCE_ID`, `PROJECT_ID`). **`--org-id` is optional**: when omitted, the CLI uses the token’s single organization if the token has access to exactly one; if the token has multiple orgs, you must pass **`--org-id`** (or set `ORG_ID`). + +```sh +powersync login +powersync generate schema --instance-id= --project-id= --output-path=schema.ts --output=ts # add --org-id if multiple orgs + # or with env vars (set ORG_ID only if your token has multiple orgs): +export PROJECT_ID= +export INSTANCE_ID= +powersync generate schema --output-path=schema.ts --output=ts +``` + +**Tip:** To avoid passing instance params on every command, run **`powersync link cloud`** (e.g. `powersync link cloud --instance-id= --project-id=`) once. The CLI writes `cli.yaml` in the current directory, and subsequent commands use that instance without flags or env vars. + +# Self-hosted + +The CLI can run a subset of commands against **self-hosted** PowerSync instances (your own API). Self-hosted support is more limited than Cloud: you link to an existing running API and use the same config directory concept, but only certain commands apply (e.g. **`powersync fetch status`**, **`powersync generate schema`**, **`powersync generate token`**, **`powersync validate`**). There is no **deploy** or **pull instance** for self-hosted; you manage config on the server yourself. + +## Authentication + +For any self-hosted instance (local or remote), you must link the running API to the CLI and configure an API key. On the **server** (your PowerSync instance config), define the tokens that are valid in **`service.yaml`**: + +```yaml +# powersync/service.yaml (self-hosted instance config) +api: + tokens: + - dev-token-do-not-use-in-production # or use !env MY_API_TOKEN for secrets +``` + +Then tell the CLI which token to use when running commands. Run **`powersync link self-hosted --api-url `** to write **`cli.yaml`** with the API URL, and either set the **`PS_ADMIN_TOKEN`** environment variable or set **`api_key`** in **`cli.yaml`**: + +```yaml +# powersync/cli.yaml (self-hosted) +type: self-hosted +api_url: https://powersync.example.com +api_key: !env PS_ADMIN_TOKEN # or a literal value matching one of the tokens in service.yaml +``` + +The CLI resolves **`!env PS_ADMIN_TOKEN`** from the `PS_ADMIN_TOKEN` environment variable at runtime. If both are set, the environment variable takes precedence. + +## Creating a self-hosted project and limitations + +Run **`powersync init self-hosted`** to scaffold a config directory. Edit **`service.yaml`** with your instance details and use **`!env`** for secrets. This gives you a **partial** project: the CLI does not create or provision a self-hosted instance. You must already have a running PowerSync API. The CLI cannot deploy config to or pull config from a self-hosted instance; you manage **`service.yaml`** and **`sync-config.yaml`** on the server yourself. Use the CLI to link (**`powersync link self-hosted --api-url `**), then run the supported commands (e.g. **`powersync fetch status`**, **`powersync generate schema`**) against that API. + +```sh +powersync init self-hosted + # then edit powersync/service.yaml +powersync link self-hosted --api-url https://powersync.example.com +powersync fetch status +``` + +Use `--directory` for a different config folder. + +## PowerSync Docker topic for local development + +We expose a [PowerSync Docker topic](../plugins/docker/README.md) for running a self-hosted stack locally. Use **`powersync docker configure`** then **`powersync docker start`** to run the stack. Use **`powersync docker reset`** only when you need to start from a clean state (stop and remove, then start). + +## Command support + +Only some CLI commands work with self-hosted instances. Supported commands include **`powersync fetch status`**, **`powersync generate schema`**, **`powersync generate token`**, **`powersync validate`**, and **`powersync link self-hosted`**. Cloud-only commands such as **`powersync deploy`**, **`powersync destroy`**, **`powersync pull instance`**, **`powersync fetch config`**, and **`powersync fetch instances`** do not apply to self-hosted. + +# Known Limitations + +- **Plaintext fallback storage**: When secure storage is unavailable, login can store the token in plaintext config (`$XDG_CONFIG_HOME/powersync/config.yaml` or `~/.config/powersync/config.yaml`) only after explicit confirmation. + +# OCLIF plugins + +The CLI honors standard [OCLIF plugin behavior](https://oclif.io/docs/plugins/), so plugins can register commands or hook into command lifecycles. The bundled PowerSync Docker topic (`@powersync/cli-plugin-docker`) is implemented this way and serves as a reference. + +For PowerSync-specific plugins, the optional `@powersync/cli-core` package exposes base command helpers and shared types; the PowerSync Docker topic consumes these helpers to add its Docker-focused commands. + +You can manage plugins dynamically at runtime: + +```sh +# list installed plugins +powersync plugins + +# install a published plugin +powersync plugins install @example/powersync-plugin-foo + +# link a local plugin during development +powersync plugins link ../my-plugin + +# inspect a plugin +powersync plugins:inspect @example/powersync-plugin-foo +``` + +# Usage + + + +```sh-session +$ npm install -g powersync +$ powersync COMMAND +running command... +$ powersync (--version) +powersync/0.0.0 darwin-arm64 node-v24.13.0 +$ powersync --help [COMMAND] +USAGE + $ powersync COMMAND +... +``` + + + +## Environment variables + +You can supply instance and auth context via environment variables (useful for CI or scripts): + +- **`PS_ADMIN_TOKEN`** — PowerSync personal access token for Cloud commands. [Learn more](https://docs.powersync.com/usage/tools/cli#personal-access-token). +- **`ORG_ID`** — Organization ID (optional for Cloud). Omit when your token has a single organization; required when it has multiple. +- **`PROJECT_ID`** — Project ID (Cloud). +- **`INSTANCE_ID`** — Instance ID (Cloud). Get IDs from the [PowerSync Dashboard](https://dashboard.powersync.com) or **`powersync fetch instances`**. +- **`API_URL`** — Self-hosted PowerSync API base URL (e.g. `https://powersync.example.com`). + +Example (Cloud): + +```sh +PS_ADMIN_TOKEN=your-token PROJECT_ID=456 INSTANCE_ID=789 powersync fetch status +``` + +See [docs/usage.md](../docs/usage.md) for full usage and resolution order (flags, env, cli.yaml). + +# Commands + + + +- [`powersync autocomplete [SHELL]`](#powersync-autocomplete-shell) +- [`powersync commands`](#powersync-commands) +- [`powersync deploy`](#powersync-deploy) +- [`powersync deploy service-config`](#powersync-deploy-service-config) +- [`powersync deploy sync-config`](#powersync-deploy-sync-config) +- [`powersync destroy`](#powersync-destroy) +- [`powersync docker configure`](#powersync-docker-configure) +- [`powersync docker reset`](#powersync-docker-reset) +- [`powersync docker start`](#powersync-docker-start) +- [`powersync docker stop`](#powersync-docker-stop) +- [`powersync fetch config`](#powersync-fetch-config) +- [`powersync fetch instances`](#powersync-fetch-instances) +- [`powersync fetch status`](#powersync-fetch-status) +- [`powersync generate schema`](#powersync-generate-schema) +- [`powersync generate token`](#powersync-generate-token) +- [`powersync help [COMMAND]`](#powersync-help-command) +- [`powersync init cloud`](#powersync-init-cloud) +- [`powersync init self-hosted`](#powersync-init-self-hosted) +- [`powersync link cloud`](#powersync-link-cloud) +- [`powersync link self-hosted`](#powersync-link-self-hosted) +- [`powersync login`](#powersync-login) +- [`powersync logout`](#powersync-logout) +- [`powersync migrate sync-rules`](#powersync-migrate-sync-rules) +- [`powersync plugins`](#powersync-plugins) +- [`powersync plugins add PLUGIN`](#powersync-plugins-add-plugin) +- [`powersync plugins:inspect PLUGIN...`](#powersync-pluginsinspect-plugin) +- [`powersync plugins install PLUGIN`](#powersync-plugins-install-plugin) +- [`powersync plugins link PATH`](#powersync-plugins-link-path) +- [`powersync plugins remove [PLUGIN]`](#powersync-plugins-remove-plugin) +- [`powersync plugins reset`](#powersync-plugins-reset) +- [`powersync plugins uninstall [PLUGIN]`](#powersync-plugins-uninstall-plugin) +- [`powersync plugins unlink [PLUGIN]`](#powersync-plugins-unlink-plugin) +- [`powersync plugins update`](#powersync-plugins-update) +- [`powersync pull instance`](#powersync-pull-instance) +- [`powersync status`](#powersync-status) +- [`powersync stop`](#powersync-stop) +- [`powersync validate`](#powersync-validate) + +## `powersync autocomplete [SHELL]` + +Display autocomplete installation instructions. + +``` +USAGE + $ powersync autocomplete [SHELL] [-r] + +ARGUMENTS + [SHELL] (zsh|bash|powershell) Shell type + +FLAGS + -r, --refresh-cache Refresh cache (ignores displaying instructions) + +DESCRIPTION + Display autocomplete installation instructions. + +EXAMPLES + $ powersync autocomplete + + $ powersync autocomplete bash + + $ powersync autocomplete zsh + + $ powersync autocomplete powershell + + $ powersync autocomplete --refresh-cache +``` + +_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.40/src/commands/autocomplete/index.ts)_ + +## `powersync commands` + +List all powersync commands. + +``` +USAGE + $ powersync commands [--json] [-c id|plugin|summary|type... | --tree] [--deprecated] [-x | ] [--hidden] + [--no-truncate | ] [--sort id|plugin|summary|type | ] + +FLAGS + -c, --columns=