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
|[**@powersync/cli**](./cli)|`cli/`| Main CLI — manage instances, config, sync config, cloud and self-hosted |
19
+
|[**PowerSync CLI Config Studio**](./packages/editor)|`packages/editor/`| Monaco-based UI that edits `service.yaml`/`sync-config.yaml` and ships with the config-edit plugin |
20
+
|[**@powersync/cli-core**](./packages/cli-core)|`packages/cli-core/`| Core types and base commands shared by the CLI and plugins |
|[**@powersync/cli-plugin-config-edit**](./plugins/config-edit)|`plugins/config-edit/`| CLI plugin that sets `POWERSYNC_PROJECT_CONTEXT` and serves the Config Studio with the Nitro server |
-**cli** depends on **cli-core**, **cli-schemas**, and **@powersync/cli-plugin-docker**. It loads the docker plugin and re-exports base command types from cli-core.
37
-
-**plugin-docker** (in **plugins/docker**) depends on **cli-core** and **cli-schemas**. No dependency on the CLI package.
42
+
-**cli** depends on **cli-core**, **cli-schemas**, **@powersync/cli-plugin-config-edit**, and **@powersync/cli-plugin-docker**. It loads the bundled plugins and re-exports base command types from cli-core.
38
43
-**cli-core** depends on **schemas**. It provides `SelfHostedInstanceCommand`, YAML helpers (`!env`), and shared types for plugins.
44
+
-**packages/editor** builds the Config Studio assets consumed by the config-edit plugin and embeds schemas from `@powersync/cli-schemas`.
45
+
-**@powersync/cli-plugin-config-edit** depends on **cli-core** and serves the built editor from `plugins/config-edit/editor-dist` using the Nitro server.
46
+
-**@powersync/cli-plugin-docker** depends on **cli-core** and **cli-schemas**. No dependency on the CLI package.
39
47
40
48
Workspace roots are listed in [pnpm-workspace.yaml](./pnpm-workspace.yaml): `cli`, `packages/*`, `plugins/*`.
41
49
42
50
## OCLIF plugins
43
51
44
-
We rely on standard [OCLIF plugin loading](https://oclif.io/docs/plugins/) so plugins can register new commands or hook into command execution. The main CLI ships with a Docker plugin under [plugins/docker](./plugins/docker), and any other OCLIF-compatible plugin can be installed the same way.
52
+
We rely on standard [OCLIF plugin loading](https://oclif.io/docs/plugins/) so plugins can register new commands or hook into command execution. The main CLI ships with Docker and Config Studio plugins under [plugins/docker](./plugins/docker) and [plugins/config-edit](./plugins/config-edit), and any other OCLIF-compatible plugin can be installed the same way.
45
53
46
-
For PowerSync-specific plugins, the optional [@powersync/cli-core](./packages/cli-core) package exposes base command helpers and shared types. The Docker plugin consumes these helpers and adds Docker-focused commands as a reference implementation.
54
+
For PowerSync-specific plugins, the optional [@powersync/cli-core](./packages/cli-core) package exposes base command helpers and shared types. The bundled plugins consume these helpers and serve as reference implementations.
47
55
48
56
Users can manage their own installed plugins dynamically at runtime. Run `powersync plugins --help` for install, uninstall, and inspection options.
49
57
@@ -72,6 +80,21 @@ powersync docker start
72
80
73
81
See [plugins/docker](./plugins/docker/README.md) and [docs/usage-docker.md](./docs/usage-docker.md) for details.
74
82
83
+
### Configuration editor
84
+
85
+
Open the Monaco-based Config Studio that edits `service.yaml`/`sync-config.yaml` directly inside your project:
86
+
87
+
```bash
88
+
pnpm build # ensures packages/editor copies its dist to plugins/config-edit/editor-dist
- The command above is provided by **@powersync/cli-plugin-config-edit** and automatically sets `POWERSYNC_PROJECT_CONTEXT` (based on the linked project) before serving the built editor through the Nitro server.
93
+
- Features include YAML schema validation, Monaco-powered completions, unsaved-change tracking, reset/save controls, and an error panel for schema violations.
94
+
- For local UI work (without running the CLI command) export `POWERSYNC_PROJECT_CONTEXT` JSON that points at your project (the CLI sets this for you) and start the dev server: `POWERSYNC_PROJECT_CONTEXT='{"linkedProject":{"projectDirectory":"/path/to/project","linked":{"type":"self-hosted"}}}' pnpm --filter editor dev`.
95
+
- Prefer the default host (127.0.0.1); only pass `--host 0.0.0.0` when you explicitly intend to expose the editor on your network.
96
+
- Architecture, scripts, and troubleshooting tips live in [packages/editor/README.md](./packages/editor/README.md).
97
+
75
98
## Examples
76
99
77
100
The [**examples/**](./examples) folder contains basic projects initialized with the CLI. See [examples/README.md](./examples/README.md) for the full list and links to each example's README.
0 commit comments