You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cli/README.md
+14-27Lines changed: 14 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,18 +10,9 @@ CLI for PowerSync
10
10
*[@powersync/cli](#powersynccli)
11
11
*[Overview](#overview)
12
12
*[Cloud](#cloud)
13
-
*[Edit powersync/service.yaml and sync rules](#edit-powersyncserviceyaml-and-sync-rules)
14
-
*[If your token has multiple orgs: add --org-id=<org-id>](#if-your-token-has-multiple-orgs-add---org-idorg-id)
15
-
*[If your token has multiple orgs: add --org-id=<org-id>](#if-your-token-has-multiple-orgs-add---org-idorg-id)
16
-
*[Edit powersync/service.yaml and sync.yaml as needed](#edit-powersyncserviceyaml-and-syncyaml-as-needed)
17
-
*[If your token has multiple orgs: add --org-id=<org-id>](#if-your-token-has-multiple-orgs-add---org-idorg-id)
18
-
*[Or with environment variables (set ORG_ID only if your token has multiple orgs)](#or-with-environment-variables-set-org_id-only-if-your-token-has-multiple-orgs)
@@ -112,7 +99,7 @@ The CLI can run a subset of commands against **self-hosted** PowerSync instances
112
99
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`**:
- dev-token-do-not-use-in-production # or use !env MY_API_TOKEN for secrets
@@ -121,7 +108,7 @@ api:
121
108
Then tell the CLI which token to use when running commands. Run **`powersync link self-hosted --api-url <url>`** to write **`cli.yaml`** with the API URL, and either set the **`TOKEN`** environment variable or set **`api_key`** in **`cli.yaml`**:
122
109
123
110
```yaml
124
-
# powersync/cli.yaml (self-hosted)
111
+
# powersync/cli.yaml (self-hosted)
125
112
type: self-hosted
126
113
api_url: https://powersync.example.com
127
114
api_key: !env TOKEN # or a literal value matching one of the tokens in service.yaml
@@ -135,7 +122,7 @@ Run **`powersync init self-hosted`** to scaffold a config directory. Edit **`ser
135
122
136
123
```sh
137
124
powersync init self-hosted
138
-
# Edit powersync/service.yaml
125
+
# then edit powersync/service.yaml
139
126
powersync link self-hosted --api-url https://powersync.example.com
140
127
powersync fetch status
141
128
```
@@ -150,6 +137,10 @@ We provide a [Docker plugin](../plugins/docker/README.md) for running a self-hos
150
137
151
138
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.
152
139
140
+
# Known Limitations
141
+
142
+
- **Login secure storage**: Secure storage for auth tokens is only supported on macOS (via Keychain). On Windows and Linux, `powersync login` will not persist credentials; use the `TOKEN` environment variable instead for Cloud commands.
143
+
153
144
# Usage
154
145
155
146
<!-- usage -->
@@ -166,10 +157,6 @@ USAGE
166
157
```
167
158
<!-- usagestop -->
168
159
169
-
# Known Limitations
170
-
171
-
- **Login secure storage**: Secure storage for auth tokens is only supported on macOS (via Keychain). On Windows and Linux, `powersync login` will not persist credentials; use the `TOKEN` environment variable instead for Cloud commands.
0 commit comments