vellum-cli 0.3.1 → 0.3.3
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 +58 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -268,13 +268,14 @@ function unarchiveCommand(argv) {
|
|
|
268
268
|
|
|
269
269
|
// src/commands/list.ts
|
|
270
270
|
import { parseArgs as parseArgs2 } from "node:util";
|
|
271
|
-
var HELP = `vellum list — list your artifacts
|
|
271
|
+
var HELP = `vellum list — list your artifacts
|
|
272
272
|
|
|
273
273
|
Usage:
|
|
274
274
|
vellum list [options]
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
--
|
|
276
|
+
Lists the pages you own (log in with \`vellum login\`). With the owner API key
|
|
277
|
+
(VELLUM_API_KEY / --api-key) it lists every page. By default only live pages are
|
|
278
|
+
shown; use --archived for archived-only, or --all for both.
|
|
278
279
|
|
|
279
280
|
Options:
|
|
280
281
|
--archived Show only archived pages
|
|
@@ -343,7 +344,7 @@ ${pages.length} page${pages.length === 1 ? "" : "s"}${suffix}`);
|
|
|
343
344
|
return 0;
|
|
344
345
|
} catch (err) {
|
|
345
346
|
if (err instanceof VellumApiError && err.status === 401) {
|
|
346
|
-
console.error("Error:
|
|
347
|
+
console.error("Error: not authenticated. Run `vellum login` (or set VELLUM_API_KEY / pass --api-key).");
|
|
347
348
|
return 1;
|
|
348
349
|
}
|
|
349
350
|
throw err;
|
|
@@ -643,6 +644,53 @@ async function pushCommand(argv) {
|
|
|
643
644
|
}
|
|
644
645
|
return 0;
|
|
645
646
|
}
|
|
647
|
+
// package.json
|
|
648
|
+
var package_default = {
|
|
649
|
+
name: "vellum-cli",
|
|
650
|
+
version: "0.3.3",
|
|
651
|
+
description: "The vellum CLI — publish agent-authored HTML artifacts to a Vellum server.",
|
|
652
|
+
type: "module",
|
|
653
|
+
license: "MIT",
|
|
654
|
+
bin: {
|
|
655
|
+
vellum: "dist/index.js"
|
|
656
|
+
},
|
|
657
|
+
files: [
|
|
658
|
+
"dist",
|
|
659
|
+
"README.md"
|
|
660
|
+
],
|
|
661
|
+
engines: {
|
|
662
|
+
node: ">=18"
|
|
663
|
+
},
|
|
664
|
+
keywords: [
|
|
665
|
+
"vellum",
|
|
666
|
+
"cli",
|
|
667
|
+
"html",
|
|
668
|
+
"artifacts",
|
|
669
|
+
"agents"
|
|
670
|
+
],
|
|
671
|
+
publishConfig: {
|
|
672
|
+
access: "public"
|
|
673
|
+
},
|
|
674
|
+
scripts: {
|
|
675
|
+
start: "bun run src/index.ts",
|
|
676
|
+
build: "bun build src/index.ts --target=node --format=esm --outfile=dist/index.js",
|
|
677
|
+
prepack: "bun run build",
|
|
678
|
+
release: "bun publish --access public",
|
|
679
|
+
typecheck: "tsc -p tsconfig.json --noEmit"
|
|
680
|
+
},
|
|
681
|
+
devDependencies: {
|
|
682
|
+
"@vellum/core": "workspace:*"
|
|
683
|
+
}
|
|
684
|
+
};
|
|
685
|
+
|
|
686
|
+
// src/version.ts
|
|
687
|
+
var VERSION = package_default.version;
|
|
688
|
+
|
|
689
|
+
// src/commands/version.ts
|
|
690
|
+
async function versionCommand(_argv) {
|
|
691
|
+
console.log(VERSION);
|
|
692
|
+
return 0;
|
|
693
|
+
}
|
|
646
694
|
|
|
647
695
|
// src/commands/whoami.ts
|
|
648
696
|
import { parseArgs as parseArgs7 } from "node:util";
|
|
@@ -695,6 +743,7 @@ Commands:
|
|
|
695
743
|
markup Pin a comment to a passage of a document
|
|
696
744
|
archive Archive a page (read-only, hidden from the gallery)
|
|
697
745
|
unarchive Restore an archived page to live
|
|
746
|
+
version Print the installed CLI version
|
|
698
747
|
|
|
699
748
|
Run 'vellum <command> --help' for command-specific options.`;
|
|
700
749
|
var commands = {
|
|
@@ -705,7 +754,8 @@ var commands = {
|
|
|
705
754
|
list: listCommand,
|
|
706
755
|
markup: markupCommand,
|
|
707
756
|
archive: archiveCommand,
|
|
708
|
-
unarchive: unarchiveCommand
|
|
757
|
+
unarchive: unarchiveCommand,
|
|
758
|
+
version: versionCommand
|
|
709
759
|
};
|
|
710
760
|
async function main() {
|
|
711
761
|
const [, , cmd, ...rest] = process.argv;
|
|
@@ -713,6 +763,9 @@ async function main() {
|
|
|
713
763
|
console.log(HELP7);
|
|
714
764
|
return cmd ? 0 : 1;
|
|
715
765
|
}
|
|
766
|
+
if (cmd === "-v" || cmd === "--version") {
|
|
767
|
+
return versionCommand(rest);
|
|
768
|
+
}
|
|
716
769
|
const handler = commands[cmd];
|
|
717
770
|
if (!handler) {
|
|
718
771
|
console.error(`Unknown command: ${cmd}
|