@ably/cli
Version:
Ably CLI for Pub/Sub, Chat and Spaces
19 lines (18 loc) • 736 B
JavaScript
import { Command, Flags } from "@oclif/core";
export default class SpacesCursors extends Command {
static description = "Commands for interacting with Cursors in Ably Spaces";
static examples = [
`$ ably spaces cursors set my-space --position '{"x": 100, "y": 200}' --data '{"color": "red"}'`,
`$ ably spaces cursors subscribe my-space`,
`$ ably spaces cursors get-all my-space`,
];
static flags = {
scope: Flags.string({
description: 'Space ID or comma-separated IDs for the scope (e.g., "my-space-1,my-space-2")',
required: true,
}),
};
async run() {
this.log("Use `ably spaces cursors set` or `ably spaces cursors subscribe`.");
}
}