fluxflow-cli 1.8.1 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README-npm.md ADDED
@@ -0,0 +1,84 @@
1
+ # 🌌 Flux Flow (`fluxflow-cli`)
2
+ ![Flux Flow Logo](https://github.com/KushalRoyChowdhury/fluxflow-cli/blob/main/fluxflow.png)
3
+
4
+ ### *The High-Fidelity Agentic Terminal for the Flux Era.*
5
+
6
+ **Flux Flow** is not just another CLI—it's a high-speed, sassy, and goal-oriented CLI AI Agent powered by the latest Gemini/Gemma frontier models. Designed for developers who demand a premium UI/UX while managing complex file-system tasks, web research, and autonomous workflows.
7
+
8
+ ---
9
+
10
+ ## 🚀 Instant Ignition (No Setup Required)
11
+ You don't even need to install it. Just fire up your terminal and run:
12
+
13
+ ```bash
14
+ # Run instantly (Zero Setup)
15
+ npx fluxflow-cli
16
+
17
+ # OR Install Globally
18
+ npm install -g fluxflow-cli
19
+ fluxflow-cli
20
+ ```
21
+
22
+ *The agent will prompt you for your Gemini API Key on the first run and store it securely in an XOR-encrypted vault.* Free API Key recomemded to use Gemma 4 (Default Model).
23
+
24
+ ---
25
+
26
+ ## ✨ Why Flux Flow?
27
+
28
+ ### 🎨 **Premium Visual Sovereignty**
29
+ Experience a terminal UI that feels alive. Built with **Ink** and **React**, Flux Flow features:
30
+ - **Dynamic Status Bar**: Real-time telemetry showing your "Neural Headroom" (token usage), Thinking Level, and Session ID.
31
+
32
+ ### 👁️ **Native Multimodality**
33
+ Flux Flow can now see! Use the `view_file` tool to analyze images (JPG, PNG) or deep-dive into PDF technical papers. The agent extracts high-fidelity visual context natively, making it a true multimodal companion.
34
+
35
+ ### 📑 **Document Engineering Suite**
36
+ Need a report or a presentation? Just ask. Flux Flow features a high-fidelity "Printing Press" that generates professional, branded documents natively:
37
+ - **PDF**: Branded documents from HTML/CSS with automatic watermarking.
38
+ - **DOCX**: Native Word documents with multi-page support and automatic numbering.
39
+ - **PPTX**: High-fidelity PowerPoint presentations using native elements (selectable text, shapes) translated directly from HTML.
40
+
41
+ ### 🚑 **Self-Healing Infrastructure**
42
+ Zero setup means zero setup. On first run, Flux Flow performs an integrity check and autonomously installs its own Chromium engine if needed, ensuring features like PDF generation work 100% of the time without manual intervention.
43
+
44
+ - **Archived Terminal Flow**: See execution outputs transform from live elements into permanent conversation records.
45
+ - **Rich Aesthetics**: High-contrast, sleek design with smooth transitions and micro-animations.
46
+
47
+ ### 🧠 **The Dual-Intelligence System**
48
+ - **Flux Mode (Dev)**: High-speed, agentic problem solving with a 50-turn persistent loop for massive coding tasks.
49
+ - **Flow Mode (Chat)**: Optimized for deep research, high-quality conversation, and web-assisted reasoning.
50
+
51
+ ### 🛡️ **Digital Fortress Governance**
52
+ Security isn't an afterthought; it's a boundary.
53
+ - **External Path Hardlock**: Restricts the agent to your Current Working Directory (CWD) unless you explicitly unlock it.
54
+ - **Human-in-the-Loop (HITL)**: Every file write and terminal command requires your high-fidelity approval.
55
+ - **XOR Vaulting**: All local session histories, memories, and API keys are obfuscated and encrypted at rest.
56
+ - **Adaptive Failover**: Automatic multi-stage retry logic with high-concurrency fallback model switching (Gemini 3.1 Flash Lite) during peak API congestion.
57
+
58
+ ### 🧹 **The Background Janitor**
59
+ While you move at high speed, the Janitor follows behind—refining session titles, compressing data, and ensuring your context window remains at absolute peak performance.
60
+
61
+ ---
62
+
63
+ ## 🛠️ Key Capabilities
64
+ - **Deep File-System Interaction**: Edit, move, and refactor code across multiple files with atomic precision.
65
+ - **Real-Time Web Intelligence**: Autonomous web-searching via DuckDuckGo for live news and technical research.
66
+ - **Autonomous Project Alignment**: Automatically detects and adheres to project-specific instructions in `Agent.md`, `Skills.md`, and `Fluxflow.md` for high-fidelity alignment with your coding standards and custom workflows.
67
+ - **High-Reliability Fallback**: Automatic failover to a lighter, high-concurrency model during peak traffic to ensure zero session loss.
68
+ - **Persistent Memory**: The agent learns from your preferences and project requirements across sessions.
69
+
70
+ ---
71
+
72
+ ## ⚙️ Configuration
73
+ Type `/settings` in-app to live-configure:
74
+ - **Thinking Level**: Low, Medium, or High (Deep-Reasoning).
75
+ - **Auto-Execution**: For ultimate high-speed flow (Advanced users only).
76
+ - **Security Perimeter**: Toggle External Workspace access.
77
+
78
+ ---
79
+
80
+ ## 🏁 License
81
+ MIT © 2026 Flux Flow Team.
82
+
83
+ ---
84
+ *Forged with ⚡ and 🧬. Welcome to the FluxFlow.*
package/README.md CHANGED
@@ -1,14 +1,38 @@
1
- # 🌌 Flux Flow (`fluxflow-cli`)
2
- ![Flux Flow Logo](https://github.com/KushalRoyChowdhury/fluxflow-cli/blob/main/fluxflow.png)
1
+ # 🌊 Flux Flow
2
+ ![Flux Flow Hero](./fluxflow.png)
3
3
 
4
- ### *The High-Fidelity Agentic Terminal for the Flux Era.*
4
+ **A Beautiful, Autonomous Terminal AI Agent**
5
5
 
6
- **Flux Flow** is not just another CLI—it's a high-speed, sassy, and goal-oriented CLI AI Agent powered by the latest Gemini/Gemma frontier models. Designed for developers who demand a premium UI/UX while managing complex file-system tasks, web research, and autonomous workflows.
6
+ Flux Flow is an advanced, fully autonomous AI agent that lives directly in your terminal. Built with Node.js and [Ink](https://github.com/vadimdemedes/ink) (React for interactive command-line apps), it provides a highly responsive, component-based UI powered by a sophisticated dual-model AI architecture.
7
+
8
+ Whether you need a conversational partner or an autonomous developer that can write code, run shell commands, and read your project files, Flux Flow adapts to your needs.
7
9
 
8
10
  ---
9
11
 
10
- ## 🚀 Instant Ignition (No Setup Required)
11
- You don't even need to install it. Just fire up your terminal and run:
12
+ ## Features
13
+
14
+ - **Native Multimodality**: Flux Flow can now see! Analyze images (JPG, PNG) and PDF documents natively through the `view_file` tool with high-fidelity context retention.
15
+ - **Document Engineering Suite**: Generate professional, branded PDF, DOCX, and PPTX documents on the fly. Features native HTML-to-Office translation for selectable text, high-performance rendering, and automatic watermarking.
16
+ - **External Data Sanctuary**: Redirect your logs, history, and memories to any external path for maximum portability and privacy.
17
+ - **Responsive Terminal UI**: A gorgeous, reactive interface built with React and Ink, featuring multi-line input, status bars, modals, and diff views.
18
+ - **Dual-Model Architecture**: A primary agent interacts with you and executes tasks, while a silent background "Janitor" model handles chat summarization and long-term memory extraction without blocking the main UI.
19
+ - **Two Operating Modes**:
20
+ - **Flux (Dev Mode)**: Full system access. The agent can read/write files, execute shell commands, and run autonomous agentic loops (up to 45 iterations) to solve complex coding tasks.
21
+ - **Flow (Chat Mode)**: Focused on conversation and web research, with limited agentic loops for faster response times.
22
+ - **Advanced Memory System**: Features both temporary session context and persistent, cross-session user memories encrypted locally on your machine.
23
+ - **Agentic Tooling**: Built-in tools for smart file patching, web scraping, web searching, terminal execution and high-fidelity Office document generation (PDF/DOCX/PPTX).
24
+ - **Autonomous Project Alignment**: Automatically detects and adheres to project-specific instructions in `Agent.md`, `Skills.md`, and `Fluxflow.md` for high-fidelity coding standards and complex workflows.
25
+ - **Customizable "Thinking" Levels**: Adjust the depth of the model's reasoning process (from Minimal to Max).
26
+ - **High-Reliability Fallback**: Automatic failover to a lighter, high-concurrency model (Gemini 3.1 Flash Lite) during peak traffic to ensure 100% session persistence.
27
+
28
+ ## 🚀 Quick Start
29
+
30
+ ### Prerequisites
31
+ - [Node.js](https://nodejs.org/) (v18 or higher recommended)
32
+ - `npm`, `yarn`, or `pnpm`
33
+
34
+ ### Via NPM (Global & Instant)
35
+ You can run the agent instantly or install it globally for high-speed access:
12
36
 
13
37
  ```bash
14
38
  # Run instantly (Zero Setup)
@@ -16,69 +40,45 @@ npx fluxflow-cli
16
40
 
17
41
  # OR Install Globally
18
42
  npm install -g fluxflow-cli
19
- fluxflow-cli
43
+ fluxflow
20
44
  ```
21
45
 
22
- *The agent will prompt you for your Gemini API Key on the first run and store it securely in an XOR-encrypted vault.* Free API Key recomemded to use Gemma 4 (Default Model).
23
-
24
- ---
25
-
26
- ## ✨ Why Flux Flow?
27
-
28
- ### 🎨 **Premium Visual Sovereignty**
29
- Experience a terminal UI that feels alive. Built with **Ink** and **React**, Flux Flow features:
30
- - **Dynamic Status Bar**: Real-time telemetry showing your "Neural Headroom" (token usage), Thinking Level, and Session ID.
46
+ ### From Source (Local Development)
47
+ 1. Clone the repository and install dependencies:
48
+ ```bash
49
+ git clone <repository-url>
50
+ cd Flux-Flow
51
+ npm install
52
+ ```
31
53
 
32
- ### 👁️ **Native Multimodality**
33
- Flux Flow can now see! Use the `view_file` tool to analyze images (JPG, PNG) or deep-dive into PDF technical papers. The agent extracts high-fidelity visual context natively, making it a true multimodal companion.
54
+ 2. Start the agent:
55
+ ```bash
56
+ npm start
57
+ ```
34
58
 
35
- ### 📑 **Document Engineering Suite**
36
- Need a report or a presentation? Just ask. Flux Flow features a high-fidelity "Printing Press" that generates professional, branded documents natively:
37
- - **PDF**: Branded documents from HTML/CSS with automatic watermarking.
38
- - **DOCX**: Native Word documents with multi-page support and automatic numbering.
39
- - **PPTX**: High-fidelity PowerPoint presentations using native elements (selectable text, shapes) translated directly from HTML.
59
+ ## 📖 Documentation
40
60
 
41
- ### 🚑 **Self-Healing Infrastructure**
42
- Zero setup means zero setup. On first run, Flux Flow performs an integrity check and autonomously installs its own Chromium engine if needed, ensuring features like PDF generation work 100% of the time without manual intervention.
61
+ To keep this README concise, detailed information about specific components of Flux Flow has been split into separate documents:
43
62
 
44
- - **Archived Terminal Flow**: See execution outputs transform from live elements into permanent conversation records.
45
- - **Rich Aesthetics**: High-contrast, sleek design with smooth transitions and micro-animations.
63
+ - **[Architecture & Design](./ARCHITECTURE.md)**: Deep dive into the React/Ink rendering, the Agentic Loop, and the Janitor background process.
64
+ - **[Agent Tools & Capabilities](./TOOLS.md)**: A comprehensive list of the tools available to the agent (e.g., File I/O, Execution, Web tools).
65
+ - **[UI & Interaction Features](./UI_FEATURES.md)**: Details on commands, thinking levels, and human-in-the-loop verification.
46
66
 
47
- ### 🧠 **The Dual-Intelligence System**
48
- - **Flux Mode (Dev)**: High-speed, agentic problem solving with a 50-turn persistent loop for massive coding tasks.
49
- - **Flow Mode (Chat)**: Optimized for deep research, high-quality conversation, and web-assisted reasoning.
67
+ ## 🔒 Security & Privacy
50
68
 
51
- ### 🛡️ **Digital Fortress Governance**
52
- Security isn't an afterthought; it's a boundary.
53
- - **External Path Hardlock**: Restricts the agent to your Current Working Directory (CWD) unless you explicitly unlock it.
54
- - **Human-in-the-Loop (HITL)**: Every file write and terminal command requires your high-fidelity approval.
55
- - **XOR Vaulting**: All local session histories, memories, and API keys are obfuscated and encrypted at rest.
56
- - **Adaptive Failover**: Automatic multi-stage retry logic with high-concurrency fallback model switching (Gemini 3.1 Flash Lite) during peak API congestion.
69
+ Flux Flow runs entirely locally on your machine.
70
+ - **Global Storage**: All history, memories, and API keys are stored securely in your home directory at `~/.fluxflow`. Sensitive data is encrypted.
71
+ - **Nuclear Reset**: Use the `/reset` command to instantly purge all logs, secrets, and settings from the global storage directory.
72
+ - **Configurable Boundaries**: In Flux mode, file access can be strictly confined to the Current Working Directory, or expanded globally via settings.
73
+ - **API Keys**: You supply your own Gemini/Google AI Studio API keys.
57
74
 
58
- ### 🧹 **The Background Janitor**
59
- While you move at high speed, the Janitor follows behind—refining session titles, compressing data, and ensuring your context window remains at absolute peak performance.
60
-
61
- ---
62
-
63
- ## 🛠️ Key Capabilities
64
- - **Deep File-System Interaction**: Edit, move, and refactor code across multiple files with atomic precision.
65
- - **Real-Time Web Intelligence**: Autonomous web-searching via DuckDuckGo for live news and technical research.
66
- - **Autonomous Project Alignment**: Automatically detects and adheres to project-specific instructions in `Agent.md`, `Skills.md`, and `Fluxflow.md` for high-fidelity alignment with your coding standards and custom workflows.
67
- - **High-Reliability Fallback**: Automatic failover to a lighter, high-concurrency model during peak traffic to ensure zero session loss.
68
- - **Persistent Memory**: The agent learns from your preferences and project requirements across sessions.
69
-
70
- ---
71
-
72
- ## ⚙️ Configuration
73
- Type `/settings` in-app to live-configure:
74
- - **Thinking Level**: Low, Medium, or High (Deep-Reasoning).
75
- - **Auto-Execution**: For ultimate high-speed flow (Advanced users only).
76
- - **Security Perimeter**: Toggle External Workspace access.
77
-
78
- ---
75
+ ## 🛠️ Built With
79
76
 
80
- ## 🏁 License
81
- MIT © 2026 Flux Flow Team.
77
+ - **[React](https://react.dev/) & [Ink](https://github.com/vadimdemedes/ink)**: For the interactive CLI rendering.
78
+ - **[@google/genai](https://www.npmjs.com/package/@google/genai)**: The core AI SDK powering the agent's intelligence.
79
+ - **[chalk](https://www.npmjs.com/package/chalk) & [gradient-string](https://www.npmjs.com/package/gradient-string)**: For terminal styling and aesthetics.
80
+ - **[fs-extra](https://www.npmjs.com/package/fs-extra)**: For robust file system operations.
81
+ - **[pptxgenjs](https://www.npmjs.com/package/pptxgenjs) & [html-to-docx](https://www.npmjs.com/package/html-to-docx)**: For native Office document generation.
82
82
 
83
83
  ---
84
- *Forged with and 🧬. Welcome to the FluxFlow.*
84
+ *Created as a demonstration of highly capable AI tooling.*
package/dist/fluxflow.js CHANGED
@@ -112,7 +112,7 @@ var init_ChatLayout = __esm({
112
112
  }
113
113
  result = result.substring(0, startIdx) + result.substring(j);
114
114
  }
115
- return result.replace(/^\[TOOL_RESULT\]:\s*/gi, "").split("\n").filter((line) => !line.trim().startsWith("SUCCESS:") && !line.trim().startsWith("ERROR:")).join("\n").replace(/\[\s*(turn\s*:)?\s*(continue|finish)\s*\]/gi, "").replace(/\n\s*turn\s*:\s*(continue|finish)\s*$/gi, "").replace(/\n\nResponded on .*/g, "").replace(/\n\n\[Prompted on: .*\]/g, "").replace(/(\$?\\?\/?\\rightarrow\$?|\$\\rightarrow\$)/gi, "\u2192").replace(/(\$?\\?\/?\\leftarrow\$?|\$\\leftarrow\$)/gi, "\u2190").replace(/(\$?\\?\/?\\uparrow\$?|\$\\uparrow\$)/gi, "\u2191").replace(/(\$?\\?\/?\\downarrow\$?|\$\\downarrow\$)/gi, "\u2193").replace(/(\$?\\?\/?\\leftrightarrow\$?|\$\\leftrightarrow\$)/gi, "\u2194").trim();
115
+ return result.replace(/^\[TOOL_RESULT\]:\s*/gi, "").split("\n").filter((line) => !line.trim().startsWith("SUCCESS:") && !line.trim().startsWith("ERROR:")).join("\n").replace(/\[\s*(turn\s*:)?\s*(continue|finish)\s*\]/gi, "").replace(/\n\s*turn\s*:\s*(continue|finish)\s*$/gi, "").replace(/\n\nResponded on .*/g, "").replace(/\n\n\[Prompted on: .*\]/g, "").replace(/(\$?\\?\/?\\rightarrow\$?|\$\\rightarrow\$)/gi, "\u2192").replace(/(\$?\\?\/?\\leftarrow\$?|\$\\leftarrow\$)/gi, "\u2190").replace(/(\$?\\?\/?\\uparrow\$?|\$\\uparrow\$)/gi, "\u2191").replace(/(\$?\\?\/?\\downarrow\$?|\$\\downarrow\$)/gi, "\u2193").replace(/(\$?\\?\/?\\leftrightarrow\$?|\$\\leftrightarrow\$)/gi, "\u2194").replace(/\[\/n\]/g, "\\n").trim();
116
116
  };
117
117
  formatThinkText = (cleaned, columns = 80) => {
118
118
  if (!cleaned) return null;
@@ -732,7 +732,11 @@ NEVER GUESS A CODE, IF UNSURE READ THE FILE FIRST BEFORE EDITING IT.
732
732
 
733
733
  Prefer write_file tool to write code instead of chat by default.
734
734
 
735
- ***CRITICAL TOOL USAGE POLICY (YOU MUST FOLLOW): USE STANDARD LF FOR ACTUAL NEW LINES. USE [/n] TO PHYSICALLY WRITE THE LITERAL CHARACTERS 'backslash-n' INTO A FILE.***`.trim() : `
735
+ *** [\u{1F6A8} CRITICAL POLICY: NEWLINE CONTROL \u{1F6A8}] ***
736
+ 1. FOR ACTUAL LINE BREAKS IN FILES: Use standard LF (press Enter).
737
+ 2. TO WRITE THE LITERAL STRING '\\n' INTO A FILE: Use [/n].
738
+ \u{1F6D1} FAILURE TO FOLLOW THIS WILL BREAK CODE INDENTATION AND SYNTAX.
739
+ ***`.trim() : `
736
740
  - DEV & FILE TOOLS ARE NOT AVAILABLE IN FLOW MODE. If you need to access files, tell the user to switch to FLUX MODE (manually by user).`.trim()}
737
741
  -----------------
738
742
 
@@ -870,6 +874,7 @@ Every ${isMemoryEnabled ? "Prompt, Responses & Memories" : "Prompt & Responses"}
870
874
  -- END TEMPORAL AWARENESS --
871
875
 
872
876
  -- START FORMATTING RULES --
877
+ - CRITICAL NEWLINE PROTOCOL: When writing or updating files, you MUST use actual line breaks (LF) for structural newlines. If you need to write the literal characters '\\n' into a file, you MUST use the DSL sequence '[/n]'.
873
878
  - Structure responses VISUALLY pleasing, easy to read, and beautiful.
874
879
  - USE GFM Markdown HEAVILY.
875
880
  - Use GFM tables for structured data to keep the terminal view organized. KEEP SENTENCES IN TABLE **SHORT & CONCISE**. AND MAX 4 COLUMNS. DO NOT OVERUSE TABLES.
@@ -1650,6 +1655,7 @@ var init_view_file = __esm({
1650
1655
  content = content.slice(1);
1651
1656
  }
1652
1657
  content = content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
1658
+ content = content.replace(/\\n/g, "[/n]");
1653
1659
  const lines = content.split("\n");
1654
1660
  const totalLines = lines.length;
1655
1661
  const start = Math.max(0, start_line - 1);
@@ -1786,10 +1792,11 @@ var init_update_file = __esm({
1786
1792
  }
1787
1793
  return min;
1788
1794
  };
1789
- const targetBaseIndent = leadingContext.match(/^\s*/)[0];
1795
+ const matchBaseIndent = getMinIndent(originalMatch);
1796
+ const targetBaseIndent = leadingContext.match(/^\s*/)[0] + matchBaseIndent;
1790
1797
  const newBaseIndent = getMinIndent(newText);
1791
1798
  const delta = targetBaseIndent.length - newBaseIndent.length;
1792
- const indentChar = targetBaseIndent[0] || " ";
1799
+ const indentChar = (targetBaseIndent.match(/\s/) || originalMatch.match(/\s/) || [" "])[0];
1793
1800
  const newLines = newText.split("\n");
1794
1801
  return newLines.map((line, i) => {
1795
1802
  if (line.trim() === "" && i !== 0) return "";
@@ -4802,7 +4809,7 @@ var init_app = __esm({
4802
4809
  init_text();
4803
4810
  SESSION_START_TIME = Date.now();
4804
4811
  CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
4805
- versionFluxflow = "1.8.1";
4812
+ versionFluxflow = "1.8.3";
4806
4813
  updatedOn = "2026-05-07";
4807
4814
  ResolutionModal = ({ data, onResolve, onEdit }) => /* @__PURE__ */ React10.createElement(Box10, { flexDirection: "column", borderStyle: "round", borderColor: "magenta", paddingX: 2, paddingY: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { color: "magenta", bold: true, underline: true }, "\u{1F7E3} STEERING HINT RESOLUTION"), /* @__PURE__ */ React10.createElement(Text10, { marginTop: 1 }, "The agent already finished the task before your hint was consumed."), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1, backgroundColor: "#222", paddingX: 1, width: "100%" }, /* @__PURE__ */ React10.createElement(Text10, { italic: true, color: "gray" }, '"', data, '"')), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(Text10, { color: "cyan" }, "How would you like to proceed?")), /* @__PURE__ */ React10.createElement(Box10, { marginTop: 1 }, /* @__PURE__ */ React10.createElement(
4808
4815
  CommandMenu,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxflow-cli",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "A high-fidelity agentic terminal assistant for the Flux Era.",
5
5
  "keywords": [
6
6
  "ai",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "files": [
23
23
  "dist",
24
- "README.md",
24
+ "README-npm.md",
25
25
  "package.json",
26
26
  "ARCHITECTURE.md",
27
27
  "TOOLS.md",