fluxflow-cli 3.20.2 → 3.21.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/README.md +151 -139
- package/dist/chunks/ai-CQ6R662V.js +1 -0
- package/dist/chunks/ai-OX4W3MY2.js +1 -0
- package/dist/chunks/app-A6JFAZBR.js +220 -0
- package/dist/chunks/app-AHIXABRK.js +220 -0
- package/dist/chunks/app-EKHVG5CH.js +220 -0
- package/dist/chunks/app-GY2S4P3O.js +220 -0
- package/dist/chunks/app-WWNOUK7Q.js +220 -0
- package/dist/chunks/chunk-56EJGQU3.js +1 -0
- package/dist/chunks/chunk-5ORPFMKW.js +3 -0
- package/dist/chunks/chunk-6DHFEWGX.js +1 -0
- package/dist/chunks/chunk-7WH5DREO.js +1 -0
- package/dist/chunks/chunk-D67A52ZR.js +802 -0
- package/dist/chunks/chunk-M3G4NWZ2.js +3 -0
- package/dist/chunks/chunk-PK33OTVD.js +802 -0
- package/dist/chunks/chunk-RTGBM2SA.js +27 -0
- package/dist/chunks/chunk-SGZ2OI72.js +1 -0
- package/dist/chunks/chunk-SIINYZWE.js +1 -0
- package/dist/chunks/chunk-Y6SLVHK3.js +1 -0
- package/dist/chunks/export-JZFBZGGZ.js +1 -0
- package/dist/chunks/export-OFKMKWAS.js +1 -0
- package/dist/chunks/paths-HYQFU6D2.js +1 -0
- package/dist/chunks/paths-NXN6XAEU.js +1 -0
- package/dist/chunks/secrets-GN7OAYL7.js +1 -0
- package/dist/chunks/secrets-NCPPS7DR.js +1 -0
- package/dist/chunks/settings-DCF6DTL6.js +1 -0
- package/dist/chunks/settings-IY24HSRP.js +1 -0
- package/dist/chunks/subagent_state-3D5ZJCLX.js +1 -0
- package/dist/chunks/subagent_state-N77JX7MX.js +1 -0
- package/dist/cli.js +58 -0
- package/dist/entry.js +22 -0
- package/dist/package.json +78 -0
- package/package.json +7 -6
- package/dist/fluxflow.js +0 -26952
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import{d as $}from"./chunk-SGZ2OI72.js";import O from"fs-extra";import T from"path";var C=a=>{if(!a)return[];let u=[],h=/\[tool:(.*?)\((.*?)\)\]/g,i=0,s;for(;(s=h.exec(a))!==null;){if(s.index>i){let t=a.slice(i,s.index);t.trim()&&u.push({type:"output",content:t})}u.push({type:"tool",toolName:s[1],args:s[2]}),i=h.lastIndex}if(i<a.length){let t=a.slice(i);t.trim()&&u.push({type:"output",content:t})}return u},b=async(a,u,h=process.cwd())=>{let i=`export-fluxflow-${a}.txt`,s=T.join(h,i),t=[],c=!1;for(let g=0;g<u.length;g++){let l=u[g];if(l&&!(l.role==="system"||l.isMeta||l.isLogo||String(l.id).startsWith("welcome"))){if(l.role==="user"){let e=l.text||"";e=e.replace(/\s*\[Prompted on:.*?\]/g,"").trim(),t.length>0&&t.push(""),t.push("[USER]"),t.push(e),c=!1}else if(l.role==="think"){c||(t.push(""),t.push("[AGENT]"),c=!0);let e=(l.text||"").replace(/\[\[\s*turn\s*:\s*(continue|finish)\s*\]\]/gi,"").replace(/\[\[END\]\]/gi,"").replace(/\[\[TOOL RESULTS\]\]/gi,"").replace(/\[TOOL RESULTS\]/gi,"").replace(/\[TOOL RESULT\]/gi,"").trim();e&&(t.push("[thoughts]"),t.push(e))}else if(l.role==="agent"){c||(t.push(""),t.push("[AGENT]"),c=!0);let e=C(l.text||"");for(let p of e)if(p.type==="output"){let m=p.content.replace(/\[\[\s*turn\s*:\s*(continue|finish)\s*\]\]/gi,"").replace(/\[\[END\]\]/gi,"").replace(/\[\[TOOL RESULTS\]\]/gi,"").replace(/\[TOOL RESULTS\]/gi,"").replace(/\[TOOL RESULT\]/gi,"").trim();m&&(t.push("[output]"),t.push(m))}else p.type==="tool"&&(t.push("[tool]"),t.push(`${p.toolName} ${p.args}`))}}}let E=t.join(`
|
|
2
|
+
`);return await O.writeFile(s,E,"utf8"),{exportFile:i,exportPath:s,totalLines:t.length}},j=(a,u="FluxFlow",h=null)=>{if(!a||!a.trim())return[];let i=a.split(`
|
|
3
|
+
`),s=[],t=[],c=/^\s*(?:CRITICAL\s+ERROR|ERROR|DEBUG|SEARCH|PUPPETEER|WARN|WARNING|INFO)\b/i,E=/^\s*-{3,}\s*$/,g=!1;for(let e of i)if(c.test(e)){g=!0;break}if(!g){let e=a.trim();if(!e)return[];let p=h?new Date(h).toLocaleString():"Unknown Time",m=/\bjanitor\b/i.test(e)?"Memory":u;return[{timestamp:p,level:"ERROR",source:m,message:e}]}for(let e of i)E.test(e)?t.length>0&&(s.push(t.join(`
|
|
4
|
+
`).trim()),t=[]):c.test(e)?(t.length>0&&(s.push(t.join(`
|
|
5
|
+
`).trim()),t=[]),t.push(e)):(t.length>0||e.trim())&&t.push(e);t.length>0&&s.push(t.join(`
|
|
6
|
+
`).trim());let l=[];for(let e of s){if(!e)continue;let p=e.split(`
|
|
7
|
+
`).map(r=>r.trimEnd()),m=p[0]||"";if(!/\bERROR\b/i.test(e))continue;let d=m.match(/\[(.*?)\]/),n=d?d[1]:null,f="ERROR";/CRITICAL\s+ERROR/i.test(m)&&(f="CRITICAL ERROR");let o="";if(d){let r=m.indexOf("]:");r!==-1?o=m.substring(r+2).trim():o=m.replace(c,"").replace(/\[.*?\]/,"").replace(/^:\s*/,"").trim()}else o=m.replace(c,"").replace(/^:\s*/,"").trim();if(p.length>1){let r=p.slice(1).join(`
|
|
8
|
+
`).trim();r&&(o=o?`${o}
|
|
9
|
+
${r}`:r)}if(o){let r=/\bjanitor\b/i.test(e)?"Memory":u;l.push({timestamp:n||(h?new Date(h).toLocaleString():"Unknown Time"),level:f,source:r,message:o})}}return l},U=async(a=process.cwd())=>{let u=`fluxflow-error-${Date.now()}.txt`,h=T.join(a,u),i=async n=>{if(!await O.pathExists(n))return[];let f=await O.readdir(n),o=[];for(let r of f){let R=T.join(n,r),x=await O.stat(R);if(x.isDirectory()){let L=await i(R);o=o.concat(L)}else(r.endsWith(".log")||r.endsWith(".txt"))&&o.push({path:R,mtime:x.mtimeMs})}return o},s=await i($),t=[];for(let n of s)try{let f=await O.readFile(n.path,"utf8");if(f.trim()){let o=n.path.replace(/\\/g,"/").toLowerCase(),r="FluxFlow";o.includes("/janitor")||o.includes("janitor")?r="Memory":!o.includes("/agent")&&!o.includes("agent")&&(r="Other");let R=j(f,r,n.mtime);t=t.concat(R)}}catch{}let c=[],E=new Set;for(let n of t){let f=`${n.source}::${n.timestamp}::${n.message.trim()}`;E.has(f)||(E.add(f),c.push(n))}let g=c.filter(n=>n.source==="FluxFlow"),l=c.filter(n=>n.source==="Memory"),e=c.filter(n=>n.source!=="FluxFlow"&&n.source!=="Memory"),p=(n,f,o)=>{let r=["================================================================================",`${n} (${f.length})`,"================================================================================"].join(`
|
|
10
|
+
`);if(f.length===0)return`${r}
|
|
11
|
+
No ${o} error entries found.`;let R=f.map((x,L)=>{let S=`[${o} #${L+1}] ${x.timestamp} (${x.level})`,y=x.message.split(`
|
|
12
|
+
`).map(F=>` ${F}`).join(`
|
|
13
|
+
`);return`${S}
|
|
14
|
+
${y}`});return`${r}
|
|
15
|
+
|
|
16
|
+
`+R.join(`
|
|
17
|
+
|
|
18
|
+
--------------------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
`)},m=["================================================================================","FLUXFLOW ERROR LOGS EXPORT",`Exported At : ${new Date().toLocaleString()}`,`Total Errors: ${c.length} (FluxFlow: ${g.length} | Memory: ${l.length}${e.length>0?` | Other: ${e.length}`:""})`,"================================================================================",""].join(`
|
|
21
|
+
`),w=[p("SECTION 1: FLUXFLOW ERRORS",g,"FluxFlow"),p("SECTION 2: MEMORY ERRORS",l,"Memory")];e.length>0&&w.push(p("SECTION 3: OTHER SYSTEM ERRORS",e,"Other"));let d=m+w.join(`
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
`)+`
|
|
25
|
+
`;return await O.writeFile(h,d,"utf8"),{exportFile:u,exportPath:h,entryCount:c.length,fluxflowCount:g.length,memoryCount:l.length}},N=async(a,{chatId:u,messages:h})=>{let i=(a[1]||"chat").toLowerCase();if(i==="chat")return{success:!0,type:"chat",message:`[EXPORT] Current chat exported to "${(await b(u,h)).exportFile}"`};if(i==="logs"){let s=await U();return{success:!0,type:"logs",message:`[EXPORT LOGS] Exported ${s.entryCount} error log entries (FluxFlow: ${s.fluxflowCount}, Memory: ${s.memoryCount}) to "${s.exportFile}"`}}else return{success:!1,message:`[EXPORT USAGE] Unknown subcommand "${i}". Options:
|
|
26
|
+
\u2022 /export chat current
|
|
27
|
+
\u2022 /export logs error`}};export{C as a,b,j as c,U as d,N as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import f from"os";import t from"path";import a from"fs";import E from"crypto";var i=t.join(f.homedir(),".fluxflow"),x=t.join(i,"settings.json"),j=null;try{if(a.existsSync(x)){let s=a.readFileSync(x,"utf8").trim(),n;if(s.startsWith("{"))n=JSON.parse(s);else{let e=s.split(":");if(e.length===2){let _=Buffer.from(e[0],"hex"),I=e[1],l=E.createHash("sha256").update("fluxflow-cli-sanctuary-key").digest(),c=E.createDecipheriv("aes-256-cbc",l,_),p=c.update(I,"hex","utf8");p+=c.final("utf8"),n=JSON.parse(p)}}if(n){let e=n.systemSettings||{};e.useExternalData&&e.externalDataPath&&(j=e.externalDataPath)}}}catch{}var r=j||i,S=t.join(r,"logs"),o=t.join(r,"secret"),F=t.join(o,"history.json"),R=t.join(o,"history"),u=t.join(i,"usage.json"),y=t.join(o,"usage.json"),T=t.join(o,"memories.json"),A=t.join(o,"memory-temp.json"),d=t.join(o,"temp-memory-chat.json"),g=t.join(r,"backups"),O=t.join(o,"ledger.json"),M=t.join(o,"ledgerAdvance.json"),C=t.join(o,"active_tx.json"),P=t.join(o,"path.json"),G=t.join(o,"context.json"),H=t.join(r,"parsers");export{i as a,x as b,r as c,S as d,o as e,F as f,R as g,u as h,y as i,T as j,A as k,d as l,g as m,O as n,M as o,C as p,P as q,G as r,H as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import c from"fs";import a from"path";import i from"crypto";var y=66,p=!0,d=r=>{let n=Buffer.isBuffer(r)?r:Buffer.from(r),t=Buffer.alloc(n.length);for(let e=0;e<n.length;e++)t[e]=n[e]^y;return t},f="aes-256-cbc",u=i.createHash("sha256").update("fluxflow-cli-sanctuary-key").digest(),h=r=>{if(p)return r;let n=i.randomBytes(16),t=i.createCipheriv(f,u,n),e=t.update(r,"utf8","hex");return e+=t.final("hex"),n.toString("hex")+":"+e},l=r=>{if(p)return r;let n=r.split(":");if(n.length!==2)throw new Error("Invalid AES format");let t=Buffer.from(n[0],"hex"),e=n[1],o=i.createDecipheriv(f,u,t),s=o.update(e,"hex","utf8");return s+=o.final("utf8"),s},m=(r,n={})=>{try{if(!c.existsSync(r))return n;let t=c.readFileSync(r),e=t.toString("utf8").trim();if(e.startsWith("{")||e.startsWith("["))return JSON.parse(e);try{let s=l(e);return JSON.parse(s)}catch{}let o=d(t).toString("utf8");if(o.startsWith("{")||o.startsWith("["))return JSON.parse(o);throw new Error("Unsupported or corrupt encryption format")}catch(t){return console.error(`Vault Read Error [${a.basename(r)}]:`,t.message),n}},x=(r,n)=>{try{let t=a.dirname(r);c.existsSync(t)||c.mkdirSync(t,{recursive:!0});let e=JSON.stringify(n,null,2),o=h(e);c.writeFileSync(r,o,"utf8")}catch(t){console.error(`Vault Write Error [${a.basename(r)}]:`,t.message)}},w=m,A=x;export{h as a,l as b,m as c,x as d,w as e,A as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports);var l=(b,a,c,e)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&f(b,d,{get:()=>a[d],enumerable:!(e=h(a,d))||e.enumerable});return b};var n=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-RTGBM2SA.js";import"./chunk-SGZ2OI72.js";import"./chunk-6DHFEWGX.js";export{b as exportCurrentChat,d as exportErrorLogs,e as handleExport,a as parseAgentText,c as parseLogEntries};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-RTGBM2SA.js";import"./chunk-SGZ2OI72.js";import"./chunk-Y6SLVHK3.js";export{b as exportCurrentChat,d as exportErrorLogs,e as handleExport,a as parseAgentText,c as parseLogEntries};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"./chunk-SGZ2OI72.js";import"./chunk-6DHFEWGX.js";export{p as ACTIVE_TX_FILE,m as BACKUPS_DIR,r as CONTEXT_FILE,c as DATA_DIR,a as FLUXFLOW_DIR,g as HISTORY_DIR,f as HISTORY_FILE,o as LEDGER_ADVANCE_FILE,n as LEDGER_FILE,d as LOGS_DIR,j as MEMORIES_FILE,s as PARSER_DIR,q as PATHS_FILE,e as SECRET_DIR,b as SETTINGS_FILE,l as TEMP_MEM_CHAT_FILE,k as TEMP_MEM_FILE,i as USAGE_FILE,h as USAGE_FILE_OLD};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"./chunk-SGZ2OI72.js";import"./chunk-Y6SLVHK3.js";export{p as ACTIVE_TX_FILE,m as BACKUPS_DIR,r as CONTEXT_FILE,c as DATA_DIR,a as FLUXFLOW_DIR,g as HISTORY_DIR,f as HISTORY_FILE,o as LEDGER_ADVANCE_FILE,n as LEDGER_FILE,d as LOGS_DIR,j as MEMORIES_FILE,s as PARSER_DIR,q as PATHS_FILE,e as SECRET_DIR,b as SETTINGS_FILE,l as TEMP_MEM_CHAT_FILE,k as TEMP_MEM_FILE,i as USAGE_FILE,h as USAGE_FILE_OLD};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-7WH5DREO.js";import"./chunk-SIINYZWE.js";import"./chunk-SGZ2OI72.js";import"./chunk-Y6SLVHK3.js";export{a as getAPIKey,b as getProviderAPIKey,f as getSearchSecrets,d as getSecret,k as removeAPIKey,j as removeSecret,g as saveAPIKey,c as saveProviderAPIKey,i as saveSearchId,h as saveSearchKey,e as saveSecret};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-7WH5DREO.js";import"./chunk-SIINYZWE.js";import"./chunk-SGZ2OI72.js";import"./chunk-6DHFEWGX.js";export{a as getAPIKey,b as getProviderAPIKey,f as getSearchSecrets,d as getSecret,k as removeAPIKey,j as removeSecret,g as saveAPIKey,c as saveProviderAPIKey,i as saveSearchId,h as saveSearchKey,e as saveSecret};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as a,h as b}from"./chunk-5ORPFMKW.js";import"./chunk-SIINYZWE.js";import"./chunk-SGZ2OI72.js";import"./chunk-Y6SLVHK3.js";export{a as loadSettings,b as saveSettings};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as a,h as b}from"./chunk-M3G4NWZ2.js";import"./chunk-SIINYZWE.js";import"./chunk-SGZ2OI72.js";import"./chunk-6DHFEWGX.js";export{a as loadSettings,b as saveSettings};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-56EJGQU3.js";import"./chunk-6DHFEWGX.js";export{c as addPendingNudge,e as clearPendingNudges,d as consumePendingNudges,b as pendingSubagentNudges,a as subagentProgress};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-56EJGQU3.js";import"./chunk-Y6SLVHK3.js";export{c as addPendingNudge,e as clearPendingNudges,d as consumePendingNudges,b as pendingSubagentNudges,a as subagentProgress};
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{spawn as ae}from"child_process";import{fileURLToPath as L}from"url";import re from"os";import ne from"dotenv";ne.config({quiet:!0});var ie=re.totalmem(),O=ie/(1024*1024),le=.5,ce=Math.floor(O*le),R=process.argv.slice(2),N=R.indexOf("--allocation"),a=N!==-1?parseInt(R[N+1],10):NaN;!isNaN(a)&&a<64&&(console.error(`
|
|
3
|
+
[ERROR] Allocation value '${a} MB' is too low. Minimum: 64 MB, Recommended: 4096 MB.
|
|
4
|
+
`),process.exit(1));var w=Math.floor(O*.75),me=!isNaN(a)&&a>0?Math.min(a,w):Math.max(1536,Math.min(32768,ce)),ue=L(import.meta.url).endsWith(".js");if(ue&&!process.execArgv.some(o=>o.includes("max-old-space-size")))Number.isNaN(a)||(console.log(`
|
|
5
|
+
[MEMORY] Starting with: '${a>w?w:a} MB' Allocation${a>w?" (Max allowed: '"+w+" MB')":""}. Please Wait...`),await new Promise(l=>setTimeout(l,5e3))),ae(process.execPath,[`--max-old-space-size=${me}`,"--expose-gc","--max-semi-space-size=1",L(import.meta.url),...process.argv.slice(2)],{stdio:"inherit"}).on("exit",l=>process.exit(l||0));else{let o=process.argv.slice(2),l=o.includes("--help")&&o[o.indexOf("--help")+1]==="commands",M=o.includes("--help")&&!l,T=o.includes("--version")||o.includes("-v"),A=o[0]==="--update",P=o[0]==="--export";if(T||M||l||A||P){let t=await import("fs"),p=await import("path"),{fileURLToPath:g}=await import("url"),C=p.join(p.dirname(g(import.meta.url)),"../package.json"),c=JSON.parse(t.readFileSync(C,"utf8")).version;if(P){let f=(o[1]||"").toLowerCase();if(f==="error"||f==="logs")try{let{exportErrorLogs:r}=await import("./chunks/export-JZFBZGGZ.js"),n=await r();console.log(`[EXPORT LOGS] Exported ${n.entryCount} error log entries (FluxFlow: ${n.fluxflowCount}, Memory: ${n.memoryCount}) to "${n.exportFile}"`),process.exit(0)}catch(r){console.error(`[EXPORT ERROR] Failed to export error logs: ${r.message}`),process.exit(1)}else console.error(`[EXPORT ERROR] Invalid export target "${o[1]||""}". --export only supports 'error'.
|
|
6
|
+
Usage: fluxflow --export error`),process.exit(1)}if(T&&(console.log(`v${c}`),process.exit(0)),M&&(console.log(`FluxFlow CLI Arguments:
|
|
7
|
+
--mode <flux|flow> Set startup mode (flux: Agent / flow: Chat)
|
|
8
|
+
--model <model_name> Set startup AI model
|
|
9
|
+
--key <key@provider> Set API key and provider
|
|
10
|
+
--provider <google|deepseek|openrouter> Override default provider
|
|
11
|
+
--thinking <Fast|Low|Medium|High|xHigh> Set startup thinking level
|
|
12
|
+
--memory <on|off> Toggle memory system
|
|
13
|
+
--resume <session_id> Resume a previous session
|
|
14
|
+
--allocation <mb> Override Node.js max-old-space-size in MB (default: auto)
|
|
15
|
+
--package <npm|pnpm|yarn|bun> Set package manager for updates
|
|
16
|
+
--auto-del <1d|7d|30d> Set history auto-deletion timeframe
|
|
17
|
+
--auto-exec <on|off> Toggle permission for autonomous command execution
|
|
18
|
+
--yolo <on|off> Same as --auto-exec
|
|
19
|
+
--external-access <on|off> Toggle permission for file reads outside CWD
|
|
20
|
+
-v, --version Show installed version
|
|
21
|
+
--help Show this help menu
|
|
22
|
+
--help commands Show available /commands
|
|
23
|
+
--playground Launch in Playground mode (fixed session, CWD: DATA_DIR/playground)
|
|
24
|
+
--export error Export system error logs to fluxflow-error-<timestamp>.txt
|
|
25
|
+
--update check Check for new updates
|
|
26
|
+
--update check latest Show the latest version available on npm
|
|
27
|
+
--update [latest] Update the app to the latest version (latest is default)`),process.exit(0)),l&&(console.log(`FluxFlow Chat /Commands:
|
|
28
|
+
/quit Exit and shutdown Flux
|
|
29
|
+
/help Show help menu
|
|
30
|
+
/clear Clear terminal screen
|
|
31
|
+
/resume Load previous session
|
|
32
|
+
/compress Summarize and compress chat history
|
|
33
|
+
/truncate Truncate tool results in chat history
|
|
34
|
+
/revert Revert codebase back to a checkpoint
|
|
35
|
+
/save Force save current chat
|
|
36
|
+
/export [chat|logs] Export chat session or system error logs
|
|
37
|
+
/chats List all chat sessions
|
|
38
|
+
/btw <question> Send raw inquiry to the agent mid-turn
|
|
39
|
+
/image setup key <default|custom> Configure image API key strategy
|
|
40
|
+
/budget Set or View budget limits
|
|
41
|
+
/mode <flux|flow> Toggle Flux/Flow modes
|
|
42
|
+
/thinking <Fast|Low|Medium|High|xHigh> Set AI reasoning depth
|
|
43
|
+
/model <model_name> Switch Model for Agent
|
|
44
|
+
/wildcard-tooling Use if the model lacks Tooling Capability
|
|
45
|
+
/provider Select AI Provider
|
|
46
|
+
/settings Configure system preferences
|
|
47
|
+
/theme Customize UI color theme
|
|
48
|
+
/key Manage API keys
|
|
49
|
+
/profile Edit developer persona
|
|
50
|
+
/memory Manage agent memory
|
|
51
|
+
/stats Show session usage
|
|
52
|
+
/reset Wipe all project data
|
|
53
|
+
/about Project info & credits
|
|
54
|
+
/changelog View latest updates
|
|
55
|
+
/docs View documentation
|
|
56
|
+
/fluxflow init Create FluxFlow.md template
|
|
57
|
+
/update check Check for new version
|
|
58
|
+
/update latest Install latest release`),process.exit(0)),A){let f=o[1]||"latest";if(f==="check"){let r=o[2]==="latest";try{let d=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;d||(console.error("Error: Could not retrieve latest version."),process.exit(1)),console.log(r?`Latest version: v${d}`:d!==c?`A new version of FluxFlow is available: v${d} (current: v${c}). Run "fluxflow --update latest" to upgrade.`:`FluxFlow is up to date (v${c}).`)}catch(n){console.error("Error checking for updates:",n.message),process.exit(1)}process.exit(0)}else if(f==="latest"){console.log("Checking latest version and settings...");try{let s=(await(await fetch("https://registry.npmjs.org/fluxflow-cli",{cache:"no-store"})).json())["dist-tags"]?.latest;s||(console.error("Error: Could not retrieve latest version."),process.exit(1)),s===c&&(console.log(`FluxFlow is already up to date (v${c}).`),process.exit(0));let d=async()=>{let e=(await import("react")).default,{useState:$}=e,{render:z,Box:u,Text:x}=await import("ink"),G=(await import("ink-select-input")).default,J=(await import("ink-text-input")).default;return new Promise(q=>{let X=[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn",value:"yarn"},{label:"Bun",value:"bun"},{label:"Custom Command",value:"custom"}],K=({label:h,isSelected:y})=>e.createElement(u,{width:"100%"},e.createElement(x,{bold:y},"\u2514\u2500 ",y?"\x1B[32m\u25CF\x1B[0m":"\u25CB"," ",h)),F,Q=()=>{let[h,y]=$("select"),[ee,oe]=$(""),te=b=>{b.value==="custom"?y("custom"):B({manager:b.value})},se=b=>{B({manager:"custom",customCommand:b})};return h==="custom"?e.createElement(u,{flexDirection:"column",marginY:1},e.createElement(u,{marginBottom:1},e.createElement(x,{color:"magenta",bold:!0},"\u{1F527} Enter custom update command:")),e.createElement(u,{flexDirection:"row"},e.createElement(x,{color:"cyan",bold:!0}," \u276F "),e.createElement(J,{value:ee,onChange:oe,onSubmit:se})),e.createElement(u,{marginTop:1},e.createElement(x,{color:"gray",dimColor:!0,italic:!0}," (Press Enter to confirm)"))):e.createElement(u,{flexDirection:"column",marginY:1},e.createElement(u,{marginBottom:1},e.createElement(x,{color:"magenta",bold:!0},"\u{1F4E6} Select a package manager for the update:")),e.createElement(G,{items:X,onSelect:te,itemComponent:K,indicatorComponent:()=>null}))},B=h=>{F&&F(),q(h)},{unmount:Z}=z(e.createElement(Q,null));F=Z})},i,I="",v;try{let{loadSettings:e}=await import("./chunks/settings-IY24HSRP.js");v=await e(),i=v?.systemSettings?.updateManager||v?.updateManager}catch{}if(!i){let e=await d();i=e.manager,I=e.customCommand}let m="";i==="pnpm"?m=`pnpm add -g fluxflow-cli@${s}`:i==="bun"?m=`bun add -g fluxflow-cli@${s}`:i==="yarn"?m=`yarn global add fluxflow-cli@${s}`:i==="custom"?m=I||v?.customUpdateCommand||`npm install -g fluxflow-cli@${s}`:m=`npm install -g fluxflow-cli@${s}`,console.log(`Updating FluxFlow to v${s} using ${i}...`),console.log(`Running: ${m}`);let{execSync:Y}=await import("child_process");Y(m,{stdio:"inherit"}),console.log(`\x1B[32m\u2705 Update successful! FluxFlow updated to v${s}.\x1B[0m`)}catch(r){console.error("\x1B[31m\u274C Update failed:\x1B[0m",r.message),process.exit(1)}process.exit(0)}else console.error("Unknown update command. Available options: --update, --update check, --update check latest, --update latest"),process.exit(1)}}let{default:D}=await import("react"),{render:U}=await import("ink"),{default:_}=await import("./chunks/app-WWNOUK7Q.js");process.env.NODE_NO_WARNINGS="1";let j=["cuimp","Found existing binary","Binary verified","curl.exe not found","Falling back to .bat file","DeprecationWarning"],H=console.log,W=console.warn,V=console.error,S=t=>{let p=t.map(String).join(" ");return j.some(g=>p.includes(g))};console.log=(...t)=>!S(t)&&H(...t),console.warn=(...t)=>!S(t)&&W(...t),console.error=(...t)=>!S(t)&&V(...t),process.stdout.write("\x1B[2J\x1B[3J\x1B[H"),process.stdout.isTTY&&(process.stdout.write("\x1B]0;FluxFlow\x07"),process.stdout.write("\x1B]633;P;TerminalTitle=FluxFlow\x07"),process.stdout.write("\x1B[?2004h"));let E=()=>{process.stdout.isTTY&&process.stdout.write("\x1B[?2004l")};if(process.on("exit",E),["SIGINT","SIGTERM","SIGHUP"].forEach(t=>{process.once(t,()=>{E(),process.exit(0)})}),o.includes("--playground")){let t=process.cwd();process.argv.push("--original-cwd",t);let{DATA_DIR:p}=await import("./chunks/paths-HYQFU6D2.js"),g=await import("path"),C=await import("fs-extra"),k=g.default.join(p,"playground");try{C.default.ensureDirSync(k),process.chdir(k)}catch{}}U(D.createElement(_,{args:process.argv.slice(2)}),{exitOnCtrlC:!1})}
|
package/dist/entry.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import os from 'os';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { enableCompileCache } from 'node:module';
|
|
5
|
+
|
|
6
|
+
const cacheDir = path.join(os.homedir(), '.fluxflow', '.cache');
|
|
7
|
+
|
|
8
|
+
if (process.env.NODE_COMPILE_CACHE === undefined) {
|
|
9
|
+
process.env.NODE_COMPILE_CACHE = cacheDir;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (typeof enableCompileCache === 'function') {
|
|
13
|
+
try {
|
|
14
|
+
enableCompileCache(cacheDir);
|
|
15
|
+
} catch {
|
|
16
|
+
try {
|
|
17
|
+
enableCompileCache();
|
|
18
|
+
} catch {}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
await import('./cli.js');
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fluxflow-cli",
|
|
3
|
+
"version": "3.21.0",
|
|
4
|
+
"date": "2026-08-09",
|
|
5
|
+
"description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"ai",
|
|
8
|
+
"agent",
|
|
9
|
+
"terminal",
|
|
10
|
+
"cli",
|
|
11
|
+
"gemini",
|
|
12
|
+
"ink",
|
|
13
|
+
"flux",
|
|
14
|
+
"fluxflow"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/KushalRoyChowdhury/fluxflow-cli.git"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=24",
|
|
23
|
+
"vscode": "^1.90.0"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"README.md",
|
|
28
|
+
"package.json",
|
|
29
|
+
"ARCHITECTURE.md",
|
|
30
|
+
"TOOLS.md",
|
|
31
|
+
"UI_FEATURES.md",
|
|
32
|
+
"cat.txt",
|
|
33
|
+
".puppeteerrc.cjs",
|
|
34
|
+
"flux-flow.cjs",
|
|
35
|
+
"model_config.json"
|
|
36
|
+
],
|
|
37
|
+
"type": "module",
|
|
38
|
+
"bin": {
|
|
39
|
+
"fluxflow-cli": "dist/entry.js",
|
|
40
|
+
"fluxflow": "dist/entry.js"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"start": "tsx ./src/cli.jsx",
|
|
44
|
+
"build": "esbuild ./src/cli.jsx --bundle --platform=node --format=esm --splitting --minify --tree-shaking=true --chunk-names=chunks/[name]-[hash] --outdir=./dist --external:react --external:ink --external:chalk --external:fs-extra --external:gradient-string --external:ink-text-input --external:ink-select-input --external:@google/genai --external:zod --external:nanoid --external:puppeteer --external:pdf-lib --external:node-pty --external:html-to-docx --external:typescript --external:ws --external:web-tree-sitter --external:diff --external:dotenv --external:fast-glob --external:turndown --external:turndown-plugin-gfm && copy package.json dist\\package.json && copy src\\entry.js dist\\entry.js"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@google/genai": "^1.52.0",
|
|
48
|
+
"chalk": "^5.6.2",
|
|
49
|
+
"diff": "^9.0.0",
|
|
50
|
+
"dotenv": "^17.4.2",
|
|
51
|
+
"fast-glob": "^3.3.3",
|
|
52
|
+
"fs-extra": "^11.3.4",
|
|
53
|
+
"gradient-string": "^3.0.0",
|
|
54
|
+
"html-to-docx": "^1.8.0",
|
|
55
|
+
"ink": "^7.0.1",
|
|
56
|
+
"ink-gradient": "^4.0.1",
|
|
57
|
+
"ink-select-input": "^6.2.0",
|
|
58
|
+
"ink-spinner": "^5.0.0",
|
|
59
|
+
"ink-text-input": "^6.0.0",
|
|
60
|
+
"minimatch": "^10.2.6",
|
|
61
|
+
"nanoid": "^5.1.9",
|
|
62
|
+
"node-pty": "^1.1.0",
|
|
63
|
+
"ollama": "^0.6.3",
|
|
64
|
+
"pdf-lib": "^1.17.1",
|
|
65
|
+
"puppeteer": "24.43.1",
|
|
66
|
+
"react": "^19.2.5",
|
|
67
|
+
"turndown": "^7.2.4",
|
|
68
|
+
"turndown-plugin-gfm": "^1.0.2",
|
|
69
|
+
"web-tree-sitter": "^0.25.10",
|
|
70
|
+
"ws": "^8.21.0",
|
|
71
|
+
"zod": "^4.3.6"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@types/react": "^19.2.14",
|
|
75
|
+
"esbuild": "^0.28.0",
|
|
76
|
+
"tsx": "^4.21.0"
|
|
77
|
+
}
|
|
78
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluxflow-cli",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"date": "2026-08-
|
|
3
|
+
"version": "3.21.0",
|
|
4
|
+
"date": "2026-08-09",
|
|
5
5
|
"description": "A High-Fidelity Agentic CLI with Sub-Agents for the Flux Era.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ai",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"url": "git+https://github.com/KushalRoyChowdhury/fluxflow-cli.git"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": ">=
|
|
22
|
+
"node": ">=24",
|
|
23
23
|
"vscode": "^1.90.0"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
],
|
|
37
37
|
"type": "module",
|
|
38
38
|
"bin": {
|
|
39
|
-
"fluxflow-cli": "dist/
|
|
40
|
-
"fluxflow": "dist/
|
|
39
|
+
"fluxflow-cli": "dist/entry.js",
|
|
40
|
+
"fluxflow": "dist/entry.js"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"start": "tsx ./src/cli.jsx",
|
|
44
|
-
"build": "esbuild ./src/cli.jsx --bundle --platform=node --format=esm --
|
|
44
|
+
"build": "esbuild ./src/cli.jsx --bundle --platform=node --format=esm --splitting --minify --tree-shaking=true --chunk-names=chunks/[name]-[hash] --outdir=./dist --external:react --external:ink --external:chalk --external:fs-extra --external:gradient-string --external:ink-text-input --external:ink-select-input --external:@google/genai --external:zod --external:nanoid --external:puppeteer --external:pdf-lib --external:node-pty --external:html-to-docx --external:typescript --external:ws --external:web-tree-sitter --external:diff --external:dotenv --external:fast-glob --external:turndown --external:turndown-plugin-gfm && copy package.json dist\\package.json && copy src\\entry.js dist\\entry.js"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@google/genai": "^1.52.0",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"ink-select-input": "^6.2.0",
|
|
58
58
|
"ink-spinner": "^5.0.0",
|
|
59
59
|
"ink-text-input": "^6.0.0",
|
|
60
|
+
"minimatch": "^10.2.6",
|
|
60
61
|
"nanoid": "^5.1.9",
|
|
61
62
|
"node-pty": "^1.1.0",
|
|
62
63
|
"ollama": "^0.6.3",
|