@plaud-ai/cli 0.3.8 → 0.3.9

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 +61 -14
  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.8";
20382
+ const current = "0.3.9";
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.8";
20437
+ const current = "0.3.9";
20438
20438
  console.log(`plaud ${current}`);
20439
- if ("be0dfaa") console.log(`commit ${"be0dfaa"}`);
20440
- if ("2026-08-10T08:40:12.325Z") console.log(`built ${"2026-08-10T08:40:12.325Z"}`);
20439
+ if ("e0fb5d6") console.log(`commit ${"e0fb5d6"}`);
20440
+ if ("2026-08-18T03:07:34.503Z") console.log(`built ${"2026-08-18T03:07:34.503Z"}`);
20441
20441
  if (current === "unknown") return;
20442
20442
  const newer = await checkForUpdate(current);
20443
20443
  if (newer) {
@@ -21423,27 +21423,74 @@ import { Command as Command10 } from "commander";
21423
21423
  import chalk11 from "chalk";
21424
21424
  import ora8 from "ora";
21425
21425
  import { writeFile as writeFile5 } from "fs/promises";
21426
- var summaryCommand = new Command10("summary").description("Get the AI summary for a Plaud recording").argument("<file_id>", "The file ID to retrieve summary for").option("-o, --output <file>", "Save summary to a file").action(async (fileId, opts) => {
21426
+ var SUMMARY_TYPE = "auto_sum_note";
21427
+ async function noteContent(note) {
21428
+ try {
21429
+ return await loadBlockContent(note);
21430
+ } catch {
21431
+ return "";
21432
+ }
21433
+ }
21434
+ var summaryCommand = new Command10("summary").description("Get the AI summary for a Plaud recording").argument("<file_id>", "The file ID to retrieve summary for").option("-o, --output <file>", "Save summary to a file").option("--all", "Print every note on the recording, not just the first summary").option("--json", "Print note_list verbatim as JSON (same payload as the MCP get_note tool)").action(async (fileId, opts) => {
21427
21435
  const client2 = getClient2();
21428
21436
  const spinner = ora8("Fetching summary...").start();
21429
21437
  try {
21430
21438
  const file = await client2.getFile(fileId);
21431
21439
  spinner.stop();
21432
21440
  const noteList = file.note_list ?? [];
21433
- const note = noteList.find((n) => n.data_type === "auto_sum_note");
21434
- if (!note || !note.data_content) {
21435
- console.log(chalk11.yellow("Summary not available for this recording."));
21441
+ if (opts.json) {
21442
+ const payload = JSON.stringify(noteList, null, 2);
21443
+ if (opts.output) {
21444
+ await writeFile5(opts.output, payload, "utf-8");
21445
+ console.log(chalk11.green(`Notes saved to ${opts.output}`));
21446
+ } else {
21447
+ console.log(payload);
21448
+ }
21436
21449
  return;
21437
21450
  }
21438
- const content = note.data_content;
21451
+ const summaries = noteList.filter((n) => n.data_type === SUMMARY_TYPE);
21452
+ if (summaries.length === 0) {
21453
+ if (noteList.length === 0) {
21454
+ console.log(chalk11.yellow("Summary not available for this recording."));
21455
+ } else {
21456
+ const available = noteList.map((n) => n.data_type).filter(Boolean).join(", ") || "(none)";
21457
+ console.log(
21458
+ chalk11.yellow(
21459
+ `No "${SUMMARY_TYPE}" note for this recording. Available: ${available}.`
21460
+ )
21461
+ );
21462
+ }
21463
+ return;
21464
+ }
21465
+ const selected = opts.all ? noteList : summaries.slice(0, 1);
21466
+ if (!opts.all && noteList.length > 1) {
21467
+ const detail = summaries.length > 1 ? `${summaries.length} summary notes` : `${noteList.length} notes (1 summary)`;
21468
+ console.error(
21469
+ chalk11.yellow(
21470
+ `Note: this recording has ${detail}; showing the first. Use --all to print them all, or --json for the raw payload.`
21471
+ )
21472
+ );
21473
+ }
21474
+ const sections = [];
21475
+ for (const [i, note] of selected.entries()) {
21476
+ const content = await noteContent(note);
21477
+ const type = typeof note.data_type === "string" ? note.data_type : "unknown";
21478
+ const body = content || `(this note has no content yet \u2014 nothing was returned for "${type}")`;
21479
+ sections.push(
21480
+ opts.all ? `\u2500\u2500\u2500 note ${i + 1}/${selected.length} \xB7 ${type} \u2500\u2500\u2500
21481
+
21482
+ ${body}` : body
21483
+ );
21484
+ }
21485
+ const output = sections.join("\n\n");
21439
21486
  if (opts.output) {
21440
- await writeFile5(opts.output, content, "utf-8");
21487
+ await writeFile5(opts.output, output, "utf-8");
21441
21488
  console.log(chalk11.green(`Summary saved to ${opts.output}`));
21442
21489
  } else {
21443
21490
  console.log(chalk11.bold(`
21444
- Summary: ${file.name}
21491
+ ${opts.all ? "Notes" : "Summary"}: ${file.name}
21445
21492
  `));
21446
- console.log(content);
21493
+ console.log(output);
21447
21494
  console.log();
21448
21495
  }
21449
21496
  } catch (err) {
@@ -21755,7 +21802,7 @@ async function runWizard() {
21755
21802
  try {
21756
21803
  await initTelemetry({
21757
21804
  surface: "cli",
21758
- appVersion: "0.3.8"
21805
+ appVersion: "0.3.9"
21759
21806
  });
21760
21807
  } catch {
21761
21808
  }
@@ -21764,7 +21811,7 @@ async function notifyUpdate() {
21764
21811
  if (sub === "version" || sub === "update") return;
21765
21812
  if (process.env.PLAUD_NO_UPDATE_NOTIFIER) return;
21766
21813
  if (!process.stderr.isTTY) return;
21767
- const current = "0.3.8";
21814
+ const current = "0.3.9";
21768
21815
  if (current === "0.0.0") return;
21769
21816
  try {
21770
21817
  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.8",
3
+ "version": "0.3.9",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "plaud": "dist/index.js"