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
Adds named targets to cli.yaml, so one project directory can point at several Cloud instances, for example staging and production.
powersync link cloud --target=<name> --instance-id=<id> stores a link under targets.<name>. The top-level fields stay the default. --create --target=<name> creates the instance and links it in one step.
Pick a target per command with --target=<name> or POWERSYNC_TARGET. --instance-id still overrides both.
I understand that --environment is the most common use case for multiple instances, but since "environment" doesn't actually mean anything here, and customers can have multiple instances in the same environment, I think we should call this flag --target or similar to make clearer that you're targeting a specific instance, not environment, with this. --alias could be another option.
I understand that --environment is the most common use case for multiple instances, but since "environment" doesn't actually mean anything here, and customers can have multiple instances in the same environment, I think we should call this flag --target or similar to make clearer that you're targeting a specific instance, not environment, with this. --alias could be another option.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds named targets to
cli.yaml, so one project directory can point at several Cloud instances, for example staging and production.powersync link cloud --target=<name> --instance-id=<id>stores a link undertargets.<name>. The top-level fields stay the default.--create --target=<name>creates the instance and links it in one step.--target=<name>orPOWERSYNC_TARGET.--instance-idstill overrides both.powersync fetch instanceslists the targets of each linked directory.Backwards compatible
A
cli.yamlwithout atargetskey works exactly as before. Older CLI versions ignore the key andPOWERSYNC_TARGETand use the top-level fields.Small fixes
--instance-idor--api-urldecide the context even whencli.yamllinks the other type.service.yamlnow suggestspowersync pull instance.cli.yamlare reported with the field name, for exampletargets.staging.instance_id in cli.yaml, instead of a flag name.AI disclosure
I used Claude to research the codebase and implement the change. I reviewed and tested it myself.