Skip to content

Commit 321591c

Browse files
update commands' descriptions
1 parent 78fcb42 commit 321591c

File tree

21 files changed

+357
-117
lines changed

21 files changed

+357
-117
lines changed

packages/cli/README.md

Lines changed: 293 additions & 68 deletions
Large diffs are not rendered by default.

packages/cli/src/commands/deploy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ async function waitForStatusChange(
3131
}
3232

3333
export default class Deploy extends CloudInstanceCommand {
34-
static description = 'Deploys changes to the PowerSync management service. Cloud only.';
35-
static summary = 'Deploy sync rules and configuration changes.';
34+
static description =
35+
'Push local config (service.yaml, sync rules) to the linked PowerSync Cloud instance. Tests connections and sync rules first; requires a linked project. Cloud only.';
36+
static summary = 'Push local config to the linked Cloud instance (connections + sync rules).';
3637

3738
static flags = {
3839
...CloudInstanceCommand.flags

packages/cli/src/commands/destroy.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { Flags } from '@oclif/core';
33
import { CloudInstanceCommand } from '../command-types/CloudInstanceCommand.js';
44

55
export default class Destroy extends CloudInstanceCommand {
6-
static description = 'Destroys the linked PowerSync Cloud instance. Cloud only.';
7-
static summary = 'Destroy a PowerSync instance.';
6+
static description =
7+
'Permanently delete the linked PowerSync Cloud instance and its data. Requires --confirm=yes. Cloud only.';
8+
static summary = 'Permanently destroy the linked Cloud instance.';
89

910
static flags = {
1011
confirm: Flags.string({

packages/cli/src/commands/fetch/config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ import { fetchCloudConfig } from '../../api/cloud/fetch-cloud-config.js';
55
import { CloudInstanceCommand } from '../../command-types/CloudInstanceCommand.js';
66

77
export default class FetchConfig extends CloudInstanceCommand {
8-
static description = 'Fetches instance config from PowerSync Cloud. Requires a linked project. Cloud only.';
9-
static summary = 'Fetch config from cloud (output as yaml or json).';
8+
static description =
9+
'Retrieve the current instance config from PowerSync Cloud and print as YAML or JSON. Uses linked project or --instance-id, --org-id, --project-id. Cloud only.';
10+
static summary = 'Print linked Cloud instance config (YAML or JSON).';
1011

1112
static flags = {
1213
output: Flags.string({

packages/cli/src/commands/fetch/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Command } from '@oclif/core';
22

33
export default class Fetch extends Command {
4-
static description = 'Commands to list instances, fetch config, or get diagnostics status.';
5-
static summary = 'Fetch data from PowerSync (instances, config, status).';
4+
static description =
5+
'Subcommands: list Cloud instances in org/project (fetch instances), print instance config as YAML/JSON (fetch config), or show instance diagnostics (fetch status).';
6+
static summary = 'List instances, fetch config, or fetch instance diagnostics.';
67

78
async run(): Promise<void> {
89
await this.parse(Fetch);
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import {Command} from '@oclif/core'
1+
import { Command } from '@oclif/core';
22

33
export default class FetchInstances extends Command {
4-
static description = 'Lists instances in the current org/project. Cloud only.'
5-
static summary = 'List PowerSync Cloud instances.'
4+
static description =
5+
'List PowerSync Cloud instances in the current org and project. Use with a linked directory or pass --org-id and --project-id. Cloud only.';
6+
static summary = 'List Cloud instances in the current org/project.';
67

78
async run(): Promise<void> {
8-
this.log('fetch instances: not yet implemented')
9+
this.log('fetch instances: not yet implemented');
910
}
1011
}

packages/cli/src/commands/fetch/status.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ function formatDiagnosticsHuman(diagnostics: DiagnosticsResponse): string {
115115

116116
export default class FetchStatus extends SharedInstanceCommand {
117117
static description =
118-
'Fetches diagnostics (connections, sync rules state, etc.). Routes to Management service (Cloud) or linked instance (self-hosted).';
119-
static summary = 'Fetch diagnostics status for an instance.';
118+
'Fetch instance diagnostics: connection status, active and deploying sync rules, replication state. Output as human-readable, JSON, or YAML. Cloud and self-hosted.';
119+
static summary = 'Show instance diagnostics (connections, sync rules, replication).';
120120

121121
static flags = {
122122
output: Flags.string({
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import {Command} from '@oclif/core'
1+
import { Command } from '@oclif/core';
22

33
export default class Generate extends Command {
4-
static description = 'Commands to generate client-side schema or development tokens.'
5-
static summary = 'Generate artifacts (schema, token).'
4+
static description =
5+
'Generate client artifacts: schema (from instance schema + sync rules) or a development token for connecting clients. Cloud and self-hosted where supported.';
6+
static summary = 'Generate client schema or development token.';
67

78
async run(): Promise<void> {
8-
await this.parse(Generate)
9-
this.log('Use a subcommand: generate schema | generate token')
9+
await this.parse(Generate);
10+
this.log('Use a subcommand: generate schema | generate token');
1011
}
1112
}

packages/cli/src/commands/generate/schema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { SharedInstanceCommand } from '../../command-types/SharedInstanceCommand
1212

1313
export default class GenerateSchema extends SharedInstanceCommand {
1414
static description =
15-
'Generates client-side schema from instance schema and sync rules. Supported for Cloud and self-hosted.';
16-
static summary = 'Create client-side schemas.';
15+
'Generate a client-side schema file from the instance database schema and sync rules. Supports multiple output types (e.g. type, dart). Requires a linked instance. Cloud and self-hosted.';
16+
static summary = 'Generate client schema file from instance schema and sync rules.';
1717

1818
static flags = {
1919
output: Flags.string({

packages/cli/src/commands/generate/token.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ type TokenConfig = {
1313

1414
export default class GenerateToken extends SharedInstanceCommand {
1515
static description =
16-
'Generates a development token for connecting clients. Cloud and self-hosted (when shared secret is in config).';
17-
static summary = 'Create a client token for the PowerSync service.';
16+
'Generate a JWT for development clients to connect to PowerSync. Cloud: uses instance dev-token API (allow_temporary_tokens must be enabled). Self-hosted: signs with shared secret from config. Requires --subject; optional --expires-in-seconds.';
17+
static summary = 'Generate a development JWT for client connections.';
1818

1919
static flags = {
2020
subject: Flags.string({

0 commit comments

Comments
 (0)