@kitelev/exocortex-cli 15.13.0 → 15.14.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.
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// @kitelev/exocortex-cli v15.
|
|
2
|
+
// @kitelev/exocortex-cli v15.14.0
|
|
3
3
|
// CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more
|
|
4
4
|
// License: MIT
|
|
5
5
|
|
|
@@ -461,7 +461,7 @@ globstar while`,e,d,t,p,v),this.matchOne(e.slice(d),t.slice(p),n))return this.de
|
|
|
461
461
|
${t}
|
|
462
462
|
Continue? (y/n): `,s=>{n.close(),i(s.toLowerCase()==="y"||s.toLowerCase()==="yes")})})}};var qd=class{static{o(this,"CLIContainer")}static setup(){ac.container.register(Hu.DI_TOKENS.ILogger,{useFactory:o(()=>new jd("exocortex-cli"),"useFactory")}),ac.container.register(Hu.DI_TOKENS.IEventBus,{useClass:$d}),ac.container.register(Hu.DI_TOKENS.IConfiguration,{useClass:Bd}),ac.container.register(Hu.DI_TOKENS.INotificationService,{useClass:Ud})}static reset(){ac.container.clearInstances()}};function zu(r){qd.setup(),Pa.container.register(Ds.DI_TOKENS.IVaultAdapter,{useFactory:o(()=>new Ti(r),"useFactory")})}o(zu,"setupContainer");function w$(r){if(r.length===0)return"No practices found.";let e=[];for(let t of r){let n="\u2B1C";t.doneToday?n="\u2705":t.inProgressToday&&(n="\u{1F504}");let i=t.estimatedDuration?` (${t.estimatedDuration}m)`:"";e.push(`${n} ${t.label}${i}`)}return e.join(`
|
|
463
463
|
`)}o(w$,"formatPractices");function E$(r){let e=[`\u{1F4C5} Daily Review: ${r.date}`,"","\u{1F4CA} Tasks:",` Planned: ${r.plannedCount}`,` Completed: ${r.completedCount}`,` In Progress: ${r.inProgressCount}`,` Progress: ${r.completionPercentage}%`,"",`\u23F1\uFE0F Total time: ${Math.round(r.totalTimeMinutes)} minutes`];if(r.practicesDue.length>0){e.push(""),e.push(`\u{1F4CB} Practices due (${r.practicesDue.length}):`);for(let t of r.practicesDue){let n=t.estimatedDuration?` (${t.estimatedDuration}m)`:"";e.push(` \u2B1C ${t.label}${n}`)}}return e.join(`
|
|
464
|
-
`)}o(E$,"formatSummary");function Yx(){let r=new It("daily").description("Daily review operations for mobile-friendly workflow");return r.command("practices").description("List today's practices (recurring tasks)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async e=>{let t=e.format||"text";Y.setFormat(t);try{let n=(0,oc.resolve)(e.vault);if(!(0,cc.existsSync)(n))throw new jt(n);zu(n);let s=await Pa.container.resolve(Ds.DailyReviewService).getPractices();if(t==="json"){let a=$e.success({practices:s,count:s.length});console.log(JSON.stringify(a,null,2))}else console.log(w$(s))}catch(n){Y.handle(n)}}),r.command("summary").description("Show today's daily review summary").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").option("--date <value>","Date in YYYY-MM-DD format (default: today)").action(async e=>{let t=e.format||"text";Y.setFormat(t);try{let n=(0,oc.resolve)(e.vault);if(!(0,cc.existsSync)(n))throw new jt(n);zu(n);let i=Pa.container.resolve(Ds.DailyReviewService),s;if(e.date&&(s=new Date(e.date),isNaN(s.getTime())))throw new st(`Invalid date format: ${e.date}`,"exocortex daily summary --date YYYY-MM-DD",{date:e.date});let a=await i.getDailyReviewSummary(s);if(t==="json"){let c=$e.success(a);console.log(JSON.stringify(c,null,2))}else console.log(E$(a))}catch(n){Y.handle(n)}}),r.command("log").description("Quick capture an activity").argument("<label>","Activity label/description").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").option("--start","Start the task immediately (default: true)").option("--no-start","Don't start the task immediately").action(async(e,t)=>{let n=t.format||"text";Y.setFormat(n);try{let i=(0,oc.resolve)(t.vault);if(!(0,cc.existsSync)(i))throw new jt(i);zu(i);let s=Pa.container.resolve(Ds.DailyReviewService),a=t.start!==!1,c=await s.quickCapture(e,a);if(n==="json"){let u=$e.success(c);console.log(JSON.stringify(u,null,2))}else{let u=c.started?"\u{1F504}":"\u2B1C";console.log(`${u} Created: ${c.label}`),console.log(` Path: ${c.path}`)}}catch(i){Y.handle(i)}}),r.command("start").description("Start a practice (create task instance from prototype)").argument("<prototype-uid>","Practice/prototype UID to start").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async(e,t)=>{let n=t.format||"text";Y.setFormat(n);try{let i=(0,oc.resolve)(t.vault);if(!(0,cc.existsSync)(i))throw new jt(i);zu(i);let a=await Pa.container.resolve(Ds.DailyReviewService).createFromPractice({prototypeUid:e,startImmediately:!0});if(n==="json"){let c=$e.success(a);console.log(JSON.stringify(c,null,2))}else console.log(`\u{1F504} Started: ${a.label}`),console.log(` Path: ${a.path}`)}catch(i){Y.handle(i)}}),r.command("done").description("Mark a practice as done").argument("<prototype-uid>","Practice/prototype UID to mark as done").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async(e,t)=>{let n=t.format||"text";Y.setFormat(n);try{let i=(0,oc.resolve)(t.vault);if(!(0,cc.existsSync)(i))throw new jt(i);if(zu(i),await Pa.container.resolve(Ds.DailyReviewService).markPracticeDone(e),n==="json"){let a=$e.success({prototypeUid:e,status:"done"});console.log(JSON.stringify(a,null,2))}else console.log(`\u2705 Marked as done: ${e}`)}catch(i){Y.handle(i)}}),r}o(Yx,"dailyReviewCommand");var Oi=new It;Oi.name("exocortex").description("CLI tool for Exocortex knowledge management system").version("15.
|
|
464
|
+
`)}o(E$,"formatSummary");function Yx(){let r=new It("daily").description("Daily review operations for mobile-friendly workflow");return r.command("practices").description("List today's practices (recurring tasks)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async e=>{let t=e.format||"text";Y.setFormat(t);try{let n=(0,oc.resolve)(e.vault);if(!(0,cc.existsSync)(n))throw new jt(n);zu(n);let s=await Pa.container.resolve(Ds.DailyReviewService).getPractices();if(t==="json"){let a=$e.success({practices:s,count:s.length});console.log(JSON.stringify(a,null,2))}else console.log(w$(s))}catch(n){Y.handle(n)}}),r.command("summary").description("Show today's daily review summary").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").option("--date <value>","Date in YYYY-MM-DD format (default: today)").action(async e=>{let t=e.format||"text";Y.setFormat(t);try{let n=(0,oc.resolve)(e.vault);if(!(0,cc.existsSync)(n))throw new jt(n);zu(n);let i=Pa.container.resolve(Ds.DailyReviewService),s;if(e.date&&(s=new Date(e.date),isNaN(s.getTime())))throw new st(`Invalid date format: ${e.date}`,"exocortex daily summary --date YYYY-MM-DD",{date:e.date});let a=await i.getDailyReviewSummary(s);if(t==="json"){let c=$e.success(a);console.log(JSON.stringify(c,null,2))}else console.log(E$(a))}catch(n){Y.handle(n)}}),r.command("log").description("Quick capture an activity").argument("<label>","Activity label/description").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").option("--start","Start the task immediately (default: true)").option("--no-start","Don't start the task immediately").action(async(e,t)=>{let n=t.format||"text";Y.setFormat(n);try{let i=(0,oc.resolve)(t.vault);if(!(0,cc.existsSync)(i))throw new jt(i);zu(i);let s=Pa.container.resolve(Ds.DailyReviewService),a=t.start!==!1,c=await s.quickCapture(e,a);if(n==="json"){let u=$e.success(c);console.log(JSON.stringify(u,null,2))}else{let u=c.started?"\u{1F504}":"\u2B1C";console.log(`${u} Created: ${c.label}`),console.log(` Path: ${c.path}`)}}catch(i){Y.handle(i)}}),r.command("start").description("Start a practice (create task instance from prototype)").argument("<prototype-uid>","Practice/prototype UID to start").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async(e,t)=>{let n=t.format||"text";Y.setFormat(n);try{let i=(0,oc.resolve)(t.vault);if(!(0,cc.existsSync)(i))throw new jt(i);zu(i);let a=await Pa.container.resolve(Ds.DailyReviewService).createFromPractice({prototypeUid:e,startImmediately:!0});if(n==="json"){let c=$e.success(a);console.log(JSON.stringify(c,null,2))}else console.log(`\u{1F504} Started: ${a.label}`),console.log(` Path: ${a.path}`)}catch(i){Y.handle(i)}}),r.command("done").description("Mark a practice as done").argument("<prototype-uid>","Practice/prototype UID to mark as done").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: text|json","text").action(async(e,t)=>{let n=t.format||"text";Y.setFormat(n);try{let i=(0,oc.resolve)(t.vault);if(!(0,cc.existsSync)(i))throw new jt(i);if(zu(i),await Pa.container.resolve(Ds.DailyReviewService).markPracticeDone(e),n==="json"){let a=$e.success({prototypeUid:e,status:"done"});console.log(JSON.stringify(a,null,2))}else console.log(`\u2705 Marked as done: ${e}`)}catch(i){Y.handle(i)}}),r}o(Yx,"dailyReviewCommand");var Oi=new It;Oi.name("exocortex").description("CLI tool for Exocortex knowledge management system").version("15.14.0");var Qx=Oi.command("sparql").description("SPARQL query execution and cache management");Qx.addCommand(wA());Qx.addCommand(AA());Oi.addCommand(Fx());Oi.addCommand(Lx());Oi.addCommand(Mx());Oi.addCommand(jx());Oi.addCommand($x());Oi.addCommand(Gx());Oi.addCommand(Yx());Oi.parse();
|
|
465
465
|
/*! Bundled license information:
|
|
466
466
|
|
|
467
467
|
reflect-metadata/Reflect.js:
|