Code Monkey home page Code Monkey logo

lumentis's Introduction


Lumentis
npx lumentis

Generate beautiful docs from your transcripts and unstructured information with a single command.

A simple way to generate comprehensive, easy-to-skim docs from your meeting transcripts and large documents. Now supports GPT-4 Omni and Gemini Flash!

Twitter Follow

lumentis

How to use

  1. Run npx lumentis in an empty directory. That's really it. You can skip the rest of this README. (Known issue if you've run Lumentis before: clear your npx cache with npx clear-npx-cache or you might get link errors. If you don't want to, you can also run npx [email protected].) (DON'T run lumentis in the cloned repo!)
  2. Feed it a transcript, doc or notes when asked.
  3. Answer some questions about themes and audience.
  4. Pick what you like from the generated outline.
  5. Wait for your docs to be written up!
  6. Deploy your docs to Vercel by pushing your folder and following the guide.

Examples

Lumentis lets you swap models between stages. Here's some docs exactly as Lumentis generated them, no editing. I just hit Enter a few times.

  1. The Feynman Lectures on Physics - taken from the 5 hour Feynman Lectures, this is Sonnet doing the hard work for 72 cents, and Haiku writing it out for 38 cents.
  2. Designing Frictionless Interfaces for Google - Mustafa Kurtuldu gave a wonderful talk on design and UX I wish more people would watch. Now you can read it. (Do still watch it) but this is Haiku doing the whole thing for less than 8 (not eighty) cents!
  3. How the AI in Spiderman 2 works - from something that's been on my list for a long time. Opus took about $3.80 to do the whole thing.
  4. Sam Altman and Lex Friedman on GPT-5 - Sam and Lex had a conversation recently. Here's Opus doing the hard work for $2.3, and Sonnet doing the rest for $2.5. This is the expensive option.
  5. Self-Discover in DSPy with Chris Dossman - an interesting conversation between Chris Dossman and Weviate about DSPy and structured reasoning, one of the core concepts behind the framework. Eugene splurged something like $25 on this 😱 because he wanted to see how Lumentis would do at its best.
  6. John Shulman OpenAI Podcast with GPT-4o - generated for about $1 in less than 20 seconds with GPT-4 Omni, from this awesome podcast!
  7. John Shulman Podcast with GPT-4o and Gemini Flash - generated for about the same in less than 10 seconds with GPT-4 Omni and Gemini Flash.

Features

  • Cost before run: Lumentis will dynamically tell you what each operation costs.
  • Switch models: Use a smarter model to do the hard parts, and a cheaper model for long-form work. See the examples.
  • Easy to change: Ctrl+C at any time and restart. Lumentis remembers your responses, and lets you change them.
  • Everything in the open: want to know how it works? Check the .lumentis folder to see every message and response to the AI.
  • Super clean: Other than .lumentis with the prompts and state, you have a clean project to do anything with. Git/Vercel/Camera ready.
  • Super fast: (If you run with bun. Can't vouch for npm.)

How it works

Lumentis reads your transcript and:

  1. Asks you some questions to understand the themes and audience. Also to surf the latent space or things.
  2. Generates an outline and asks you to select what you want to keep.
  3. Auto generates structure from the information and further refines it with your input, while self-healing things.
  4. Generates detailed pages with visual variety, formatting and styles.

Coming soon (when I have a free night)

  1. Folders
  2. PDFs
  3. Auto-transcription with a rubber ducky
  4. Scraping entire websites
  5. Scientific papers
  6. Recursive summarisation and expansion
  7. Continuously updating docs

Development

git clone https://github.com/hrishioa/lumentis.git
cd lumentis
bun install
bun run run

Using bun because it's fast. You can also use npm or yarn if you prefer.

How to help

Try it out and let me know the URL so I can add it here! There's also some badly organized things in TODO.md that I need to get around to.

Contributors

  1. HebeHH for adding OpenAI support, folder parsing, favicons 🫶
  2. Eugene for adding biome and providing type safety fixes, and adding a fully-Opus example.
  3. Calm-Rock for fixing the repo links!

lumentis's People

Contributors

hrishioa avatar hebehh avatar calm-rock avatar

Stargazers

 avatar Serge Bedzhyk avatar nokoa avatar Yann Renard avatar  avatar Andrés Pozo Muñoz avatar Keenan Keeling avatar Marc Christenfeldt avatar Dan Churko avatar  avatar  avatar Volkan Çiçek avatar sqrt495 avatar  avatar ismailov avatar Ruslan Bel'kov avatar Serg Alex avatar  avatar Eugene Goryachev avatar Victor Zhuk avatar Ivan Goncharov avatar  avatar  avatar umko avatar Arslan Hudaygulyyev avatar Michael avatar Dmitry Kulikov avatar Danil avatar  avatar Nick Khitrov avatar wwwjle avatar Don avatar Gabrielle Decker avatar Evan avatar Lucas Jahn avatar Maximus avatar  avatar realsammyt avatar  avatar Aziz khalil avatar Mrplock avatar  avatar Amol Verma avatar Nikolaus Schlemm avatar wxm avatar Shashwat Chaturvedi avatar Aurélien Schelcher avatar Adam Rood avatar ryanyang125 avatar Huanyu avatar Nexmoe avatar  avatar Daniel Bodnar avatar William Shiao avatar Lesly Arun Franco avatar David Truong avatar Phillon Morris avatar  avatar  avatar Mohammed El Amine Bouchoucha  avatar  avatar Vadim Liventsev avatar  avatar Hitarth Sharma avatar  avatar  avatar  avatar Leo Simon avatar 千古兴亡知衡权 avatar vishal avatar Artur Shlyapnikov avatar Stephen Lizcano avatar Deblina Mukherjee avatar Sanket Dasgupta avatar  avatar  avatar  avatar Robert avatar  avatar Adam Zell avatar Gabriel Puliatti avatar Jacob Massey avatar diego avatar  avatar  avatar  avatar Andrew Starosciak avatar Anthony Crognale avatar Tije Vlam avatar João Victor avatar Pavel avatar Alex avatar kevinQTruong-bom avatar snitivan avatar  avatar  avatar mtdrs avatar  avatar Vitali Haradkou avatar Jin Zhang avatar

Watchers

Brad Jones avatar Dan avatar  avatar Zane Riley avatar  avatar  avatar Naman Singhal avatar Martin Moro avatar  avatar  avatar

lumentis's Issues

WSL Problem

Running on a macbook.

➜  lumentis npx lumentis
Need to install the following packages:
[email protected]
Ok to proceed? (y) y

/Users/nicholasmoschopoulos/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.cjs:2
"use strict";var Pt=Object.create;var Ae=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var Et=Object.getOwnPropertyNames;var It=Object.getPrototypeOf,Nt=Object.prototype.hasOwnProperty;var u=(t,e)=>Ae(t,"name",{value:e,configurable:!0});var Qe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var At=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Et(e))!Nt.call(t,s)&&s!==n&&Ae(t,s,{get:()=>e[s],enumerable:!(o=Mt(e,s))||o.enumerable});return t};var C=(t,e,n)=>(n=t!=null?Pt(It(t)):{},At(e||!t||!t.__esModule?Ae(n,"default",{value:t,enumerable:!0}):n,t));var ot=Qe((on,F)=>{"use strict";var l;F.exports.__wbg_set_wasm=function(t){l=t};var Y=new Array(128).fill(void 0);Y.push(void 0,null,!0,!1);function we(t){return Y[t]}u(we,"getObject");var j=0,fe=null;function ee(){return(fe===null||fe.byteLength===0)&&(fe=new Uint8Array(l.memory.buffer)),fe}u(ee,"getUint8Memory0");var jt=typeof TextEncoder=="undefined"?(0,F.require)("util").TextEncoder:TextEncoder,ye=new jt("utf-8"),Ft=typeof ye.encodeInto=="function"?function(t,e){return ye.encodeInto(t,e)}:function(t,e){let n=ye.encode(t);return e.set(n),{read:t.length,written:n.length}};function Q(t,e,n){if(n===void 0){let a=ye.encode(t),p=e(a.length,1)>>>0;return ee().subarray(p,p+a.length).set(a),j=a.length,p}let o=t.length,s=e(o,1)>>>0,i=ee(),c=0;for(;c<o;c++){let a=t.charCodeAt(c);if(a>127)break;i[s+c]=a}if(c!==o){c!==0&&(t=t.slice(c)),s=n(s,o,o=c+t.length*3,1)>>>0;let a=ee().subarray(s+c,s+o),p=Ft(t,a);c+=p.written,s=n(s,o,c,1)>>>0}return j=c,s}u(Q,"passStringToWasm0");function Ct(t){return t==null}u(Ct,"isLikeNone");var ge=null;function x(){return(ge===null||ge.byteLength===0)&&(ge=new Int32Array(l.memory.buffer)),ge}u(x,"getInt32Memory0");var re=Y.length;function Lt(t){t<132||(Y[t]=re,re=t)}u(Lt,"dropObject");function V(t){let e=we(t);return Lt(t),e}u(V,"takeObject");var $t=typeof TextDecoder=="undefined"?(0,F.require)("util").TextDecoder:TextDecoder,et=new $t("utf-8",{ignoreBOM:!0,fatal:!0});et.decode();function ke(t,e){return t=t>>>0,et.decode(ee().subarray(t,t+e))}u(ke,"getStringFromWasm0");function D(t){re===Y.length&&Y.push(Y.length+1);let e=re;return re=Y[e],Y[e]=t,e}u(D,"addHeapObject");function tt(t,e){try{return t.apply(this,e)}catch(n){l.__wbindgen_export_2(D(n))}}u(tt,"handleError");var he=null;function nt(){return(he===null||he.byteLength===0)&&(he=new Uint32Array(l.memory.buffer)),he}u(nt,"getUint32Memory0");function Ve(t,e){return t=t>>>0,nt().subarray(t/4,t/4+e)}u(Ve,"getArrayU32FromWasm0");function Rt(t,e){let n=e(t.length*1,1)>>>0;return ee().set(t,n/1),j=t.length,n}u(Rt,"passArray8ToWasm0");function Dt(t,e){let n=e(t.length*4,4)>>>0;return nt().set(t,n/4),j=t.length,n}u(Dt,"passArray32ToWasm0");function Xe(t,e){return t=t>>>0,ee().subarray(t/1,t/1+e)}u(Xe,"getArrayU8FromWasm0");F.exports.get_encoding=function(t,e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16),c=Q(t,l.__wbindgen_export_0,l.__wbindgen_export_1),a=j;l.get_encoding(i,c,a,D(e));var n=x()[i/4+0],o=x()[i/4+1],s=x()[i/4+2];if(s)throw V(o);return ie.__wrap(n)}finally{l.__wbindgen_add_to_stack_pointer(16)}};F.exports.encoding_for_model=function(t,e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16),c=Q(t,l.__wbindgen_export_0,l.__wbindgen_export_1),a=j;l.encoding_for_model(i,c,a,D(e));var n=x()[i/4+0],o=x()[i/4+1],s=x()[i/4+2];if(s)throw V(o);return ie.__wrap(n)}finally{l.__wbindgen_add_to_stack_pointer(16)}};var Ze=typeof FinalizationRegistry=="undefined"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>l.__wbg_tiktoken_free(t>>>0)),_e=class _e{constructor(e,n,o){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let s=Q(e,l.__wbindgen_export_0,l.__wbindgen_export_1),i=j,c=Q(o,l.__wbindgen_export_0,l.__wbindgen_export_1),a=j,p=l.tiktoken_new(s,i,D(n),c,a);return this.__wbg_ptr=p>>>0,this}get name(){try{let o=l.__wbindgen_add_to_stack_pointer(-16);l.tiktoken_name(o,this.__wbg_ptr);var e=x()[o/4+0],n=x()[o/4+1];let s;return e!==0&&(s=ke(e,n).slice(),l.__wbindgen_export_3(e,n*1,1)),s}finally{l.__wbindgen_add_to_stack_pointer(16)}}static __wrap(e){e=e>>>0;let n=Object.create(_e.prototype);return n.__wbg_ptr=e,Ze.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,Ze.unregister(this),e}free(){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let e=this.__destroy_into_raw();l.__wbg_tiktoken_free(e)}encode(e,n,o){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let y=l.__wbindgen_add_to_stack_pointer(-16),b=Q(e,l.__wbindgen_export_0,l.__wbindgen_export_1),v=j;l.tiktoken_encode(y,this.__wbg_ptr,b,v,D(n),D(o));var s=x()[y/4+0],i=x()[y/4+1],c=x()[y/4+2],a=x()[y/4+3];if(a)throw V(c);var p=Ve(s,i).slice();return l.__wbindgen_export_3(s,i*4,4),p}finally{l.__wbindgen_add_to_stack_pointer(16)}}encode_ordinary(e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16),c=Q(e,l.__wbindgen_export_0,l.__wbindgen_export_1),a=j;l.tiktoken_encode_ordinary(i,this.__wbg_ptr,c,a);var n=x()[i/4+0],o=x()[i/4+1],s=Ve(n,o).slice();return l.__wbindgen_export_3(n,o*4,4),s}finally{l.__wbindgen_add_to_stack_pointer(16)}}encode_with_unstable(e,n,o){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let a=l.__wbindgen_add_to_stack_pointer(-16),p=Q(e,l.__wbindgen_export_0,l.__wbindgen_export_1),y=j;l.tiktoken_encode_with_unstable(a,this.__wbg_ptr,p,y,D(n),D(o));var s=x()[a/4+0],i=x()[a/4+1],c=x()[a/4+2];if(c)throw V(i);return V(s)}finally{l.__wbindgen_add_to_stack_pointer(16)}}encode_single_token(e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let n=Rt(e,l.__wbindgen_export_0),o=j;return l.tiktoken_encode_single_token(this.__wbg_ptr,n,o)>>>0}decode(e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16),c=Dt(e,l.__wbindgen_export_0),a=j;l.tiktoken_decode(i,this.__wbg_ptr,c,a);var n=x()[i/4+0],o=x()[i/4+1],s=Xe(n,o).slice();return l.__wbindgen_export_3(n,o*1,1),s}finally{l.__wbindgen_add_to_stack_pointer(16)}}decode_single_token_bytes(e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");try{let i=l.__wbindgen_add_to_stack_pointer(-16);l.tiktoken_decode_single_token_bytes(i,this.__wbg_ptr,e);var n=x()[i/4+0],o=x()[i/4+1],s=Xe(n,o).slice();return l.__wbindgen_export_3(n,o*1,1),s}finally{l.__wbindgen_add_to_stack_pointer(16)}}token_byte_values(){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let e=l.tiktoken_token_byte_values(this.__wbg_ptr);return V(e)}};u(_e,"Tiktoken");var ie=_e;F.exports.Tiktoken=ie;F.exports.__wbindgen_string_get=function(t,e){if(l==null)throw new Error("tiktoken: WASM binary has not been propery initialized.");let n=we(e),o=typeof n=="string"?n:void 0;var s=Ct(o)?0:Q(o,l.__wbindgen_export_0,l.__wbindgen_export_1),i=j;x()[t/4+1]=i,x()[t/4+0]=s};F.exports.__wbindgen_object_drop_ref=function(t){V(t)};F.exports.__wbindgen_is_undefined=function(t){return we(t)===void 0};F.exports.__wbg_stringify_8887fe74e1c50d81=function(){return tt(function(t){let e=JSON.stringify(we(t));return D(e)},arguments)};F.exports.__wbindgen_error_new=function(t,e){let n=new Error(ke(t,e));return D(n)};F.exports.__wbg_parse_66d1801634e099ac=function(){return tt(function(t,e){let n=JSON.parse(ke(t,e));return D(n)},arguments)};F.exports.__wbindgen_throw=function(t,e){throw new Error(ke(t,e))}});var st=Qe(be=>{"use strict";var se=ot(),rt={};rt["./tiktoken_bg.js"]=se;var te=require("path"),Wt=require("fs"),it=__dirname.split(te.sep).reduce((t,e,n,o)=>{let s=o.slice(0,n+1).join(te.sep)+te.sep;return s.includes("node_modules"+te.sep)||t.unshift(te.join(s,"node_modules","tiktoken","","./tiktoken_bg.wasm")),t},[]);it.unshift(te.join(__dirname,"./tiktoken_bg.wasm"));var je=null;for(let t of it)try{je=Wt.readFileSync(t);break}catch(e){}if(je==null)throw new Error("Missing tiktoken_bg.wasm");var Gt=new WebAssembly.Module(je),Jt=new WebAssembly.Instance(Gt,rt);se.__wbg_set_wasm(Jt.exports);be.get_encoding=se.get_encoding;be.encoding_for_model=se.encoding_for_model;be.Tiktoken=se.Tiktoken});var R=C(require("fs"),1),Me=C(require("path"),1),St=require("@anthropic-ai/tokenizer"),m=require("@inquirer/prompts"),Tt=require("youtube-transcript");var L=C(require("fs"),1),Oe=C(require("path"),1),Ge=C(require("@anthropic-ai/sdk"),1),Je=C(require("openai"),1),yt=C(st(),1),Ue=require("@anthropic-ai/tokenizer"),_t=require("@google/generative-ai");var Fe=C(require("path"),1),W=require("@google/generative-ai"),ae=".lumentis",Ut="wizard.json",at="messages",ne=Fe.default.join(process.cwd(),ae),le=Fe.default.join(ne,Ut),lt=1e4;var X=[{name:"Claude 3 Opus",model:"claude-3-opus-20240229",smarterDescription:"This is the ferrari. Expensive but so good.",pageDescription:"Smartest - Use for expensive but awesome results!"},{name:"Claude 3 Sonnet",model:"claude-3-sonnet-20240229",smarterDescription:"Perfectly fine!",pageDescription:"Middle child - still kind of expensive"},{name:"Claude 3 Haiku",model:"claude-3-haiku-20240307",smarterDescription:"Cheapest, not preferred for this stage",pageDescription:"Fast and cheap - get what we pay for"},{name:"OpenAI GPT-4 Omni",model:"gpt-4o",smarterDescription:"Worse than Opus, far better rate limits",pageDescription:"If you like OpenAI this is the one"},{name:"Gemini 1.5 Flash",model:"gemini-1.5-flash-latest",smarterDescription:"Fast and cheap, with a lot more output length",pageDescription:"For any Google stans"}],k={"claude-3-opus-20240229":{provider:"anthropic",totalTokenLimit:2e5,outputTokenLimit:4096,inputTokensPerM:15,outputTokensPerM:75},"claude-3-sonnet-20240229":{provider:"anthropic",totalTokenLimit:2e5,outputTokenLimit:4096,inputTokensPerM:3,outputTokensPerM:15},"claude-3-haiku-20240307":{provider:"anthropic",totalTokenLimit:2e5,outputTokenLimit:4096,inputTokensPerM:.25,outputTokensPerM:1.25},"gpt-4o":{provider:"openai",tokenCountingModel:"gpt-4",totalTokenLimit:128e3,outputTokenLimit:4096,inputTokensPerM:5,outputTokensPerM:15},"gemini-1.5-flash-latest":{provider:"google",totalTokenLimit:1e6,outputTokenLimit:8192,inputTokensPerM:.75,outputTokensPerM:.53,notes:`
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

LinkError: WebAssembly.Instance(): Import #4 module="./tiktoken_bg.js" function="__wbg_parse_52202f117ec9ecfa" error: function import requires a callable
    at /Users/nicholasmoschopoulos/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.cjs:2:8336
    at /Users/nicholasmoschopoulos/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.cjs:2:275
    at Object.<anonymous> (/Users/nicholasmoschopoulos/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.cjs:2:8768)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49

Node.js v20.10.0

NPM version:

➜  lumentis npm -v
10.8.1

Internal binding error with anthropic-ai SDK

% npx lumentis
npx: installed 81 in 17.729s
internal/modules/run_main.js:54
internalBinding('errors').triggerUncaughtException(
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './resources/index' is not defined by "exports" in /Users/User/.npm/_npx/57246/lib/node_modules/lumentis/node_modules/@anthropic-ai/sdk/package.json imported from /Users/User/.npm/_npx/57246/lib/node_modules/lumentis/node_modules/@anthropic-ai/sdk/index.mjs
at throwExportsNotFound (internal/modules/esm/resolve.js:280:9)
at packageExportsResolve (internal/modules/esm/resolve.js:505:3)
at packageResolve (internal/modules/esm/resolve.js:574:16)
at moduleResolve (internal/modules/esm/resolve.js:646:14)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:692:13)
at Loader.resolve (internal/modules/esm/loader.js:97:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:243:28)
at ModuleWrap. (internal/modules/esm/module_job.js:42:40)
at link (internal/modules/esm/module_job.js:41:36) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

OpenAI support

I just tried and have been impressed by the output.
I have seen that OpenAI is in your todo, and I am wondering if there is any reason you didn't add it yet? Do you expect it to not work out of the box / require some prompt adaptations ?

Also, I did some tests with haiku and sometimes the json was wrong, may be using zod plus some retry policy would be great. Right now it just crash if format not ok.

Another WSL issue

XXX:~/lumentis$ npx lumentis
npx: installed 82 in 4.199s
Welcome to Lumentis! Let's build you some docs. Some things to keep in mind:

  • I'll be saving config files (state, LLM messages) in a folder called .lumentis in the current directory.
  • If you'd like to repeat any steps, Ctrl+C and just start over.

? Are you in a clean directory I can start saving things to? (Y/n)
readline.js:1280
throw err;
^

TypeError: Cannot read property 'name' of undefined
at isEnterKey (file:///home/XXX/.npm/_npx/81155/lib/node_modules/lumentis/node_modules/@inquirer/core/dist/esm/lib/key.mjs:18:40)
at Object.current (file:///home/XXX/.npm/_npx/81155/lib/node_modules/lumentis/node_modules/@inquirer/confirm/dist/esm/index.mjs:9:13)
at file:///home/XXX/.npm/_npx/81155/lib/node_modules/lumentis/node_modules/@inquirer/core/dist/esm/lib/use-keypress.mjs:9:20
at String.wrapped (file:///home/XXX/.npm/_npx/81155/lib/node_modules/lumentis/node_modules/@inquirer/core/dist/esm/lib/hook-engine.mjs:42:29)
at AsyncResource.runInAsyncScope (async_hooks.js:197:9)
at ReadStream.emit (events.js:412:35)
at emitKeys (internal/readline/utils.js:358:14)
at emitKeys.next ()
at ReadStream.onData (readline.js:1270:36)
at ReadStream.emit (events.js:400:28)

Tried running in codedamn and got error

Since in windows it is tough to run bun I tried codedamn, reached till final step
"And we're off! If this helps do find https://hrishioa/lumentis and drop a star!"
And then this happened
file:///home/damner/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.js:185
),p.existsSync(d.join(n,"pages"))||p.mkdirSync(d.join(n,"pages"))}i(Te,"writeConfigFiles");function xe(n,e,o){if(p.existsSync(d.join(n,"package.json"))){console.log("Looks like project directory should be set up, skipping...");return}try{Ce(${e.command} ${e.installPrefix} react react-dom next nextra nextra-theme-docs typescript @types/node,{cwd:n,stdio:"inherit"})}catch(a){throw new Error(Failed to install Requirements: ${a})}Te(n,o)}i(xe,"idempotentlySetupNextraDocs");async function ke(n,e,o,a){if(!p.existsSync(o))throw new Error(Pages folder ${o} does not exist);let m=U.find(r=>r.command===a.preferredRunnerForNextra);if(n){let r=Fe(${m.command} run devstart,{cwd:d.join(o,"..")});process.on("exit",()=>{r.kill()}),process.on("SIGINT",()=>{r.kill(),process.exit()})}for(let r=0;r<e.length;r++){let l=e[r],S=r===0?"index":l.section.permalink,y=d.join(o,...l.levels.slice(0,-1));l.levels.length&&!p.existsSync(y)&&p.mkdirSync(y,{recursive:!0}),p.existsSync(d.join(y,"_meta.json"))||p.writeFileSync(d.join(y,"_meta.json"),JSON.stringify({}));let w=JSON.parse(p.readFileSync(d.join(y,"_meta.json"),"utf-8"));w[S]||(w[S]=l.section.title,r===1&&e.find(C=>C.levels.length>1&&C.levels[0]===e[0].section.permalink)&&p.writeFileSync(d.join(o,"_meta.json"),JSON.stringify({...JSON.parse(p.readFileSync(d.join(o,"_meta.json"),"utf-8")),[e[0].section.permalink]:"Basics"})),p.writeFileSync(d.join(y,"_meta.json"),JSON.stringify(w,null,2)));let b=d.join(y,S+".mdx");if(!a.overwritePages&&p.existsSync(b)){console.log(${l.section.title} already exists, skipping...);continue}if(!a.pageGenerationModel)throw new Error("No page generation model set");await x(l.messages,a.pageGenerationModel,4096,a.anthropicKey,a.streamToConsole,${l.levels.join("->")}.mdx,void 0,b,import { Callout, Steps, Step } from "nextra-theme-docs";
^

Error: Pages folder /home/damner/code/pages does not exist
at generatePages (file:///home/damner/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.js:185:533)
at runWizard (file:///home/damner/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.js:231:10)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

API Key Problem

⠋ Please enter an Anthropic API key.
(You can leave this blank if it's already in the ENV variable.): Error: Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted
at Anthropic.validateHeaders (file:///Users/agniiiva/.npm/_npx/50847d26148f9860/node_modules/@anthropic-ai/sdk/index.mjs:65:15)
at Anthropic.buildHeaders (file:///Users/agniiiva/.npm/_npx/50847d26148f9860/node_modules/@anthropic-ai/sdk/core.mjs:235:14)
at Anthropic.buildRequest (file:///Users/agniiiva/.npm/_npx/50847d26148f9860/node_modules/@anthropic-ai/sdk/core.mjs:211:33)
at Anthropic.makeRequest (file:///Users/agniiiva/.npm/_npx/50847d26148f9860/node_modules/@anthropic-ai/sdk/core.mjs:267:44)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runClaudeInference (file:///Users/agniiiva/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.js:93:2013)
at async validate (file:///Users/agniiiva/.npm/_npx/50847d26148f9860/node_modules/lumentis/dist/app.js:203:97)

Ollama support

Any chance we can get a quick implementation to support ollama llama3?

Can't run it in WSL

I get the error 'uexpected identifier' while trying to run it in WSL. Are there any version requisites?

:~/dev/lumentis$ npx lumentis
npx: installed 81 in 7.935s
Unexpected identifier

Node version: v10.19.0
Npx version: 6.14.4

Thanks.

Windows: npx / dragging text file doesnt work / opening editor doesnt work

Hello,
tried the following:
drag and drop text file:
image

file does not get recognized.
After installing Vim, and select vim, I get prompted:
image

I get the following error:

node:events:496
      throw er; // Unhandled 'error' event
      ^

Error: spawn vim ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn vim',
  path: 'vim',
  spawnargs: [ 'C:\\Users\\mjpa\\AppData\\Local\\Temp\\tmp-5732CcCCpU3Cl5f3.txt' ]
}

Node.js v20.12.1

Any help would be appreshiated.
I am tringing to add openai provider. But I need to get it to run first ;)

Doesn't update cost counting if using JSON continuance (`outputTokens`)

JSON continuance re-calls the Anthropic caller. This means the costs are changed:

  1. The inputTokens are sent again, plus the additional outputTokens of the previous call.
  2. You get additional outputTokens back.

I don't believe call-anthropic.ts takes this into account. It should update the outputTokens with the result of the call.

call-anthropic.ts doesn't personally handle the cost calculations, so I'm not sure how we can make sure the inputTokens are properly updated for cost calculation, but either way just updating the outputTokens should help.

Windows: trying to run with bun run run

When running lumentis via bun run run, and adding a file, I get the following error:

19 |     const searchTimeoutRef = useRef(undefined);
20 |     const bounds = useMemo(() => {
21 |         const first = items.findIndex(isSelectable);
22 |         const last = items.findLastIndex(isSelectable);
23 |         if (first < 0) {
24 |             throw new ValidationError('[select prompt] No selectable choices. All choices are disabled.');
                                     ^
error: [select prompt] No selectable choices. All choices are disabled.
      at new ValidationError (:1:33)
      at C:\Users\mjpa\ProgrammierProjekte\lumentis\node_modules\@inquirer\select\dist\esm\index.mjs:24:19
      at C:\Users\mjpa\ProgrammierProjekte\lumentis\node_modules\@inquirer\select\node_modules\@inquirer\core\dist\esm\lib\use-memo.mjs:8:27
      at withPointer (C:\Users\mjpa\ProgrammierProjekte\lumentis\node_modules\@inquirer\select\node_modules\@inquirer\core\dist\esm\lib\hook-engine.mjs:63:25)
      at C:\Users\mjpa\ProgrammierProjekte\lumentis\node_modules\@inquirer\select\dist\esm\index.mjs:20:20
      at workLoop (C:\Users\mjpa\ProgrammierProjekte\lumentis\node_modules\@inquirer\select\node_modules\@inquirer\core\dist\esm\lib\create-prompt.mjs:66:42)
      at C:\Users\mjpa\ProgrammierProjekte\lumentis\node_modules\@inquirer\select\node_modules\@inquirer\core\dist\esm\lib\create-prompt.mjs:76:17
      at C:\Users\mjpa\ProgrammierProjekte\lumentis\node_modules\@inquirer\select\node_modules\@inquirer\core\dist\esm\lib\hook-engine.mjs:19:9
      at run (node:async_hooks:70:11)
      at C:\Users\mjpa\ProgrammierProjekte\lumentis\node_modules\@inquirer\select\node_modules\@inquirer\core\dist\esm\lib\create-prompt.mjs:23:13
error: script "run" exited with code 1

Rate Limit Error

The output breaks on hitting rate, is there a recommended tier? I have been trying on tier 1.

continue the documentation

is there a way to continue the documentation and add more pages? or that will rewrite the full thing?

Slow editor

For some reasons nano and vim are both horribly slow (can type only very slowly) when launched by lumentis. Nano behavior has been modified (arrow keys not working). I am on Mac + iterm2.

Keep crashing because page folder doesn't exist

188 |   pages: ReadyToGeneratePage[],
189 |   pagesFolder: string,
190 |   wizardState: WizardState
191 | ) {
192 |   if (!fs.existsSync(pagesFolder)) {
193 |     throw new Error(`Pages folder ${pagesFolder} does not exist`);
                ^
error: Pages folder /Users/pommedeterresautee/Documents/GitHub/lumentis/pages does not exist
      at /Users/pommedeterresautee/Documents/GitHub/lumentis/src/page-generator.ts:193:11
      at generatePages (/Users/pommedeterresautee/Documents/GitHub/lumentis/src/page-generator.ts:187:3)
      at /Users/pommedeterresautee/Documents/GitHub/lumentis/src/app.ts:960:9
error: script "run" exited with code 1

Just creating manually the folder after the crash makes it work.

.lumentis - balancing advanced features and sensitive data

Problem

The .lumentis folder contains metadata necessary for advanced features like diff mode, but may also include sensitive transcript data that should not be committed.

Concerns

  • Diff mode and other advanced features are must-haves
  • Transcript data can be highly sensitive and should be protected
  • The wizard is already lengthy, so adding more questions should be avoided

Tradeoffs

  • committing full .lumentis data enables advanced features but risks exposing sensitive info
  • excluding .lumentis entirely protects sensitive data but loses out on advanced features
  • splitting .lumentis balances features and protection but requires careful implementation

Solution

We will split out sensitive parts of .lumentis folder and only commit the rest:

  1. move input data out of .lumentis/wizard.json - .lumentis/sensitive-inputs/raw-data
  2. move "questions for user to answer" data out as well - .lumentis/sensitive-inputs/clarifying-questions.md
  3. add "no extra fields" zod validator for .lumentis/wizard.json to ensure the sensitive inputs can't accidentally end up in there
  4. maybe add some docs (would be cool if there was some cool to do that)

Misc

Based on discussion in this PR

serving page locally documentation

It would be good if you add very simple instructions to serve pages locally for inspection before deployment in the README.
not nodejs dev would appreciate ;)

Display errors

image

Couple of issues:

  • Input messages start repeating themselves on eg: copy+paste, or just duplicate once I suggest something
  • Errors are being surfaced to stdout when I think they're not meant to be

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.