@nabnflow/cli 0.1.0 → 0.2.0

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 (38) hide show
  1. package/dist/commands/documents/content-format.d.ts +7 -0
  2. package/dist/commands/documents/content-format.d.ts.map +1 -0
  3. package/dist/commands/documents/content-format.js +30 -0
  4. package/dist/commands/documents/content-format.js.map +1 -0
  5. package/dist/commands/documents/create.d.ts +23 -0
  6. package/dist/commands/documents/create.d.ts.map +1 -0
  7. package/dist/commands/documents/create.js +155 -0
  8. package/dist/commands/documents/create.js.map +1 -0
  9. package/dist/commands/documents/get.d.ts +40 -0
  10. package/dist/commands/documents/get.d.ts.map +1 -0
  11. package/dist/commands/documents/get.js +53 -0
  12. package/dist/commands/documents/get.js.map +1 -0
  13. package/dist/commands/documents/search.d.ts +27 -0
  14. package/dist/commands/documents/search.d.ts.map +1 -0
  15. package/dist/commands/documents/search.js +48 -0
  16. package/dist/commands/documents/search.js.map +1 -0
  17. package/dist/commands/documents/update.d.ts +26 -0
  18. package/dist/commands/documents/update.d.ts.map +1 -0
  19. package/dist/commands/documents/update.js +147 -0
  20. package/dist/commands/documents/update.js.map +1 -0
  21. package/dist/commands/files/upload.js +2 -2
  22. package/dist/commands/files/upload.js.map +1 -1
  23. package/dist/commands/notes/search.d.ts +27 -0
  24. package/dist/commands/notes/search.d.ts.map +1 -0
  25. package/dist/commands/notes/search.js +48 -0
  26. package/dist/commands/notes/search.js.map +1 -0
  27. package/dist/commands/notes/update.d.ts.map +1 -1
  28. package/dist/commands/notes/update.js +2 -20
  29. package/dist/commands/notes/update.js.map +1 -1
  30. package/dist/commands/projects/documents.d.ts +44 -0
  31. package/dist/commands/projects/documents.d.ts.map +1 -0
  32. package/dist/commands/projects/documents.js +50 -0
  33. package/dist/commands/projects/documents.js.map +1 -0
  34. package/package.json +1 -1
  35. package/dist/commands/hello.d.ts +0 -6
  36. package/dist/commands/hello.d.ts.map +0 -1
  37. package/dist/commands/hello.js +0 -8
  38. package/dist/commands/hello.js.map +0 -1
@@ -0,0 +1,7 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class DocumentsContentFormat extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ run(): Promise<void>;
6
+ }
7
+ //# sourceMappingURL=content-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-format.d.ts","sourceRoot":"","sources":["../../../src/commands/documents/content-format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAA;AAGnC,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,OAAO;IACzD,MAAM,CAAC,WAAW,SACwL;IAE1M,MAAM,CAAC,QAAQ,WAGd;IAEK,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqB3B"}
@@ -0,0 +1,30 @@
1
+ import { Command } from '@oclif/core';
2
+ import { requireAuth, requireBaseUrl } from '../../lib/client.js';
3
+ export default class DocumentsContentFormat extends Command {
4
+ static description = "Show the block (JSONContent) format expected by the --content flag when creating or updating note documents. Use this to learn how to structure content for 'documents create' and 'documents update'.";
5
+ static examples = [
6
+ '<%= config.bin %> documents content-format',
7
+ '<%= config.bin %> documents content-format | less',
8
+ ];
9
+ async run() {
10
+ const token = requireAuth();
11
+ const baseUrl = requireBaseUrl();
12
+ const url = `${baseUrl.replace(/\/$/, '')}/api/docs/editor-blocks`;
13
+ const res = await fetch(url, {
14
+ headers: { Authorization: `Bearer ${token}` },
15
+ });
16
+ if (!res.ok) {
17
+ let message = `HTTP ${res.status}`;
18
+ try {
19
+ const body = (await res.json());
20
+ if (body.error)
21
+ message = body.error;
22
+ }
23
+ catch { }
24
+ this.error(`Failed to fetch content format docs: ${message}`);
25
+ }
26
+ const docs = await res.text();
27
+ this.log(docs);
28
+ }
29
+ }
30
+ //# sourceMappingURL=content-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-format.js","sourceRoot":"","sources":["../../../src/commands/documents/content-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
+ message: string;
5
+ }
6
+ export default class DocumentsCreate extends Command {
7
+ static description: string;
8
+ static enableJsonFlag: boolean;
9
+ static examples: string[];
10
+ static flags: {
11
+ title: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
+ type: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
+ project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ content: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ file: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ 'skip-todo-extraction': import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
+ 'due-date': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ url: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
19
+ };
20
+ run(): Promise<CreateDocumentResponse>;
21
+ }
22
+ export {};
23
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/documents/create.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,OAAO,EAAQ,MAAM,aAAa,CAAA;AAyB1C,UAAU,sBAAsB;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;CAChB;AAyCD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IAClD,MAAM,CAAC,WAAW,SAA0B;IAE5C,MAAM,CAAC,cAAc,UAAO;IAE5B,MAAM,CAAC,QAAQ,WAOd;IAED,MAAM,CAAC,KAAK;;;;;;;;;MAmCX;IAEK,GAAG,IAAI,OAAO,CAAC,sBAAsB,CAAC;CA2D7C"}
@@ -0,0 +1,155 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { basename, extname } from 'node:path';
3
+ import { Command, Flags } from '@oclif/core';
4
+ import { requireAuth, requireBaseUrl, apiRequest } from '../../lib/client.js';
5
+ const MIME_TYPES = {
6
+ '.jpg': 'image/jpeg',
7
+ '.jpeg': 'image/jpeg',
8
+ '.png': 'image/png',
9
+ '.gif': 'image/gif',
10
+ '.webp': 'image/webp',
11
+ '.avif': 'image/avif',
12
+ '.svg': 'image/svg+xml',
13
+ '.pdf': 'application/pdf',
14
+ '.txt': 'text/plain',
15
+ '.md': 'text/markdown',
16
+ '.csv': 'text/csv',
17
+ '.json': 'application/json',
18
+ '.zip': 'application/zip',
19
+ };
20
+ async function uploadFile(filePath, token, baseUrl) {
21
+ const ext = extname(filePath).toLowerCase();
22
+ const mimeType = MIME_TYPES[ext] ?? 'application/octet-stream';
23
+ const filename = basename(filePath);
24
+ let fileBuffer;
25
+ try {
26
+ fileBuffer = readFileSync(filePath);
27
+ }
28
+ catch {
29
+ throw new Error(`Could not read file: ${filePath}`);
30
+ }
31
+ const apiBase = baseUrl.replace(/\/$/, '');
32
+ const res = await fetch(`${apiBase}/upload`, {
33
+ method: 'POST',
34
+ headers: {
35
+ Authorization: `Bearer ${token}`,
36
+ 'Content-Type': mimeType,
37
+ },
38
+ body: fileBuffer,
39
+ });
40
+ if (!res.ok) {
41
+ let message = `Upload failed for ${filename}: HTTP ${res.status}`;
42
+ try {
43
+ const body = (await res.json());
44
+ if (body.error)
45
+ message = `Upload failed for ${filename}: ${body.error}`;
46
+ }
47
+ catch { }
48
+ throw new Error(message);
49
+ }
50
+ const result = (await res.json());
51
+ return { storageId: result.storageId, filename, contentType: result.contentType, size: result.size };
52
+ }
53
+ export default class DocumentsCreate extends Command {
54
+ static description = 'Create a new document';
55
+ static enableJsonFlag = true;
56
+ static examples = [
57
+ '<%= config.bin %> documents create --title "Meeting notes"',
58
+ '<%= config.bin %> documents create --title "Buy groceries" --type todo --due-date 2026-04-01',
59
+ '<%= config.bin %> documents create --title "Anthropic" --type link --url https://anthropic.com',
60
+ '<%= config.bin %> documents create --title "Resume" --type file --file ./resume.pdf',
61
+ '<%= config.bin %> documents create --title "Q1 Report" --file ./report.pdf',
62
+ '<%= config.bin %> documents create --title "Design docs" --file ./mockup.png --file ./spec.pdf',
63
+ ];
64
+ static flags = {
65
+ title: Flags.string({
66
+ description: 'Document title',
67
+ required: true,
68
+ }),
69
+ type: Flags.string({
70
+ description: 'Document type to create',
71
+ options: ['note', 'todo', 'link', 'file'],
72
+ default: 'note',
73
+ }),
74
+ project: Flags.string({
75
+ description: "Project ID to associate the document with. Run 'nabnflow projects' to list available projects and their IDs.",
76
+ }),
77
+ // note flags
78
+ content: Flags.string({
79
+ description: "Note content in block (JSONContent) format. Run 'nabnflow documents content-format' to see the expected JSON structure. Only applicable to type 'note'.",
80
+ }),
81
+ file: Flags.string({
82
+ description: "Path to a local file to upload and attach. Can be specified multiple times for type 'note'. Required for type 'file' (exactly one).",
83
+ multiple: true,
84
+ }),
85
+ 'skip-todo-extraction': Flags.boolean({
86
+ description: "Skip automatic todo extraction from note content. Only applicable to type 'note'.",
87
+ default: false,
88
+ }),
89
+ // todo flag
90
+ 'due-date': Flags.string({
91
+ description: "Due date in YYYY-MM-DD format. Only applicable to type 'todo'.",
92
+ }),
93
+ // link flag
94
+ url: Flags.string({
95
+ description: "URL for the link document. Required when --type=link.",
96
+ }),
97
+ };
98
+ async run() {
99
+ const { flags } = await this.parse(DocumentsCreate);
100
+ const docType = flags.type ?? 'note';
101
+ // Type-specific validation
102
+ if (docType === 'link' && !flags.url) {
103
+ this.error('--url is required when --type=link');
104
+ }
105
+ if (docType === 'file' && (!flags.file || flags.file.length === 0)) {
106
+ this.error('--file is required when --type=file');
107
+ }
108
+ if (docType === 'file' && flags.file && flags.file.length > 1) {
109
+ this.error("--type=file accepts exactly one file. Use --type=note with multiple --file flags to attach multiple files.");
110
+ }
111
+ const body = { type: docType, title: flags.title };
112
+ if (flags.project)
113
+ body.projectId = flags.project;
114
+ if (docType === 'note') {
115
+ if (flags.content !== undefined) {
116
+ try {
117
+ body.content = JSON.parse(flags.content);
118
+ }
119
+ catch {
120
+ this.error("Invalid JSON in --content flag. Run 'nabnflow documents content-format' to see the expected JSON structure.");
121
+ }
122
+ }
123
+ if (flags['skip-todo-extraction'])
124
+ body.skipTodoExtraction = true;
125
+ if (flags.file && flags.file.length > 0) {
126
+ const token = requireAuth();
127
+ const baseUrl = requireBaseUrl();
128
+ body.files = await Promise.all(flags.file.map((filePath) => uploadFile(filePath, token, baseUrl)));
129
+ }
130
+ }
131
+ else if (docType === 'todo') {
132
+ if (flags['due-date'])
133
+ body.dueDate = flags['due-date'];
134
+ }
135
+ else if (docType === 'link') {
136
+ body.url = flags.url;
137
+ }
138
+ else if (docType === 'file') {
139
+ const token = requireAuth();
140
+ const baseUrl = requireBaseUrl();
141
+ const uploaded = await uploadFile(flags.file[0], token, baseUrl);
142
+ body.files = [uploaded];
143
+ // Default title to filename if user didn't provide a meaningful one
144
+ if (!flags.title)
145
+ body.title = uploaded.filename;
146
+ }
147
+ const result = await apiRequest('/api/documents', {
148
+ method: 'POST',
149
+ body: JSON.stringify(body),
150
+ });
151
+ this.log(`Created ${docType}: ${result.documentId}`);
152
+ return result;
153
+ }
154
+ }
155
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/documents/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AACpC,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,MAAM,WAAW,CAAA;AAE3C,OAAO,EAAC,OAAO,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAA;AAE3E,MAAM,UAAU,GAA2B;IACzC,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,WAAW;IACnB,M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AAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAA;YACjE,IAAI,CAAC,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAA;YACvB,oEAAoE;YACpE,IAAI,CAAC,KAAK,CAAC,KAAK;gBAAE,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAA;QAClD,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,UAAU,CAAyB,gBAAgB,EAAE;YACxE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAA;QAEF,IAAI,CAAC,GAAG,CAAC,WAAW,OAAO,KAAK,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;QACpD,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { Command } from '@oclif/core';
2
+ interface DocumentFile {
3
+ storageId: string;
4
+ filename?: string;
5
+ contentType: string;
6
+ size: number;
7
+ url?: string | null;
8
+ }
9
+ interface Document {
10
+ id: string;
11
+ type: 'note' | 'todo' | 'link' | 'file';
12
+ title: string;
13
+ description?: string | null;
14
+ projectId?: string | null;
15
+ content?: unknown;
16
+ files?: DocumentFile[];
17
+ dueDate?: string | null;
18
+ isCompleted?: boolean | null;
19
+ url?: string | null;
20
+ filename?: string | null;
21
+ contentType?: string | null;
22
+ size?: number | null;
23
+ fileUrl?: string | null;
24
+ createdAt: string;
25
+ updatedAt: string;
26
+ }
27
+ interface GetDocumentResponse {
28
+ document: Document;
29
+ }
30
+ export default class DocumentsGet extends Command {
31
+ static description: string;
32
+ static enableJsonFlag: boolean;
33
+ static examples: string[];
34
+ static args: {
35
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
36
+ };
37
+ run(): Promise<GetDocumentResponse>;
38
+ }
39
+ export {};
40
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../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AI;;MAEV;IAEK,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;CAmC1C"}
@@ -0,0 +1,53 @@
1
+ import { Args, Command } from '@oclif/core';
2
+ import { apiRequest } from '../../lib/client.js';
3
+ export default class DocumentsGet extends Command {
4
+ static description = 'Get a document by ID';
5
+ static enableJsonFlag = true;
6
+ static examples = [
7
+ '<%= config.bin %> documents get <id>',
8
+ '<%= config.bin %> documents get <id> --json',
9
+ ];
10
+ static args = {
11
+ id: Args.string({ description: 'Document ID', required: true }),
12
+ };
13
+ async run() {
14
+ const { args } = await this.parse(DocumentsGet);
15
+ const result = await apiRequest(`/api/documents/${args.id}`);
16
+ const { document: doc } = result;
17
+ this.log(`ID: ${doc.id}`);
18
+ this.log(`Type: ${doc.type}`);
19
+ this.log(`Title: ${doc.title}`);
20
+ if (doc.projectId)
21
+ this.log(`Project: ${doc.projectId}`);
22
+ if (doc.type === 'todo') {
23
+ this.log(`Done: ${doc.isCompleted ? 'yes' : 'no'}`);
24
+ if (doc.dueDate)
25
+ this.log(`Due: ${doc.dueDate}`);
26
+ }
27
+ else if (doc.type === 'link') {
28
+ if (doc.url)
29
+ this.log(`URL: ${doc.url}`);
30
+ }
31
+ else if (doc.type === 'file') {
32
+ this.log(`File: ${doc.filename} (${doc.contentType}, ${doc.size?.toLocaleString()} bytes)`);
33
+ if (doc.fileUrl)
34
+ this.log(` ${doc.fileUrl}`);
35
+ }
36
+ else if (doc.type === 'note') {
37
+ if (doc.files && doc.files.length > 0) {
38
+ this.log(`Files: ${doc.files.length} attachment(s)`);
39
+ for (const f of doc.files) {
40
+ this.log(` - ${f.filename ?? f.storageId} (${f.contentType}, ${f.size.toLocaleString()} bytes)`);
41
+ if (f.url)
42
+ this.log(` ${f.url}`);
43
+ }
44
+ }
45
+ if (doc.content)
46
+ this.log(`Content: [blocks present — use --json to inspect]`);
47
+ }
48
+ this.log(`Created: ${doc.createdAt}`);
49
+ this.log(`Updated: ${doc.updatedAt}`);
50
+ return result;
51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G,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;gBACrC,CAAC;YACH,CAAC;YACD,IAAI,GAAG,CAAC,OAAO;gBAAE,IAAI,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAA;QAChF,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,YAAY,GAAG,CAAC,SAAS,EAAE,CAAC,CAAA;QACrC,IAAI,CAAC,GAAG,CAAC,YAAY,GAAG,CAAC,SAAS,EAAE,CAAC,CAAA;QAErC,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { Command } from '@oclif/core';
2
+ interface SearchResult {
3
+ id: string;
4
+ title: string;
5
+ description: string | null;
6
+ type: string;
7
+ score: number;
8
+ url: string;
9
+ }
10
+ interface SearchResponse {
11
+ results: SearchResult[];
12
+ }
13
+ export default class DocumentsSearch extends Command {
14
+ static description: string;
15
+ static enableJsonFlag: boolean;
16
+ static examples: string[];
17
+ static args: {
18
+ query: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
19
+ };
20
+ static flags: {
21
+ limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
22
+ type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ };
24
+ run(): Promise<SearchResponse>;
25
+ }
26
+ export {};
27
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/commands/documents/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,OAAO,EAAQ,MAAM,aAAa,CAAA;AAGhD,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB;AAED,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IAClD,MAAM,CAAC,WAAW,SAA2C;IAE7D,MAAM,CAAC,cAAc,UAAO;IAE5B,MAAM,CAAC,QAAQ,WAKd;IAED,MAAM,CAAC,IAAI;;MAEV;IAED,MAAM,CAAC,KAAK;;;MASX;IAEK,GAAG,IAAI,OAAO,CAAC,cAAc,CAAC;CAyBrC"}
@@ -0,0 +1,48 @@
1
+ import { Args, Command, Flags } from '@oclif/core';
2
+ import { apiRequest } from '../../lib/client.js';
3
+ export default class DocumentsSearch extends Command {
4
+ static description = 'Search documents using semantic search';
5
+ static enableJsonFlag = true;
6
+ static examples = [
7
+ '<%= config.bin %> documents search "meeting notes"',
8
+ '<%= config.bin %> documents search "react hooks" --type note',
9
+ '<%= config.bin %> documents search "budget" --type todo --limit 5',
10
+ '<%= config.bin %> documents search "project ideas" --json',
11
+ ];
12
+ static args = {
13
+ query: Args.string({ description: 'Search query', required: true }),
14
+ };
15
+ static flags = {
16
+ limit: Flags.integer({
17
+ description: 'Maximum number of results to return (1–50)',
18
+ default: 15,
19
+ }),
20
+ type: Flags.string({
21
+ description: 'Filter by document type',
22
+ options: ['note', 'todo', 'link', 'file'],
23
+ }),
24
+ };
25
+ async run() {
26
+ const { args, flags } = await this.parse(DocumentsSearch);
27
+ const params = new URLSearchParams({ q: args.query, limit: String(flags.limit) });
28
+ if (flags.type)
29
+ params.set('type', flags.type);
30
+ const result = await apiRequest(`/api/search?${params}`);
31
+ if (result.results.length === 0) {
32
+ this.log('No results found.');
33
+ return result;
34
+ }
35
+ for (const [i, r] of result.results.entries()) {
36
+ this.log(`${i + 1}. ${r.title} [${r.type}]`);
37
+ if (r.description) {
38
+ const snippet = r.description.length > 120 ? r.description.slice(0, 120) + '…' : r.description;
39
+ this.log(` ${snippet}`);
40
+ }
41
+ this.log(` ${r.url}`);
42
+ if (i < result.results.length - 1)
43
+ this.log('');
44
+ }
45
+ return result;
46
+ }
47
+ }
48
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/commands/documents/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAA;AAe9C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IAClD,MAAM,CAAC,WAAW,GAAG,wCAAwC,CAAA;IAE7D,MAAM,CAAC,cAAc,GAAG,IAAI,CAAA;IAE5B,MAAM,CAAC,QAAQ,GAAG;QAChB,oDAAoD;QACpD,8DAA8D;QAC9D,mEAAmE;QACnE,2DAA2D;KAC5D,CAAA;IAED,MAAM,CAAC,IAAI,GAAG;QACZ,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,EAAC,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;KAClE,CAAA;IAED,MAAM,CAAC,KAAK,GAAG;QACb,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC;YACnB,WAAW,EAAE,4CAA4C;YACzD,OAAO,EAAE,EAAE;SACZ,CAAC;QACF,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,yBAAyB;YACtC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAC1C,CAAC;KACH,CAAA;IAED,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;QAEvD,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,EAAC,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAA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Update extends Command {
7
+ static description: string;
8
+ static enableJsonFlag: boolean;
9
+ static examples: string[];
10
+ static args: {
11
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
12
+ };
13
+ static flags: {
14
+ title: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ project: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ content: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ file: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ 'clear-files': import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
+ 'due-date': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ 'is-completed': import("@oclif/core/interfaces").BooleanFlag<boolean>;
21
+ url: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ };
23
+ run(): Promise<UpdateDocumentResponse>;
24
+ }
25
+ export {};
26
+ //# sourceMappingURL=update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/commands/documents/update.ts"],"names":[],"mappings":"AAGA,OAAO,EAAO,OAAO,EAAQ,MAAM,aAAa,CAAA;AAyBhD,UAAU,sBAAsB;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;CAChB;AAyCD,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,OAAO;IAClD,MAAM,CAAC,WAAW,SAAgC;IAElD,MAAM,CAAC,cAAc,UAAO;IAE5B,MAAM,CAAC,QAAQ,WASd;IAED,MAAM,CAAC,IAAI;;MAEV;IAED,MAAM,CAAC,KAAK;;;;;;;;;MA+BX;IAEK,GAAG,IAAI,OAAO,CAAC,sBAAsB,CAAC;CAuD7C"}
@@ -0,0 +1,147 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { basename, extname } from 'node:path';
3
+ import { Args, Command, Flags } from '@oclif/core';
4
+ import { requireAuth, requireBaseUrl, apiRequest } from '../../lib/client.js';
5
+ const MIME_TYPES = {
6
+ '.jpg': 'image/jpeg',
7
+ '.jpeg': 'image/jpeg',
8
+ '.png': 'image/png',
9
+ '.gif': 'image/gif',
10
+ '.webp': 'image/webp',
11
+ '.avif': 'image/avif',
12
+ '.svg': 'image/svg+xml',
13
+ '.pdf': 'application/pdf',
14
+ '.txt': 'text/plain',
15
+ '.md': 'text/markdown',
16
+ '.csv': 'text/csv',
17
+ '.json': 'application/json',
18
+ '.zip': 'application/zip',
19
+ };
20
+ async function uploadFile(filePath, token, baseUrl) {
21
+ const ext = extname(filePath).toLowerCase();
22
+ const mimeType = MIME_TYPES[ext] ?? 'application/octet-stream';
23
+ const filename = basename(filePath);
24
+ let fileBuffer;
25
+ try {
26
+ fileBuffer = readFileSync(filePath);
27
+ }
28
+ catch {
29
+ throw new Error(`Could not read file: ${filePath}`);
30
+ }
31
+ const apiBase = baseUrl.replace(/\/$/, '');
32
+ const res = await fetch(`${apiBase}/upload`, {
33
+ method: 'POST',
34
+ headers: {
35
+ Authorization: `Bearer ${token}`,
36
+ 'Content-Type': mimeType,
37
+ },
38
+ body: fileBuffer,
39
+ });
40
+ if (!res.ok) {
41
+ let message = `Upload failed for ${filename}: HTTP ${res.status}`;
42
+ try {
43
+ const body = (await res.json());
44
+ if (body.error)
45
+ message = `Upload failed for ${filename}: ${body.error}`;
46
+ }
47
+ catch { }
48
+ throw new Error(message);
49
+ }
50
+ const result = (await res.json());
51
+ return { storageId: result.storageId, filename, contentType: result.contentType, size: result.size };
52
+ }
53
+ export default class DocumentsUpdate extends Command {
54
+ static description = 'Update an existing document';
55
+ static enableJsonFlag = true;
56
+ static examples = [
57
+ '<%= config.bin %> documents update <id> --title "New title"',
58
+ '<%= config.bin %> documents update <id> --content \'{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Updated content"}]}]}\'',
59
+ '<%= config.bin %> documents update <id> --file ./new-attachment.pdf',
60
+ '<%= config.bin %> documents update <id> --clear-files',
61
+ '<%= config.bin %> documents update <id> --project proj_abc123',
62
+ '<%= config.bin %> documents update <id> --due-date 2026-05-01',
63
+ '<%= config.bin %> documents update <id> --is-completed',
64
+ '<%= config.bin %> documents update <id> --url https://new-url.com',
65
+ ];
66
+ static args = {
67
+ id: Args.string({ description: 'Document ID', required: true }),
68
+ };
69
+ static flags = {
70
+ title: Flags.string({ description: 'New title' }),
71
+ project: Flags.string({
72
+ description: "Project ID to move document to (pass \"inbox\" to clear). Run 'nabnflow projects' to list available projects and their IDs.",
73
+ }),
74
+ // note flags
75
+ content: Flags.string({
76
+ description: "New content in block (JSONContent) format. Run 'nabnflow documents content-format' to see the expected JSON structure. Only applicable to type 'note'.",
77
+ }),
78
+ file: Flags.string({
79
+ description: "Path to a local file to upload and append to existing file attachments. Can be specified multiple times. Only applicable to type 'note'.",
80
+ multiple: true,
81
+ }),
82
+ 'clear-files': Flags.boolean({
83
+ description: "Remove all file attachments from the note (workflow-managed link/image entries are preserved). Only applicable to type 'note'.",
84
+ default: false,
85
+ }),
86
+ // todo flags
87
+ 'due-date': Flags.string({
88
+ description: "New due date in YYYY-MM-DD format. Pass an empty string to clear. Only applicable to type 'todo'.",
89
+ }),
90
+ 'is-completed': Flags.boolean({
91
+ description: "Mark todo as completed. Use --no-is-completed to mark as incomplete. Only applicable to type 'todo'.",
92
+ allowNo: true,
93
+ }),
94
+ // link flag
95
+ url: Flags.string({
96
+ description: "New URL. Only applicable to type 'link'.",
97
+ }),
98
+ };
99
+ async run() {
100
+ const { args, flags } = await this.parse(DocumentsUpdate);
101
+ const hasFlag = flags.title !== undefined ||
102
+ flags.content !== undefined ||
103
+ flags.project !== undefined ||
104
+ (flags.file && flags.file.length > 0) ||
105
+ flags['clear-files'] ||
106
+ flags['due-date'] !== undefined ||
107
+ flags['is-completed'] !== undefined ||
108
+ flags.url !== undefined;
109
+ if (!hasFlag) {
110
+ this.error('At least one flag is required.\n\nAvailable flags: --title, --content, --project, --file, --clear-files, --due-date, --is-completed, --url');
111
+ }
112
+ const body = {};
113
+ if (flags.title !== undefined)
114
+ body.title = flags.title;
115
+ if (flags.project !== undefined)
116
+ body.projectId = flags.project === 'inbox' ? null : flags.project;
117
+ if (flags['due-date'] !== undefined)
118
+ body.dueDate = flags['due-date'] === '' ? null : flags['due-date'];
119
+ if (flags['is-completed'] !== undefined)
120
+ body.isCompleted = flags['is-completed'];
121
+ if (flags.url !== undefined)
122
+ body.url = flags.url;
123
+ if (flags.content !== undefined) {
124
+ try {
125
+ body.content = JSON.parse(flags.content);
126
+ }
127
+ catch {
128
+ this.error("Invalid JSON in --content flag. Run 'nabnflow documents content-format' to see the expected JSON structure.");
129
+ }
130
+ }
131
+ if (flags['clear-files']) {
132
+ body.files = null;
133
+ }
134
+ else if (flags.file && flags.file.length > 0) {
135
+ const token = requireAuth();
136
+ const baseUrl = requireBaseUrl();
137
+ body.appendFiles = await Promise.all(flags.file.map((filePath) => uploadFile(filePath, token, baseUrl)));
138
+ }
139
+ const result = await apiRequest(`/api/documents/${args.id}`, {
140
+ method: 'PUT',
141
+ body: JSON.stringify(body),
142
+ });
143
+ this.log(`Updated document: ${result.documentId}`);
144
+ return result;
145
+ }
146
+ }
147
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/documents/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AACpC,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,MAAM,WAAW,CAAA;AAE3C,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAA;AAE3E,MA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C,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CACnE,CAAA;QACH,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,UAAU,CAAyB,kBAAkB,IAAI,CAAC,EAAE,EAAE,EAAE;YACnF,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAA;QAEF,IAAI,CAAC,GAAG,CAAC,qBAAqB,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;QAClD,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -75,8 +75,8 @@ export default class FilesUpload extends Command {
75
75
  this.log(` {"type":"figure","attrs":{"src":"storage:${result.storageId}","alt":"Description"}}`);
76
76
  this.log(``);
77
77
  }
78
- this.log(`To attach as a file to a note:`);
79
- this.log(` nabnflow notes create --title "..." --file ${args.filePath}`);
78
+ this.log(`To attach as a file to a document:`);
79
+ this.log(` nabnflow documents create --title "..." --file ${args.filePath}`);
80
80
  return result;
81
81
  }
82
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../src/commands/files/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,SAAS,CAAA;AACpC,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,MAAM,WAAW,CAAA;AAE3C,OAAO,EAAC,IAAI,EAAE,OAAO,EAAC,MAAM,aAAa,CAAA;AACzC,OAAO,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,qBAAqB,CAAA;AAE/D,MAAM,UAAU,GAA2B;IACzC,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,WAAW;IACnB,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,YAAY;IACrB,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,iBAAiB;IACzB,MAAM,EAAE,YAAY;IACpB,KAAK,EAA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';
2
+ interface SearchResult {
3
+ id: string;
4
+ title: string;
5
+ description: string | null;
6
+ type: string;
7
+ score: number;
8
+ url: string;
9
+ }
10
+ interface SearchResponse {
11
+ results: SearchResult[];
12
+ }
13
+ export default class NotesSearch extends Command {
14
+ static description: string;
15
+ static enableJsonFlag: boolean;
16
+ static examples: string[];
17
+ static args: {
18
+ query: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
19
+ };
20
+ static flags: {
21
+ limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
22
+ type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ };
24
+ run(): Promise<SearchResponse>;
25
+ }
26
+ export {};
27
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/commands/notes/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,OAAO,EAAQ,MAAM,aAAa,CAAA;AAGhD,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC9C,MAAM,CAAC,WAAW,SAAuC;IAEzD,MAAM,CAAC,cAAc,UAAO;IAE5B,MAAM,CAAC,QAAQ,WAKd;IAED,MAAM,CAAC,IAAI;;MAEV;IAED,MAAM,CAAC,KAAK;;;MASX;IAEK,GAAG,IAAI,OAAO,CAAC,cAAc,CAAC;CAyBrC"}
@@ -0,0 +1,48 @@
1
+ import { Args, Command, Flags } from '@oclif/core';
2
+ import { apiRequest } from '../../lib/client.js';
3
+ export default class NotesSearch extends Command {
4
+ static description = 'Search notes using semantic search';
5
+ static enableJsonFlag = true;
6
+ static examples = [
7
+ '<%= config.bin %> notes search "meeting notes"',
8
+ '<%= config.bin %> notes search "react hooks" --type note',
9
+ '<%= config.bin %> notes search "budget" --limit 5',
10
+ '<%= config.bin %> notes search "project ideas" --json',
11
+ ];
12
+ static args = {
13
+ query: Args.string({ description: 'Search query', required: true }),
14
+ };
15
+ static flags = {
16
+ limit: Flags.integer({
17
+ description: 'Maximum number of results to return (1–50)',
18
+ default: 15,
19
+ }),
20
+ type: Flags.string({
21
+ description: 'Filter by document type',
22
+ options: ['note', 'todo', 'link', 'file'],
23
+ }),
24
+ };
25
+ async run() {
26
+ const { args, flags } = await this.parse(NotesSearch);
27
+ const params = new URLSearchParams({ q: args.query, limit: String(flags.limit) });
28
+ if (flags.type)
29
+ params.set('type', flags.type);
30
+ const result = await apiRequest(`/api/search?${params}`);
31
+ if (result.results.length === 0) {
32
+ this.log('No results found.');
33
+ return result;
34
+ }
35
+ for (const [i, r] of result.results.entries()) {
36
+ this.log(`${i + 1}. ${r.title} [${r.type}]`);
37
+ if (r.description) {
38
+ const snippet = r.description.length > 120 ? r.description.slice(0, 120) + '…' : r.description;
39
+ this.log(` ${snippet}`);
40
+ }
41
+ this.log(` ${r.url}`);
42
+ if (i < result.results.length - 1)
43
+ this.log('');
44
+ }
45
+ return result;
46
+ }
47
+ }
48
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/commands/notes/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAA;AAe9C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC9C,MAAM,CAAC,WAAW,GAAG,oCAAoC,CAAA;IAEzD,MAA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update.d.ts","sourceRoot":"","sources":["../../../src/commands/notes/update.ts"],"names":[],"mappings":"AAGA,OAAO,EAAO,OAAO,EAAQ,MAAM,aAAa,CAAA;AAyBhD,UAAU,kBAAkB;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;CAChB;AAyCD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC9C,MAAM,CAAC,WAAW,SAAkB;IAEpC,MAAM,CAAC,cAAc,UAAO;IAE5B,MAAM,CAAC,QAAQ,WAMd;IAED,MAAM,CAAC,IAAI;;MAEV;IAED,MAAM,CAAC,KAAK;;;;;;MAgBX;IAEK,GAAG,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAmDzC"}
@@ -106,28 +106,10 @@ export default class NotesUpdate extends Command {
106
106
  body.files = null;
107
107
  }
108
108
  else if (flags.file && flags.file.length > 0) {
109
- // --file: upload new files, then append to existing files on the note
109
+ // --file: upload new files and append them to existing attachments on the note
110
110
  const token = requireAuth();
111
111
  const baseUrl = requireBaseUrl();
112
- // Fetch current note to get existing files
113
- const current = await apiRequest(`/api/notes/${args.id}`);
114
- const existingFiles = (current.note.files ?? []).map((f) => ({
115
- storageId: f.storageId,
116
- filename: f.filename,
117
- contentType: f.contentType,
118
- size: f.size,
119
- // omit url — not needed in request
120
- }));
121
- const newFiles = await Promise.all(flags.file.map((filePath) => uploadFile(filePath, token, baseUrl)));
122
- body.files = [
123
- ...existingFiles.map((f) => ({
124
- storageId: f.storageId,
125
- ...(f.filename && { filename: f.filename }),
126
- contentType: f.contentType,
127
- size: f.size,
128
- })),
129
- ...newFiles,
130
- ];
112
+ body.appendFiles = await Promise.all(flags.file.map((filePath) => uploadFile(filePath, token, baseUrl)));
131
113
  }
132
114
  const result = await apiRequest(`/api/notes/${args.id}`, {
133
115
  method: 'PUT',
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/notes/update.ts"],"names":[],"mappings":"AA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G,MAAM,OAAO,CAAC,GAAG,CAClC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CACnE,CAAA;QACH,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,UAAU,CAAqB,cAAc,IAAI,CAAC,EAAE,EAAE,EAAE;YAC3E,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAA;QAEF,IAAI,CAAC,GAAG,CAAC,iBAAiB,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;QAC9C,OAAO,MAAM,CAAA;IACf,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { Command } from '@oclif/core';
2
+ interface BaseDocument {
3
+ id: string;
4
+ type: 'note' | 'link' | 'file';
5
+ title: string;
6
+ description?: string | null;
7
+ tags: string[];
8
+ createdAt: string;
9
+ updatedAt: string;
10
+ }
11
+ interface NoteDocument extends BaseDocument {
12
+ type: 'note';
13
+ attachmentCount: number;
14
+ }
15
+ interface LinkDocument extends BaseDocument {
16
+ type: 'link';
17
+ url: string;
18
+ urlTitle?: string | null;
19
+ isPinnedInProject: boolean;
20
+ }
21
+ interface FileDocument extends BaseDocument {
22
+ type: 'file';
23
+ filename: string;
24
+ contentType: string;
25
+ size: number;
26
+ }
27
+ type ProjectDocument = NoteDocument | LinkDocument | FileDocument;
28
+ interface ListProjectDocumentsResponse {
29
+ documents: ProjectDocument[];
30
+ }
31
+ export default class ProjectsDocuments extends Command {
32
+ static description: string;
33
+ static enableJsonFlag: boolean;
34
+ static examples: string[];
35
+ static args: {
36
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
37
+ };
38
+ static flags: {
39
+ type: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
40
+ };
41
+ run(): Promise<ListProjectDocumentsResponse>;
42
+ }
43
+ export {};
44
+ //# sourceMappingURL=documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/commands/projects/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,OAAO,EAAQ,MAAM,aAAa,CAAA;AAGhD,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,YAAa,SAAQ,YAAY;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,UAAU,YAAa,SAAQ,YAAY;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,iBAAiB,EAAE,OAAO,CAAA;CAC3B;AAED,UAAU,YAAa,SAAQ,YAAY;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,KAAK,eAAe,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,CAAA;AAEjE,UAAU,4BAA4B;IACpC,SAAS,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,OAAO;IACpD,MAAM,CAAC,WAAW,SACoJ;IAEtK,MAAM,CAAC,cAAc,UAAO;IAE5B,MAAM,CAAC,QAAQ,WAMd;IAED,MAAM,CAAC,IAAI;;MAKV;IAED,MAAM,CAAC,KAAK;;MAKX;IAEK,GAAG,IAAI,OAAO,CAAC,4BAA4B,CAAC;CA6BnD"}
@@ -0,0 +1,50 @@
1
+ import { Args, Command, Flags } from '@oclif/core';
2
+ import { apiRequest } from '../../lib/client.js';
3
+ export default class ProjectsDocuments extends Command {
4
+ static description = 'List documents (notes, links, files) in a project.\n\nRun "nabnflow projects list" to get project IDs.\nDocument types: note, link, file (todos are not included).';
5
+ static enableJsonFlag = true;
6
+ static examples = [
7
+ '$ nabnflow projects list # get project IDs first',
8
+ '<%= config.bin %> projects documents <id>',
9
+ '<%= config.bin %> projects documents <id> --type note',
10
+ '<%= config.bin %> projects documents <id> --type link',
11
+ '<%= config.bin %> projects documents <id> --type file --json',
12
+ ];
13
+ static args = {
14
+ id: Args.string({
15
+ description: 'Project ID — run "nabnflow projects list" to get IDs',
16
+ required: true,
17
+ }),
18
+ };
19
+ static flags = {
20
+ type: Flags.string({
21
+ description: 'Filter by document type (note, link, or file)',
22
+ options: ['note', 'link', 'file'],
23
+ }),
24
+ };
25
+ async run() {
26
+ const { args, flags } = await this.parse(ProjectsDocuments);
27
+ const path = `/api/projects/${args.id}/documents${flags.type ? `?type=${flags.type}` : ''}`;
28
+ const result = await apiRequest(path);
29
+ const { documents } = result;
30
+ if (documents.length === 0) {
31
+ this.log('No documents found.');
32
+ return result;
33
+ }
34
+ const idWidth = Math.max(2, ...documents.map((d) => d.id.length));
35
+ const typeWidth = 4;
36
+ const titleWidth = 40;
37
+ this.log(`${'ID'.padEnd(idWidth)} ${'TYPE'.padEnd(typeWidth)} TITLE`);
38
+ this.log(`${'─'.repeat(idWidth)} ${'─'.repeat(typeWidth)} ${'─'.repeat(titleWidth)}`);
39
+ for (const doc of documents) {
40
+ let extra = '';
41
+ if (doc.type === 'link')
42
+ extra = ` ${doc.url}`;
43
+ if (doc.type === 'file')
44
+ extra = ` ${doc.filename}`;
45
+ this.log(`${doc.id.padEnd(idWidth)} ${doc.type.padEnd(typeWidth)} ${doc.title.substring(0, titleWidth)}${extra}`);
46
+ }
47
+ return result;
48
+ }
49
+ }
50
+ //# sourceMappingURL=documents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"documents.js","sourceRoot":"","sources":["../../../src/commands/projects/documents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,MAAM,aAAa,CAAA;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAA;AAqC9C,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,OAAO;IACpD,MAAM,CAAC,WAAW,GAChB,oKAAoK,CAAA;IAEtK,MAAM,CAAC,cAAc,GAAG,IAAI,CAAA;IAE5B,MAAM,CAAC,QAAQ,GAAG;QAChB,mDAAmD;QACnD,2CAA2C;QAC3C,uDAAuD;QACvD,uDAAuD;QACvD,8DAA8D;KAC/D,CAAA;IAED,MAAM,CAAC,IAAI,GAAG;QACZ,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;YACd,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IAED,MAAM,CAAC,KAAK,GAAG;QACb,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,+CAA+C;YAC5D,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAClC,CAAC;KACH,CAAA;IAED,KAAK,CAAC,GAAG;QACP,MAAM,EAAC,IAAI,EAAE,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;QACzD,MAAM,IAAI,GAAG,iBAAiB,IAAI,CAAC,EAAE,aAAa,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;QAC3F,MAAM,MAAM,GAAG,MAAM,UAAU,CAA+B,IAAI,CAAC,CAAA;QACnE,MAAM,EAAC,SAAS,EAAC,G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AC;QAED,OAAO,MAAM,CAAA;IACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nabnflow/cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Nab&Flow CLI — project management from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class Hello extends Command {
3
- static description: string;
4
- run(): Promise<void>;
5
- }
6
- //# sourceMappingURL=hello.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hello.d.ts","sourceRoot":"","sources":["../../src/commands/hello.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAA;AAEnC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACxC,MAAM,CAAC,WAAW,SAAc;IAE1B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAG3B"}
@@ -1,8 +0,0 @@
1
- import { Command } from '@oclif/core';
2
- export default class Hello extends Command {
3
- static description = 'Say hello';
4
- async run() {
5
- this.log('Hello, World!');
6
- }
7
- }
8
- //# sourceMappingURL=hello.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hello.js","sourceRoot":"","sources":["../../src/commands/hello.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAA;AAEnC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACxC,MAAM,CAAC,WAAW,GAAG,WAAW,CAAA;IAEhC,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IAC3B,CAAC"}