@clickminded/coauthor-cli 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,3 +9,4 @@ export type CommandContext = {
9
9
  token: string;
10
10
  };
11
11
  export declare function runCommand(input: ParsedCommand, context: CommandContext): Promise<CommandResult>;
12
+ export declare function helpResult(): CommandResult;
package/dist/commands.js CHANGED
@@ -648,7 +648,7 @@ function resourceCommandName(resource) {
648
648
  return 'operation';
649
649
  return resource;
650
650
  }
651
- function helpResult() {
651
+ export function helpResult() {
652
652
  return {
653
653
  ok: true,
654
654
  message: [
package/dist/index.js CHANGED
@@ -3,12 +3,16 @@ import { realpathSync } from 'node:fs';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import { AgentHttpError, AgentClient } from './client.js';
5
5
  import { resolveRuntimeConfig } from './config.js';
6
- import { runCommand } from './commands.js';
6
+ import { helpResult, runCommand } from './commands.js';
7
7
  import { renderError, renderResult } from './output.js';
8
8
  import { parseCliArgs } from './parser.js';
9
9
  export async function main(argv = process.argv.slice(2)) {
10
10
  try {
11
11
  const parsed = parseCliArgs(argv);
12
+ if (parsed.globals.help) {
13
+ process.stdout.write(renderResult(helpResult(), parsed.globals.json));
14
+ return 0;
15
+ }
12
16
  const runtimeConfig = await resolveRuntimeConfig({
13
17
  baseUrlOverride: parsed.globals.baseUrl,
14
18
  tokenOverride: parsed.globals.token,
package/dist/parser.d.ts CHANGED
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import type { JsonValue } from './client.js';
3
3
  export type GlobalOptions = {
4
4
  json: boolean;
5
+ help: boolean;
5
6
  baseUrl?: string;
6
7
  token?: string;
7
8
  };
@@ -16,6 +17,7 @@ export declare const commandInputSchema: z.ZodObject<{
16
17
  positionals: z.ZodArray<z.ZodString>;
17
18
  globals: z.ZodObject<{
18
19
  json: z.ZodBoolean;
20
+ help: z.ZodBoolean;
19
21
  baseUrl: z.ZodOptional<z.ZodString>;
20
22
  token: z.ZodOptional<z.ZodString>;
21
23
  }, z.core.$strip>;
package/dist/parser.js CHANGED
@@ -5,6 +5,7 @@ export const commandInputSchema = z.object({
5
5
  positionals: z.array(z.string()),
6
6
  globals: z.object({
7
7
  json: z.boolean(),
8
+ help: z.boolean(),
8
9
  baseUrl: z.string().url().optional(),
9
10
  token: z.string().min(1).optional(),
10
11
  }),
@@ -17,6 +18,7 @@ export function parseCliArgs(argv) {
17
18
  strict: false,
18
19
  options: {
19
20
  json: { type: 'boolean', default: false },
21
+ help: { type: 'boolean', short: 'h', default: false },
20
22
  'base-url': { type: 'string' },
21
23
  token: { type: 'string' },
22
24
  email: { type: 'string' },
@@ -61,6 +63,7 @@ export function parseCliArgs(argv) {
61
63
  positionals: positionals.slice(command.length),
62
64
  globals: {
63
65
  json: Boolean(parsed.values.json),
66
+ help: Boolean(parsed.values.help),
64
67
  baseUrl: stringValue(parsed.values['base-url']),
65
68
  token: stringValue(parsed.values.token),
66
69
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickminded/coauthor-cli",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "coauthor": "dist/index.js",
@@ -9,6 +9,8 @@ This skill guides agent use of the CoAuthor CLI.
9
9
 
10
10
  - Prefer `coauthor` CLI commands for CoAuthor project and workflow work.
11
11
  - Do not drive browser routes, hand-written `curl`, or direct database edits when a CLI command covers the task.
12
+ - Use the configured production base URL by default. Do not point the CLI at `localhost` or start a local dev server unless the user explicitly asks to test local changes.
13
+ - For local development only, pass an explicit one-off override such as `--base-url http://localhost:3000` or `COAUTHOR_BASE_URL=http://localhost:3000`.
12
14
  - Use `--json` for machine-readable output and parse fields from that output.
13
15
  - Use `--wait` for commands that start asynchronous work when the user expects the operation to finish.
14
16
  - Let the default bounded briefing review run before outline/draft generation. Use `--briefing-mode strict` when the user explicitly wants a stronger brief gate, and answer or relay `data.clarification_questions` if the CLI returns `status: "needs_clarification"`.
@@ -9,6 +9,8 @@ This skill guides agent use of the CoAuthor CLI.
9
9
 
10
10
  - Prefer `coauthor` CLI commands for CoAuthor project and workflow work.
11
11
  - Do not drive browser routes, hand-written `curl`, or direct database edits when a CLI command covers the task.
12
+ - Use the configured production base URL by default. Do not point the CLI at `localhost` or start a local dev server unless the user explicitly asks to test local changes.
13
+ - For local development only, pass an explicit one-off override such as `--base-url http://localhost:3000` or `COAUTHOR_BASE_URL=http://localhost:3000`.
12
14
  - Use `--json` for machine-readable output and parse fields from that output.
13
15
  - Use `--wait` for commands that start asynchronous work when the user expects the operation to finish.
14
16
  - Let the default bounded briefing review run before outline/draft generation. Use `--briefing-mode strict` when the user explicitly wants a stronger brief gate, and answer or relay `data.clarification_questions` if the CLI returns `status: "needs_clarification"`.
@@ -6,6 +6,8 @@ alwaysApply: true
6
6
  # CoAuthor CLI
7
7
 
8
8
  - Prefer the `coauthor` CLI for CoAuthor project/workflow operations instead of browser routes, hand-written `curl`, or direct database access.
9
+ - Use the configured production base URL by default. Do not point the CLI at `localhost` or start a local dev server unless the user explicitly asks to test local changes.
10
+ - For local development only, pass an explicit one-off override such as `--base-url http://localhost:3000` or `COAUTHOR_BASE_URL=http://localhost:3000`.
9
11
  - Use `--json` for agent-readable command output.
10
12
  - Use `--wait` when starting asynchronous work and the user expects a completed result.
11
13
  - Let the default bounded briefing review run before outline/draft generation. Use `--briefing-mode strict` for a stronger brief gate, and answer or relay `data.clarification_questions` if the CLI returns `status: "needs_clarification"`.