@plaud-ai/cli 0.3.9 → 0.3.11

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.
Files changed (2) hide show
  1. package/dist/index.js +42 -23
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -20379,7 +20379,7 @@ function isNewer(current, latest) {
20379
20379
  return false;
20380
20380
  }
20381
20381
  var updateCommand = new Command("update").description("Check npm for the latest Plaud CLI and print the upgrade command").action(async () => {
20382
- const current = "0.3.9";
20382
+ const current = "0.3.11";
20383
20383
  const spinner = ora("Checking npm for latest version...").start();
20384
20384
  const latest = await fetchLatestVersion();
20385
20385
  spinner.stop();
@@ -20434,10 +20434,10 @@ async function checkForUpdate(current) {
20434
20434
  return isNewer(current, latest) ? latest : null;
20435
20435
  }
20436
20436
  var versionCommand = new Command2("version").description("Show CLI version information").action(async () => {
20437
- const current = "0.3.9";
20437
+ const current = "0.3.11";
20438
20438
  console.log(`plaud ${current}`);
20439
- if ("e0fb5d6") console.log(`commit ${"e0fb5d6"}`);
20440
- if ("2026-08-18T03:07:34.503Z") console.log(`built ${"2026-08-18T03:07:34.503Z"}`);
20439
+ if ("ee2ff6d") console.log(`commit ${"ee2ff6d"}`);
20440
+ if ("2026-08-20T09:19:25.840Z") console.log(`built ${"2026-08-20T09:19:25.840Z"}`);
20441
20441
  if (current === "unknown") return;
20442
20442
  const newer = await checkForUpdate(current);
20443
20443
  if (newer) {
@@ -21350,12 +21350,28 @@ import { Command as Command9 } from "commander";
21350
21350
  import chalk10 from "chalk";
21351
21351
  import ora7 from "ora";
21352
21352
  import { writeFile as writeFile4 } from "fs/promises";
21353
- var BLOCKS = ["transaction", "transaction_polish", "outline"];
21353
+ var BLOCKS = ["transaction", "transaction_polish", "outline", "mark_memo"];
21354
+ function renderBlock(block, content) {
21355
+ let parsed;
21356
+ try {
21357
+ parsed = JSON.parse(content);
21358
+ } catch {
21359
+ return content;
21360
+ }
21361
+ if (block === "mark_memo" || !Array.isArray(parsed)) return JSON.stringify(parsed, null, 2);
21362
+ return parsed.map((seg) => {
21363
+ const hasStart = typeof seg?.start_time === "number";
21364
+ const hasEnd = typeof seg?.end_time === "number";
21365
+ const time = hasStart ? hasEnd ? `[${formatTime(seg.start_time)} - ${formatTime(seg.end_time)}]` : `[${formatTime(seg.start_time)}]` : "";
21366
+ const speaker = seg?.speaker ? `${seg.speaker}: ` : "";
21367
+ return [time, `${speaker}${seg?.content ?? seg?.topic ?? ""}`].filter(Boolean).join(" ");
21368
+ }).join("\n");
21369
+ }
21354
21370
  var transcriptCommand = new Command9("transcript").description("Get the transcript for a Plaud recording").argument("<file_id>", "The file ID to retrieve transcript for").option("-o, --output <file>", "Save transcript to a file").option(
21355
21371
  "--block <block>",
21356
21372
  `Which block to fetch: ${BLOCKS.join(" | ")} (default: transaction)`
21357
- ).option("--polished", "Shortcut for --block transaction_polish (AI-cleaned transcript)").action(async (fileId, opts) => {
21358
- const block = opts.polished ? "transaction_polish" : opts.block ?? "transaction";
21373
+ ).option("--polished", "Shortcut for --block transaction_polish (AI-cleaned transcript)").option("--highlights", "Shortcut for --block mark_memo (moments flagged with the device's highlight button)").action(async (fileId, opts) => {
21374
+ const block = opts.polished ? "transaction_polish" : opts.highlights ? "mark_memo" : opts.block ?? "transaction";
21359
21375
  if (!BLOCKS.includes(block)) {
21360
21376
  printError("BAD_ARGS", `Unknown --block "${block}". Choose one of: ${BLOCKS.join(", ")}.`);
21361
21377
  await telemetryExit(ExitCode.ERROR);
@@ -21369,7 +21385,11 @@ var transcriptCommand = new Command9("transcript").description("Get the transcri
21369
21385
  if (!source) {
21370
21386
  spinner.stop();
21371
21387
  const available = sourceList.map((s) => s.data_type).filter(Boolean).join(", ") || "(none)";
21372
- console.log(chalk10.yellow(`No "${block}" transcript for this recording. Available: ${available}.`));
21388
+ console.log(
21389
+ chalk10.yellow(
21390
+ block === "mark_memo" ? `No highlights (mark_memo) on this recording \u2014 the highlight button was not pressed while recording. Available blocks: ${available}.` : `No "${block}" transcript for this recording. Available: ${available}.`
21391
+ )
21392
+ );
21373
21393
  return;
21374
21394
  }
21375
21395
  const content = await loadBlockContent(source);
@@ -21377,24 +21397,19 @@ var transcriptCommand = new Command9("transcript").description("Get the transcri
21377
21397
  if (!content) {
21378
21398
  console.log(
21379
21399
  chalk10.yellow(
21380
- block === "transaction_polish" ? "The cleaned-up (polished) transcript hasn't been generated for this recording yet." : `The "${block}" transcript is not available for this recording.`
21400
+ block === "transaction_polish" ? "The cleaned-up (polished) transcript hasn't been generated for this recording yet." : block === "mark_memo" ? "This recording has a highlights block, but it is empty \u2014 no highlight was recorded." : `The "${block}" transcript is not available for this recording.`
21381
21401
  )
21382
21402
  );
21383
21403
  return;
21384
21404
  }
21385
- const segments = JSON.parse(content);
21386
- const lines = segments.map((seg) => {
21387
- const time = `[${formatTime(seg.start_time)} - ${formatTime(seg.end_time)}]`;
21388
- const speaker = seg.speaker ? `${seg.speaker}: ` : "";
21389
- return `${time} ${speaker}${seg.content ?? seg.topic ?? ""}`;
21390
- });
21391
- const output = lines.join("\n");
21405
+ const output = renderBlock(block, content);
21406
+ const label = block === "mark_memo" ? "Highlights" : "Transcript";
21392
21407
  if (opts.output) {
21393
21408
  await writeFile4(opts.output, output, "utf-8");
21394
- console.log(chalk10.green(`Transcript saved to ${opts.output}`));
21409
+ console.log(chalk10.green(`${label} saved to ${opts.output}`));
21395
21410
  } else {
21396
21411
  console.log(chalk10.bold(`
21397
- Transcript: ${file.name}
21412
+ ${label}: ${file.name}
21398
21413
  `));
21399
21414
  console.log(output);
21400
21415
  console.log();
@@ -21464,10 +21479,9 @@ var summaryCommand = new Command10("summary").description("Get the AI summary fo
21464
21479
  }
21465
21480
  const selected = opts.all ? noteList : summaries.slice(0, 1);
21466
21481
  if (!opts.all && noteList.length > 1) {
21467
- const detail = summaries.length > 1 ? `${summaries.length} summary notes` : `${noteList.length} notes (1 summary)`;
21468
21482
  console.error(
21469
21483
  chalk11.yellow(
21470
- `Note: this recording has ${detail}; showing the first. Use --all to print them all, or --json for the raw payload.`
21484
+ `Note: this recording has ${noteList.length} notes (${summaries.length} summary); showing the first. Use --all to print them all, or --json for the raw payload.`
21471
21485
  )
21472
21486
  );
21473
21487
  }
@@ -21475,9 +21489,14 @@ var summaryCommand = new Command10("summary").description("Get the AI summary fo
21475
21489
  for (const [i, note] of selected.entries()) {
21476
21490
  const content = await noteContent(note);
21477
21491
  const type = typeof note.data_type === "string" ? note.data_type : "unknown";
21492
+ const str = (v) => typeof v === "string" ? v.trim() : "";
21493
+ const tabName = str(note.data_tab_name);
21494
+ const title = str(note.data_title);
21495
+ const names = [tabName, title === tabName ? "" : title].filter(Boolean);
21496
+ const label = names.length ? `${names.join(" \u2014 ")} (${type})` : type;
21478
21497
  const body = content || `(this note has no content yet \u2014 nothing was returned for "${type}")`;
21479
21498
  sections.push(
21480
- opts.all ? `\u2500\u2500\u2500 note ${i + 1}/${selected.length} \xB7 ${type} \u2500\u2500\u2500
21499
+ opts.all ? `\u2500\u2500\u2500 note ${i + 1}/${selected.length} \xB7 ${label} \u2500\u2500\u2500
21481
21500
 
21482
21501
  ${body}` : body
21483
21502
  );
@@ -21802,7 +21821,7 @@ async function runWizard() {
21802
21821
  try {
21803
21822
  await initTelemetry({
21804
21823
  surface: "cli",
21805
- appVersion: "0.3.9"
21824
+ appVersion: "0.3.11"
21806
21825
  });
21807
21826
  } catch {
21808
21827
  }
@@ -21811,7 +21830,7 @@ async function notifyUpdate() {
21811
21830
  if (sub === "version" || sub === "update") return;
21812
21831
  if (process.env.PLAUD_NO_UPDATE_NOTIFIER) return;
21813
21832
  if (!process.stderr.isTTY) return;
21814
- const current = "0.3.9";
21833
+ const current = "0.3.11";
21815
21834
  if (current === "0.0.0") return;
21816
21835
  try {
21817
21836
  const newer = await checkForUpdate(current);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaud-ai/cli",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "plaud": "dist/index.js"