recappi 0.1.56 → 0.1.58

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.
package/dist/index.js CHANGED
@@ -18532,45 +18532,24 @@ function contentTypeForPath(filePath) {
18532
18532
  const fromExtension = EXT_TO_CONTENT_TYPE[path2.extname(filePath).toLowerCase()];
18533
18533
  return fromExtension ? normalizeAudioType(fromExtension) : null;
18534
18534
  }
18535
- async function collectAudioFiles(inputPath) {
18535
+ async function planAudioFile(filePath, titleOverride) {
18536
18536
  let stat;
18537
18537
  try {
18538
- stat = await fs2.stat(inputPath);
18538
+ stat = await fs2.stat(filePath);
18539
18539
  } catch {
18540
- throw cliError("input.not_found", `Path not found: ${inputPath}`);
18541
- }
18542
- if (stat.isFile()) return [inputPath];
18543
- if (!stat.isDirectory()) {
18544
- throw cliError("input.not_file", `Path is not a file or directory: ${inputPath}`);
18540
+ throw cliError("input.not_found", `Path not found: ${filePath}`);
18545
18541
  }
18546
- const found = [];
18547
- await walk(inputPath, found);
18548
- found.sort((a, b) => a.localeCompare(b));
18549
- return found;
18550
- }
18551
- async function walk(dir, found) {
18552
- const entries = await fs2.readdir(dir, { withFileTypes: true });
18553
- entries.sort((a, b) => a.name.localeCompare(b.name));
18554
- for (const entry of entries) {
18555
- const fullPath = path2.join(dir, entry.name);
18556
- if (entry.isDirectory()) {
18557
- await walk(fullPath, found);
18558
- } else if (entry.isFile() && contentTypeForPath(fullPath)) {
18559
- found.push(fullPath);
18560
- }
18542
+ if (!stat.isFile()) {
18543
+ throw cliError("input.not_file", `Path is not a file: ${filePath}`, {
18544
+ hint: "Pass one or more audio files explicitly. For a folder, expand a shell glob such as recappi upload ./recordings/*.m4a."
18545
+ });
18561
18546
  }
18562
- }
18563
- async function planAudioFile(filePath, titleOverride) {
18564
18547
  const contentType = contentTypeForPath(filePath);
18565
18548
  if (!contentType) {
18566
18549
  throw cliError("input.unsupported_audio", `Unsupported audio file: ${filePath}`, {
18567
18550
  hint: "Supported extensions: wav, mp3, aiff, aac, m4a, ogg, flac."
18568
18551
  });
18569
18552
  }
18570
- const stat = await fs2.stat(filePath);
18571
- if (!stat.isFile()) {
18572
- throw cliError("input.not_file", `Path is not a file: ${filePath}`);
18573
- }
18574
18553
  const title = titleOverride ?? path2.basename(filePath, path2.extname(filePath));
18575
18554
  const durationMs = await readDurationMs(filePath, contentType);
18576
18555
  return {
@@ -19245,13 +19224,13 @@ var RecappiApiClient = class {
19245
19224
  });
19246
19225
  }
19247
19226
  async uploadPathBatch(opts) {
19248
- const files = await collectAudioFiles(opts.inputPath);
19227
+ const files = opts.inputPaths;
19249
19228
  if (files.length === 0) {
19250
19229
  throw cliError(
19251
- "input.unsupported_audio",
19252
- `No supported audio files found: ${opts.inputPath}`,
19230
+ "usage.invalid_argument",
19231
+ "Missing upload file path.",
19253
19232
  {
19254
- hint: "Supported extensions: wav, mp3, aiff, aac, m4a, ogg, flac."
19233
+ hint: "Pass one or more audio files, e.g. recappi upload talk.m4a notes.wav."
19255
19234
  }
19256
19235
  );
19257
19236
  }
@@ -19933,6 +19912,188 @@ function runMacOpen(args, deps) {
19933
19912
  });
19934
19913
  }
19935
19914
 
19915
+ // src/commandMetadata.ts
19916
+ var COMMON_TASKS = [
19917
+ { label: "Record audio + live captions", command: "recappi record --live" },
19918
+ { label: "Transcribe a local file", command: "recappi upload <file> --transcribe --wait" },
19919
+ { label: "Re-transcribe a recording", command: "recappi recordings retranscribe <recordingId> --wait" },
19920
+ { label: "List / find recordings", command: "recappi recordings list" },
19921
+ { label: "Read a transcript", command: "recappi transcript get <transcriptId>" },
19922
+ { label: "Download / open audio", command: "recappi audio <recordingId> --open" },
19923
+ { label: "Check a transcription job", command: "recappi jobs wait <jobId>" },
19924
+ { label: "Account \xB7 quota \xB7 usage", command: "recappi account status" },
19925
+ { label: "Sign in", command: "recappi auth login" },
19926
+ { label: "Diagnose auth / audio setup", command: "recappi doctor" }
19927
+ ];
19928
+ var COMMAND_METADATA = {
19929
+ "auth import-macos": {
19930
+ capabilities: ["Reuse the macOS app's signed-in session for the CLI"],
19931
+ examples: [
19932
+ { description: "Copy the macOS app session into CLI config", command: "recappi auth import-macos" }
19933
+ ],
19934
+ relatedCommands: ["auth login", "auth status"]
19935
+ },
19936
+ "auth login": {
19937
+ capabilities: ["Authenticate the CLI via device-code OAuth"],
19938
+ examples: [
19939
+ { description: "Start device-code sign-in", command: "recappi auth login" },
19940
+ { description: "Print the login URL without opening a browser", command: "recappi auth login --no-open" }
19941
+ ],
19942
+ relatedCommands: ["auth status", "auth import-macos"]
19943
+ },
19944
+ "auth logout": {
19945
+ capabilities: ["Sign the CLI out and clear stored token"],
19946
+ examples: [{ description: "Remove the local CLI token", command: "recappi auth logout" }],
19947
+ relatedCommands: ["auth status", "auth login"]
19948
+ },
19949
+ "auth status": {
19950
+ capabilities: ["Check whether the CLI is signed in, and as whom"],
19951
+ examples: [{ description: "Show sign-in status", command: "recappi auth status" }],
19952
+ relatedCommands: ["auth login", "doctor"]
19953
+ },
19954
+ "account status": {
19955
+ capabilities: ["Show account plan, minutes/storage quota, and usage"],
19956
+ examples: [{ description: "Show account, quota, and local state", command: "recappi account status" }],
19957
+ relatedCommands: ["auth status", "dashboard stats"]
19958
+ },
19959
+ doctor: {
19960
+ capabilities: ["Diagnose auth, cloud connectivity, local audio/TCC permissions"],
19961
+ examples: [{ description: "Check setup health", command: "recappi doctor" }],
19962
+ relatedCommands: ["auth status", "record"]
19963
+ },
19964
+ upload: {
19965
+ capabilities: [
19966
+ "Upload one or more local audio files",
19967
+ "Transcribe uploaded audio",
19968
+ "Wait for transcription to finish"
19969
+ ],
19970
+ examples: [
19971
+ {
19972
+ description: "Upload a file and wait for transcription",
19973
+ command: "recappi upload talk.m4a --transcribe --wait"
19974
+ },
19975
+ {
19976
+ description: "Upload several files at once",
19977
+ command: "recappi upload intro.m4a talk.wav qa.m4a --transcribe"
19978
+ },
19979
+ {
19980
+ description: "Upload a whole folder via shell glob",
19981
+ command: "recappi upload ./recordings/*.m4a --transcribe"
19982
+ },
19983
+ {
19984
+ description: "Transcribe with title and language hints",
19985
+ command: 'recappi upload talk.m4a --transcribe --language en --title "Team sync"'
19986
+ }
19987
+ ],
19988
+ relatedCommands: ["jobs wait", "recordings list", "transcript get"]
19989
+ },
19990
+ record: {
19991
+ capabilities: [
19992
+ "Record system audio and/or mic",
19993
+ "Live captions while recording",
19994
+ "Auto upload+transcribe+summarize on stop"
19995
+ ],
19996
+ examples: [
19997
+ { description: "Record with live captions", command: "recappi record --live" },
19998
+ { description: "Record a microphone-only voice note", command: 'recappi record --no-system-audio --title "Voice note"' },
19999
+ { description: "Record with live caption translation", command: "recappi record --live --translation-language en" }
20000
+ ],
20001
+ relatedCommands: ["recordings list", "transcript get"]
20002
+ },
20003
+ audio: {
20004
+ capabilities: ["Download audio", "Open in default player", "Reveal in Finder"],
20005
+ examples: [
20006
+ { description: "Download and open audio", command: "recappi audio <recordingId> --open" },
20007
+ { description: "Download audio and print the local path", command: "recappi audio <recordingId> --download" },
20008
+ { description: "Reveal downloaded audio in Finder", command: "recappi audio <recordingId> --reveal" }
20009
+ ],
20010
+ relatedCommands: ["recordings list", "recordings get"]
20011
+ },
20012
+ schema: {
20013
+ capabilities: ["Print the full machine-readable CLI contract for agents"],
20014
+ examples: [
20015
+ { description: "Read the full machine-readable command contract", command: "recappi schema --json --compact" }
20016
+ ]
20017
+ },
20018
+ "dashboard stats": {
20019
+ capabilities: ["Fetch aggregate dashboard counters/stats"],
20020
+ examples: [{ description: "Fetch dashboard counters", command: "recappi dashboard stats --json --compact" }],
20021
+ relatedCommands: ["account status", "recordings list"]
20022
+ },
20023
+ "recordings get": {
20024
+ capabilities: ["Fetch one recording's metadata and status by id"],
20025
+ examples: [{ description: "Fetch one recording", command: "recappi recordings get <recordingId>" }],
20026
+ relatedCommands: ["recordings list", "transcript get", "audio"]
20027
+ },
20028
+ "recordings list": {
20029
+ capabilities: ["List recent recordings", "Search recordings and transcripts", "Find a recordingId"],
20030
+ examples: [
20031
+ { description: "List recent recordings", command: "recappi recordings list" },
20032
+ { description: "Search recordings and transcripts", command: "recappi recordings list --search <query>" }
20033
+ ],
20034
+ relatedCommands: ["recordings get", "audio", "transcript get"]
20035
+ },
20036
+ "recordings retranscribe": {
20037
+ capabilities: ["Re-transcribe an existing recording", "Re-transcribe with new language/prompt/scene/model"],
20038
+ examples: [
20039
+ {
20040
+ description: "Start a fresh transcription for an existing cloud recording",
20041
+ command: "recappi recordings retranscribe <recordingId> --wait"
20042
+ },
20043
+ {
20044
+ description: "Re-transcribe with language and prompt hints",
20045
+ command: 'recappi recordings retranscribe <recordingId> --language en --prompt "medical terms" --wait'
20046
+ }
20047
+ ],
20048
+ relatedCommands: ["jobs wait", "transcript get"]
20049
+ },
20050
+ "transcript get": {
20051
+ capabilities: ["Fetch a finished transcript by id"],
20052
+ examples: [{ description: "Fetch an existing transcript", command: "recappi transcript get <transcriptId>" }],
20053
+ relatedCommands: ["recordings get", "jobs wait"]
20054
+ },
20055
+ "jobs list": {
20056
+ capabilities: ["List transcription jobs", "Filter by status"],
20057
+ examples: [
20058
+ { description: "List active transcription jobs", command: "recappi jobs list --status active" },
20059
+ { description: "List recent jobs across statuses", command: "recappi jobs list --status all --limit 20" }
20060
+ ],
20061
+ relatedCommands: ["jobs wait", "recordings retranscribe"]
20062
+ },
20063
+ "jobs wait": {
20064
+ capabilities: ["Block until a transcription job reaches a terminal state"],
20065
+ examples: [
20066
+ { description: "Wait for a transcription job", command: "recappi jobs wait <jobId>" }
20067
+ ],
20068
+ relatedCommands: ["jobs list", "transcript get"]
20069
+ }
20070
+ };
20071
+ function commonTasksHelpText() {
20072
+ return [
20073
+ "Common tasks:",
20074
+ ...COMMON_TASKS.map((task) => ` ${task.label.padEnd(30)} ${task.command}`)
20075
+ ].join("\n");
20076
+ }
20077
+ function commandMetadataHelpText(commandName) {
20078
+ const metadata = COMMAND_METADATA[commandName];
20079
+ if (!metadata) return "";
20080
+ const lines = [];
20081
+ if (metadata.examples.length > 0) {
20082
+ lines.push("Examples:");
20083
+ for (const example of metadata.examples) {
20084
+ lines.push(` ${example.command}`);
20085
+ lines.push(` ${example.description}`);
20086
+ }
20087
+ }
20088
+ if (metadata.relatedCommands && metadata.relatedCommands.length > 0) {
20089
+ lines.push("Related:");
20090
+ lines.push(` ${metadata.relatedCommands.join(" \xB7 ")}`);
20091
+ }
20092
+ return lines.length > 0 ? `
20093
+ ${lines.join("\n")}
20094
+ ` : "";
20095
+ }
20096
+
19936
20097
  // src/render.ts
19937
20098
  function createHumanProgressState(interactive) {
19938
20099
  return {
@@ -20289,6 +20450,19 @@ Next:
20289
20450
  const summary = typeof entry.summary === "string" ? ` \u2014 ${entry.summary}` : "";
20290
20451
  opts.stdout(` ${entry.name}${summary}
20291
20452
  `);
20453
+ if (Array.isArray(entry.capabilities) && entry.capabilities.length > 0) {
20454
+ opts.stdout(` capabilities: ${entry.capabilities.join(", ")}
20455
+ `);
20456
+ }
20457
+ if (Array.isArray(entry.examples) && entry.examples.length > 0) {
20458
+ const first = entry.examples.find(
20459
+ (example) => isRecord4(example) && typeof example.command === "string"
20460
+ );
20461
+ if (isRecord4(first) && typeof first.command === "string") {
20462
+ opts.stdout(` example: ${first.command}
20463
+ `);
20464
+ }
20465
+ }
20292
20466
  }
20293
20467
  const errorCount = Array.isArray(data.errorCodes) ? data.errorCodes.length : 0;
20294
20468
  opts.stdout(`
@@ -20556,6 +20730,7 @@ var COMMON_OPTION_LONGS = /* @__PURE__ */ new Set([
20556
20730
  "--human",
20557
20731
  "--fields",
20558
20732
  "--compact",
20733
+ "--verbose",
20559
20734
  "--origin"
20560
20735
  ]);
20561
20736
  var EXIT_CODE_LEGEND = {
@@ -20594,11 +20769,18 @@ function walkCommands(command, path6, out) {
20594
20769
  }
20595
20770
  function leafCommandDoc(command, fullName) {
20596
20771
  const dataSchema = COMMAND_DATA_SCHEMAS[fullName];
20772
+ const metadata = COMMAND_METADATA[fullName] ?? {
20773
+ capabilities: [],
20774
+ examples: []
20775
+ };
20597
20776
  return {
20598
20777
  name: fullName,
20599
20778
  summary: command.description(),
20779
+ capabilities: metadata.capabilities,
20600
20780
  arguments: argumentDocs(command),
20601
20781
  options: optionDocs(command).filter((opt) => !isCommonOption(opt)),
20782
+ examples: metadata.examples,
20783
+ ...metadata.relatedCommands ? { relatedCommands: metadata.relatedCommands } : {},
20602
20784
  ...dataSchema ? { data: toJsonSchema(dataSchema) } : {}
20603
20785
  };
20604
20786
  }
@@ -20614,6 +20796,7 @@ function argumentDocs(command) {
20614
20796
  return args.map((arg) => ({
20615
20797
  name: arg.name(),
20616
20798
  required: arg.required === true,
20799
+ ...arg.variadic === true ? { variadic: true } : {},
20617
20800
  ...arg.description ? { description: arg.description } : {}
20618
20801
  }));
20619
20802
  }
@@ -21860,7 +22043,7 @@ async function uploadRecordedSessionAfterStop(client, data, opts = {}) {
21860
22043
  if (!artifact.audioPath) return data;
21861
22044
  try {
21862
22045
  const upload = await client.uploadPathBatch({
21863
- inputPath: artifact.audioPath,
22046
+ inputPaths: [artifact.audioPath],
21864
22047
  transcribe: true,
21865
22048
  wait: false,
21866
22049
  ...opts.title ? { title: opts.title } : {},
@@ -21998,7 +22181,7 @@ async function runCli(deps = {}) {
21998
22181
  throw cliError("input.not_found", "No local audio file is available to transcribe.");
21999
22182
  }
22000
22183
  const data = await client.uploadPathBatch({
22001
- inputPath: artifact.audioPath,
22184
+ inputPaths: [artifact.audioPath],
22002
22185
  transcribe: true,
22003
22186
  wait: false,
22004
22187
  onEvent
@@ -22077,7 +22260,7 @@ async function runCli(deps = {}) {
22077
22260
  }
22078
22261
  if (parsed.kind === "upload") {
22079
22262
  const data = await client.uploadPathBatch({
22080
- inputPath: parsed.path,
22263
+ inputPaths: parsed.paths,
22081
22264
  title: parsed.title,
22082
22265
  transcribe: parsed.transcribe,
22083
22266
  wait: parsed.wait,
@@ -22370,15 +22553,19 @@ function buildProgram({ onHelpOutput, onSelect }) {
22370
22553
  }).addHelpText(
22371
22554
  "after",
22372
22555
  `
22556
+ ${commonTasksHelpText()}
22557
+
22373
22558
  Agent mode:
22374
22559
  Non-TTY stdout defaults to JSON. Progress and human diagnostics go to stderr.
22375
22560
  Use --json for a single envelope or --jsonl for a terminal event stream.
22561
+ Use recappi schema --json --compact to probe commands, capabilities, examples,
22562
+ related commands, output schemas, error codes, and JSONL events.
22376
22563
  `
22377
22564
  );
22378
22565
  addCommonOptions(program);
22379
- const auth = program.command("auth").description("Authentication commands");
22566
+ const auth = program.command("auth").description("Sign in/out and check Recappi Cloud auth");
22380
22567
  addCommonOptions(auth);
22381
- const authLogin = auth.command("login").description("Sign in to Recappi Cloud with a device code").option("--no-open", "print the device URL without opening a browser");
22568
+ const authLogin = auth.command("login").description("Sign in to Recappi Cloud with a device code").option("--no-open", "print the device URL without opening a browser").addHelpText("after", commandMetadataHelpText("auth login"));
22382
22569
  addCommonOptions(authLogin);
22383
22570
  authLogin.action((opts, command) => {
22384
22571
  onSelect({
@@ -22388,7 +22575,7 @@ Agent mode:
22388
22575
  ...opts.open === false ? { noOpen: true } : {}
22389
22576
  });
22390
22577
  });
22391
- const authLogout = auth.command("logout").description("Remove the Recappi CLI sign-in token");
22578
+ const authLogout = auth.command("logout").description("Remove the Recappi CLI sign-in token").addHelpText("after", commandMetadataHelpText("auth logout"));
22392
22579
  addCommonOptions(authLogout);
22393
22580
  authLogout.action((_options, command) => {
22394
22581
  onSelect({
@@ -22397,7 +22584,7 @@ Agent mode:
22397
22584
  commandName: "auth logout"
22398
22585
  });
22399
22586
  });
22400
- const authImportMacOS = auth.command("import-macos").description("Copy the Recappi Mini macOS app session into CLI config");
22587
+ const authImportMacOS = auth.command("import-macos").description("Copy the Recappi Mini macOS app session into CLI config").addHelpText("after", commandMetadataHelpText("auth import-macos"));
22401
22588
  addCommonOptions(authImportMacOS);
22402
22589
  authImportMacOS.action((_options, command) => {
22403
22590
  onSelect({
@@ -22406,7 +22593,7 @@ Agent mode:
22406
22593
  commandName: "auth import-macos"
22407
22594
  });
22408
22595
  });
22409
- const authStatus = auth.command("status").description("Show Recappi Cloud sign-in status");
22596
+ const authStatus = auth.command("status").description("Show Recappi Cloud sign-in status").addHelpText("after", commandMetadataHelpText("auth status"));
22410
22597
  addCommonOptions(authStatus);
22411
22598
  authStatus.action((_options, command) => {
22412
22599
  onSelect({
@@ -22415,7 +22602,7 @@ Agent mode:
22415
22602
  commandName: "auth status"
22416
22603
  });
22417
22604
  });
22418
- const doctor = program.command("doctor").description("Check Recappi auth, cloud connectivity, and local audio support");
22605
+ const doctor = program.command("doctor").description("Check Recappi auth, cloud connectivity, and local audio support").addHelpText("after", commandMetadataHelpText("doctor"));
22419
22606
  addCommonOptions(doctor);
22420
22607
  doctor.action((_options, command) => {
22421
22608
  onSelect({
@@ -22424,9 +22611,9 @@ Agent mode:
22424
22611
  commandName: "doctor"
22425
22612
  });
22426
22613
  });
22427
- const account = program.command("account").description("Account and quota commands");
22614
+ const account = program.command("account").description("Show account status, quota, and usage");
22428
22615
  addCommonOptions(account);
22429
- const accountStatus = account.command("status").description("Show account, quota, and local state");
22616
+ const accountStatus = account.command("status").description("Show account, quota, and local state").addHelpText("after", commandMetadataHelpText("account status"));
22430
22617
  addCommonOptions(accountStatus);
22431
22618
  accountStatus.action((_options, command) => {
22432
22619
  onSelect({
@@ -22435,14 +22622,14 @@ Agent mode:
22435
22622
  commandName: "account status"
22436
22623
  });
22437
22624
  });
22438
- const upload = program.command("upload <file-or-dir>").description("Upload an audio file or directory to Recappi Cloud").option("--title <title>", "recording title", parseStringOption("--title")).option("--transcribe", "start transcription after upload").option("--wait", "wait for the transcription job to reach a terminal state").option("--language <lang>", "transcription language hint", parseStringOption("--language")).option("--provider <name>", "transcription provider", parseStringOption("--provider")).option("--prompt <text>", "transcription prompt/context", parseStringOption("--prompt")).option("--force", "force upload if a conflict is retryable");
22625
+ const upload = program.command("upload <files...>").description("Upload one or more local audio files (optionally transcribe)").option("--title <title>", "recording title", parseStringOption("--title")).option("--transcribe", "start transcription after upload").option("--wait", "wait for the transcription job to reach a terminal state").option("--language <lang>", "transcription language hint", parseStringOption("--language")).option("--provider <name>", "transcription provider", parseStringOption("--provider")).option("--prompt <text>", "transcription prompt/context", parseStringOption("--prompt")).option("--force", "force upload if a conflict is retryable").addHelpText("after", commandMetadataHelpText("upload"));
22439
22626
  addCommonOptions(upload);
22440
- upload.action((inputPath, opts, command) => {
22627
+ upload.action((inputPaths, opts, command) => {
22441
22628
  onSelect({
22442
22629
  kind: "upload",
22443
22630
  options: collectGlobalOptions(command),
22444
22631
  commandName: "upload",
22445
- path: inputPath,
22632
+ paths: inputPaths,
22446
22633
  ...typeof opts.title === "string" ? { title: opts.title } : {},
22447
22634
  ...opts.transcribe === true ? { transcribe: true } : {},
22448
22635
  ...opts.wait === true ? { wait: true, transcribe: true } : {},
@@ -22452,7 +22639,7 @@ Agent mode:
22452
22639
  ...opts.force === true ? { force: true } : {}
22453
22640
  });
22454
22641
  });
22455
- const record2 = program.command("record").description("Start a Recappi Mini sidecar recording").option("--title <title>", "recording title", parseStringOption("--title")).option("--live", "show live captions while recording").option("--no-system-audio", "record microphone only").option("--no-microphone", "record system audio only").option(
22642
+ const record2 = program.command("record").description("Record system/mic audio via the Recappi Mini sidecar").option("--title <title>", "recording title", parseStringOption("--title")).option("--live", "show live captions while recording").option("--no-system-audio", "record microphone only").option("--no-microphone", "record system audio only").option(
22456
22643
  "--translation-language <lang>",
22457
22644
  "live caption translation language",
22458
22645
  parseStringOption("--translation-language")
@@ -22464,7 +22651,7 @@ Agent mode:
22464
22651
  "--sidecar-command <path>",
22465
22652
  "Recappi Mini sidecar executable",
22466
22653
  parseStringOption("--sidecar-command")
22467
- );
22654
+ ).addHelpText("after", commandMetadataHelpText("record"));
22468
22655
  addCommonOptions(record2);
22469
22656
  record2.action((opts, command) => {
22470
22657
  if (opts.systemAudio === false && opts.microphone === false) {
@@ -22485,11 +22672,11 @@ Agent mode:
22485
22672
  ...typeof opts.sidecarCommand === "string" ? { sidecarCommand: opts.sidecarCommand } : {}
22486
22673
  });
22487
22674
  });
22488
- const audio = program.command("audio").description("Download or open a recording audio file").argument("<recording-id>", "recording id").option("--download", "download audio and print the local path").option("--open", "download if needed, then open the audio file").option("--reveal", "download if needed, then reveal the audio file in Finder").option(
22675
+ const audio = program.command("audio").description("Download, open, or reveal a recording's audio file").argument("<recording-id>", "recording id").option("--download", "download audio and print the local path").option("--open", "download if needed, then open the audio file").option("--reveal", "download if needed, then reveal the audio file in Finder").option(
22489
22676
  "--output-dir <dir>",
22490
22677
  "directory for downloaded audio",
22491
22678
  parseStringOption("--output-dir")
22492
- );
22679
+ ).addHelpText("after", commandMetadataHelpText("audio"));
22493
22680
  addCommonOptions(audio);
22494
22681
  audio.action((recordingId, opts, command) => {
22495
22682
  onSelect({
@@ -22501,7 +22688,7 @@ Agent mode:
22501
22688
  ...opts.outputDir ? { outputDir: opts.outputDir } : {}
22502
22689
  });
22503
22690
  });
22504
- const schema = program.command("schema").description("Print the machine-readable CLI contract (commands, error codes, JSON Schemas)");
22691
+ const schema = program.command("schema").description("Print the machine-readable CLI contract (commands, error codes, JSON Schemas)").addHelpText("after", commandMetadataHelpText("schema"));
22505
22692
  addCommonOptions(schema);
22506
22693
  schema.action((_options, command) => {
22507
22694
  onSelect({
@@ -22511,9 +22698,9 @@ Agent mode:
22511
22698
  document: buildSchemaDocument(program)
22512
22699
  });
22513
22700
  });
22514
- const dashboard = program.command("dashboard").description("Dashboard data commands");
22701
+ const dashboard = program.command("dashboard").description("Fetch dashboard counters and stats");
22515
22702
  addCommonOptions(dashboard);
22516
- const dashboardStats = dashboard.command("stats").description("Fetch dashboard counters");
22703
+ const dashboardStats = dashboard.command("stats").description("Fetch dashboard counters").addHelpText("after", commandMetadataHelpText("dashboard stats"));
22517
22704
  addCommonOptions(dashboardStats);
22518
22705
  dashboardStats.action((_options, command) => {
22519
22706
  onSelect({
@@ -22522,9 +22709,9 @@ Agent mode:
22522
22709
  commandName: "dashboard stats"
22523
22710
  });
22524
22711
  });
22525
- const recordings = program.command("recordings").description("Recording commands");
22712
+ const recordings = program.command("recordings").description("List, fetch, and re-transcribe recordings");
22526
22713
  addCommonOptions(recordings);
22527
- const recordingsList = recordings.command("list").description("List recent recordings").option("--limit <n>", "number of recordings to show", parseLimitOption("--limit", 1, 100), 20).option("--cursor <cursor>", "pagination cursor", parseStringOption("--cursor")).option("--search <query>", "search recordings and transcripts", parseStringOption("--search"));
22714
+ const recordingsList = recordings.command("list").description("List recent recordings").option("--limit <n>", "number of recordings to show", parseLimitOption("--limit", 1, 100), 20).option("--cursor <cursor>", "pagination cursor", parseStringOption("--cursor")).option("--search <query>", "search recordings and transcripts", parseStringOption("--search")).addHelpText("after", commandMetadataHelpText("recordings list"));
22528
22715
  addCommonOptions(recordingsList);
22529
22716
  recordingsList.action((_options, command) => {
22530
22717
  const opts = command.opts();
@@ -22537,7 +22724,7 @@ Agent mode:
22537
22724
  ...typeof opts.search === "string" ? { search: opts.search } : {}
22538
22725
  });
22539
22726
  });
22540
- const recordingsGet = recordings.command("get <recordingId>").description("Fetch a recording by recording id");
22727
+ const recordingsGet = recordings.command("get <recordingId>").description("Fetch a recording by recording id").addHelpText("after", commandMetadataHelpText("recordings get"));
22541
22728
  addCommonOptions(recordingsGet);
22542
22729
  recordingsGet.action(
22543
22730
  (recordingId, _options, command) => {
@@ -22549,7 +22736,7 @@ Agent mode:
22549
22736
  });
22550
22737
  }
22551
22738
  );
22552
- const recordingsRetranscribe = recordings.command("retranscribe <recordingId>").description("Start a fresh transcription job for an existing recording").option("--language <lang>", "transcription language hint", parseStringOption("--language")).option("--provider <name>", "transcription provider", parseStringOption("--provider")).option("--model <name>", "transcription model", parseStringOption("--model")).option("--prompt <text>", "custom transcription prompt/context", parseStringOption("--prompt")).option("--scene <id>", "transcription scene preset", parseStringOption("--scene")).option("--wait", "wait for the transcription job to reach a terminal state");
22739
+ const recordingsRetranscribe = recordings.command("retranscribe <recordingId>").description("Start a fresh transcription job for an existing recording").option("--language <lang>", "transcription language hint", parseStringOption("--language")).option("--provider <name>", "transcription provider", parseStringOption("--provider")).option("--model <name>", "transcription model", parseStringOption("--model")).option("--prompt <text>", "custom transcription prompt/context", parseStringOption("--prompt")).option("--scene <id>", "transcription scene preset", parseStringOption("--scene")).option("--wait", "wait for the transcription job to reach a terminal state").addHelpText("after", commandMetadataHelpText("recordings retranscribe"));
22553
22740
  addCommonOptions(recordingsRetranscribe);
22554
22741
  recordingsRetranscribe.action(
22555
22742
  (recordingId, _options, command) => {
@@ -22568,9 +22755,16 @@ Agent mode:
22568
22755
  });
22569
22756
  }
22570
22757
  );
22571
- const transcript = program.command("transcript").description("Transcript commands");
22758
+ const transcript = program.command("transcript").description("Read transcripts (create via upload --transcribe or recordings retranscribe)").addHelpText(
22759
+ "after",
22760
+ `
22761
+ To create a transcript (not here):
22762
+ Local audio file recappi upload <file> --transcribe --wait
22763
+ Existing cloud recording recappi recordings retranscribe <recordingId> --wait
22764
+ `
22765
+ );
22572
22766
  addCommonOptions(transcript);
22573
- const transcriptGet = transcript.command("get <transcriptId>").description("Fetch a transcript by transcript id");
22767
+ const transcriptGet = transcript.command("get <transcriptId>").description("Fetch a transcript by transcript id").addHelpText("after", commandMetadataHelpText("transcript get"));
22574
22768
  addCommonOptions(transcriptGet);
22575
22769
  transcriptGet.action(
22576
22770
  (transcriptId, _options, command) => {
@@ -22582,7 +22776,7 @@ Agent mode:
22582
22776
  });
22583
22777
  }
22584
22778
  );
22585
- const jobs = program.command("jobs").description("Transcription job commands");
22779
+ const jobs = program.command("jobs").description("List transcription jobs and wait for one to finish");
22586
22780
  addCommonOptions(jobs);
22587
22781
  const jobsList = jobs.command("list").description("List recent transcription jobs").option(
22588
22782
  "--status <status>",
@@ -22590,6 +22784,7 @@ Agent mode:
22590
22784
  parseJobStatusOption,
22591
22785
  "all"
22592
22786
  ).option("--limit <n>", "number of jobs to show", parseLimitOption("--limit", 1, 50), 10);
22787
+ jobsList.addHelpText("after", commandMetadataHelpText("jobs list"));
22593
22788
  addCommonOptions(jobsList);
22594
22789
  jobsList.action((_options, command) => {
22595
22790
  const opts = command.opts();
@@ -22601,7 +22796,7 @@ Agent mode:
22601
22796
  limit: opts.limit ?? 10
22602
22797
  });
22603
22798
  });
22604
- const jobsWait = jobs.command("wait <jobId>").description("Wait for an existing transcription job to finish");
22799
+ const jobsWait = jobs.command("wait <jobId>").description("Wait for an existing transcription job to finish").addHelpText("after", commandMetadataHelpText("jobs wait"));
22605
22800
  addCommonOptions(jobsWait);
22606
22801
  jobsWait.action((jobId, _options, command) => {
22607
22802
  onSelect({