@plaud-ai/cli 0.3.8 → 0.3.10

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 +65 -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.10";
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.10";
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 ("1afbfa8") console.log(`commit ${"1afbfa8"}`);
20440
+ if ("2026-08-19T04:14:57.144Z") console.log(`built ${"2026-08-19T04:14:57.144Z"}`);
20441
20441
  if (current === "unknown") return;
20442
20442
  const newer = await checkForUpdate(current);
20443
20443
  if (newer) {
@@ -21423,27 +21423,78 @@ 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
+ console.error(
21468
+ chalk11.yellow(
21469
+ `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.`
21470
+ )
21471
+ );
21472
+ }
21473
+ const sections = [];
21474
+ for (const [i, note] of selected.entries()) {
21475
+ const content = await noteContent(note);
21476
+ const type = typeof note.data_type === "string" ? note.data_type : "unknown";
21477
+ const str = (v) => typeof v === "string" ? v.trim() : "";
21478
+ const tabName = str(note.data_tab_name);
21479
+ const title = str(note.data_title);
21480
+ const names = [tabName, title === tabName ? "" : title].filter(Boolean);
21481
+ const label = names.length ? `${names.join(" \u2014 ")} (${type})` : type;
21482
+ const body = content || `(this note has no content yet \u2014 nothing was returned for "${type}")`;
21483
+ sections.push(
21484
+ opts.all ? `\u2500\u2500\u2500 note ${i + 1}/${selected.length} \xB7 ${label} \u2500\u2500\u2500
21485
+
21486
+ ${body}` : body
21487
+ );
21488
+ }
21489
+ const output = sections.join("\n\n");
21439
21490
  if (opts.output) {
21440
- await writeFile5(opts.output, content, "utf-8");
21491
+ await writeFile5(opts.output, output, "utf-8");
21441
21492
  console.log(chalk11.green(`Summary saved to ${opts.output}`));
21442
21493
  } else {
21443
21494
  console.log(chalk11.bold(`
21444
- Summary: ${file.name}
21495
+ ${opts.all ? "Notes" : "Summary"}: ${file.name}
21445
21496
  `));
21446
- console.log(content);
21497
+ console.log(output);
21447
21498
  console.log();
21448
21499
  }
21449
21500
  } catch (err) {
@@ -21755,7 +21806,7 @@ async function runWizard() {
21755
21806
  try {
21756
21807
  await initTelemetry({
21757
21808
  surface: "cli",
21758
- appVersion: "0.3.8"
21809
+ appVersion: "0.3.10"
21759
21810
  });
21760
21811
  } catch {
21761
21812
  }
@@ -21764,7 +21815,7 @@ async function notifyUpdate() {
21764
21815
  if (sub === "version" || sub === "update") return;
21765
21816
  if (process.env.PLAUD_NO_UPDATE_NOTIFIER) return;
21766
21817
  if (!process.stderr.isTTY) return;
21767
- const current = "0.3.8";
21818
+ const current = "0.3.10";
21768
21819
  if (current === "0.0.0") return;
21769
21820
  try {
21770
21821
  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.10",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "plaud": "dist/index.js"