fluxflow-cli 1.7.20 β 1.7.21
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 +60 -60
- package/dist/fluxflow.js +43 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,38 @@
|
|
|
1
|
-
#
|
|
2
|
-

|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
**A Beautiful, Autonomous Terminal AI Agent**
|
|
5
5
|
|
|
6
|
-
|
|
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
|
-
##
|
|
11
|
-
|
|
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
|
|
43
|
+
fluxflow
|
|
20
44
|
```
|
|
21
45
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
33
|
-
|
|
54
|
+
2. Start the agent:
|
|
55
|
+
```bash
|
|
56
|
+
npm start
|
|
57
|
+
```
|
|
34
58
|
|
|
35
|
-
|
|
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
|
-
|
|
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
|
-
- **
|
|
45
|
-
- **
|
|
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
|
-
|
|
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
|
-
|
|
52
|
-
|
|
53
|
-
- **
|
|
54
|
-
- **
|
|
55
|
-
- **
|
|
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
|
-
|
|
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
|
-
|
|
81
|
-
|
|
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
|
-
*
|
|
84
|
+
*Created as a demonstration of highly capable AI tooling.*
|
package/dist/fluxflow.js
CHANGED
|
@@ -716,7 +716,7 @@ ${mode === "Flux" ? `
|
|
|
716
716
|
2. List Files: tool:functions.list_files(path="relative/path"). Lists content of a directory.
|
|
717
717
|
3. Read Folder: tool:functions.read_folder(path="relative/path"). Detailed stats of a directory. Prefer this one over list_files.
|
|
718
718
|
4. Write File: tool:functions.write_file(path="path", content="content"). Creates/Overwrites. NO CODE BLOCKS. RETURNS: Disk verification + original content (if overwritten) for 100% reversibility. Escape your double quotes '"' using backslash.
|
|
719
|
-
5. Update File: tool:functions.update_file(path="relative/path", content_to_replace="old", content_to_add="new"). Surgical patching. RETURNS: High-fidelity visual diff and old code block. You MUST verify that the change specifically matches your intent using the returned diff. PREFFER UPDATE FILE OVER WRITE FILE if file already exists for better reversal tracking (if a file has 500+ lines, try to stick with update_file over full-rewrite). DONT WRAP UPDATE FILE CALL CONTENT IN MARKDOWN CODE BLOCKS. KEEP YOUR PATCH INDENTATION AT BASE LEVEL WITH INTERNAL NESTED INDENTATION IN YOUR PROVIDED CODE INTACT, THE SYSTEM WILL HANDLE FILE LEVEL INDENTATION.
|
|
719
|
+
5. Update File: tool:functions.update_file(path="relative/path", content_to_replace="old/fuzzy indentation matching supported", content_to_add="new"). Surgical patching. RETURNS: High-fidelity visual diff and old code block. You MUST verify that the change specifically matches your intent using the returned diff. PREFFER UPDATE FILE OVER WRITE FILE if file already exists for better reversal tracking (if a file has 500+ lines, try to stick with update_file over full-rewrite). DONT WRAP UPDATE FILE CALL CONTENT IN MARKDOWN CODE BLOCKS. KEEP YOUR PATCH INDENTATION AT BASE LEVEL WITH INTERNAL NESTED INDENTATION IN YOUR PROVIDED CODE INTACT, THE SYSTEM WILL HANDLE FILE LEVEL INDENTATION.
|
|
720
720
|
6. Write PDF: tool:functions.write_pdf(path="path", content="<html/css content>", orientation="portrait/landscape"). Generates a professional PDF document. Orientation are optional. A4 size page will be used, so any multi-page PDFs calculate your alightment and page breaks to not mess up A4 page layout. DO NOT ADD FOOTER MANUALLY, the system will handle it automatically. USE CSS TO VISUALLY BEAUTIFY THE DOCUMENT, USE full 100vh & 100vw for page area. ENSURE THE CONTENT IS NEVER BROKEN IN BETWEEN PAGES, USE PAGE BREAKS PROACTIVELY FOR A A4 PAGE LAYOUT. Keep generous margins for better redability.
|
|
721
721
|
7. Write DOCX: tool:functions.write_docx(path="path", content="<html content>"). Generates a professional Word document (.docx) from HTML. You can make multiple pages. Default Page dimentions will be A4, use proper margins and page break strategy.
|
|
722
722
|
8. Write PPTX: tool:functions.write_pptx(path="path", content="<h1 style='color: #0088CC;'>Title</h1><ul style='font-size: 14pt;'><li>Point A</li></ul>
|
|
@@ -728,7 +728,8 @@ ${mode === "Flux" ? `
|
|
|
728
728
|
|
|
729
729
|
AFTER GETTING THE TOOL RESULT, YOU MUST VERIFY THAT ITS A SUCCESS, IF IT GIVES A ERROR, TELL THE USER AND TRY TO FIX IF YOU CAN. DO NOT HALLUCINATE SUCCESS IF TOOL RETURNS ERROR.
|
|
730
730
|
NEVER GUESS A CODE, IF UNSURE READ THE FILE FIRST BEFORE EDITING IT.
|
|
731
|
-
**CRITICAL POLICY: WHEN WRITING/UPDATING FILES, ALWAYS USE ACTUAL NEW LINE CONTROL CHARACTER (LF) FOR LINE BREAKS. WHEN YOU WANT TO WRITE
|
|
731
|
+
**CRITICAL POLICY: WHEN WRITING/UPDATING FILES, ALWAYS USE ACTUAL NEW LINE CONTROL CHARACTER (LF) FOR LINE BREAKS. WHEN YOU WANT TO WRITE '
|
|
732
|
+
' IN THE FILE PROPERLY ESPACE IT WITH DOUBLE BACKSLASHES.**`.trim() : `
|
|
732
733
|
- 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()}
|
|
733
734
|
-----------------
|
|
734
735
|
|
|
@@ -1808,8 +1809,8 @@ var init_update_file = __esm({
|
|
|
1808
1809
|
diskContent = normalizedDisk;
|
|
1809
1810
|
}
|
|
1810
1811
|
const currentContent = diskContent;
|
|
1811
|
-
const adjustIndentation = (newText, originalMatch) => {
|
|
1812
|
-
if (!newText ||
|
|
1812
|
+
const adjustIndentation = (newText, originalMatch, leadingContext = "") => {
|
|
1813
|
+
if (!newText || originalMatch === void 0) return newText;
|
|
1813
1814
|
const getMinIndent = (text) => {
|
|
1814
1815
|
const lines = text.split("\n").filter((l) => l.trim() !== "");
|
|
1815
1816
|
if (lines.length === 0) return "";
|
|
@@ -1820,38 +1821,39 @@ var init_update_file = __esm({
|
|
|
1820
1821
|
}
|
|
1821
1822
|
return min;
|
|
1822
1823
|
};
|
|
1823
|
-
const originalMinIndent = getMinIndent(originalMatch);
|
|
1824
|
+
const originalMinIndent = getMinIndent(leadingContext + originalMatch);
|
|
1824
1825
|
const newMinIndent = getMinIndent(newText);
|
|
1825
|
-
const
|
|
1826
|
-
return
|
|
1827
|
-
if (line.trim() === "") return "";
|
|
1828
|
-
|
|
1829
|
-
|
|
1826
|
+
const newLines = newText.split("\n");
|
|
1827
|
+
return newLines.map((line, i) => {
|
|
1828
|
+
if (line.trim() === "" && i !== 0) return "";
|
|
1829
|
+
const currentOriginalIndent = i === 0 ? originalMinIndent.substring(Math.min(originalMinIndent.length, leadingContext.length)) : originalMinIndent;
|
|
1830
|
+
const lineIndent = line.match(/^\s*/)[0];
|
|
1831
|
+
if (lineIndent.startsWith(newMinIndent)) {
|
|
1832
|
+
return currentOriginalIndent + line.substring(newMinIndent.length);
|
|
1830
1833
|
}
|
|
1831
|
-
|
|
1834
|
+
if (newMinIndent.startsWith(lineIndent)) {
|
|
1835
|
+
const diff = newMinIndent.length - lineIndent.length;
|
|
1836
|
+
const adjustedIndent = currentOriginalIndent.substring(0, Math.max(0, currentOriginalIndent.length - diff));
|
|
1837
|
+
return adjustedIndent + line.trimStart();
|
|
1838
|
+
}
|
|
1839
|
+
return currentOriginalIndent + line.trimStart();
|
|
1832
1840
|
}).join("\n");
|
|
1833
1841
|
};
|
|
1834
|
-
let matchRegex = null;
|
|
1835
1842
|
let instances = 0;
|
|
1836
1843
|
let startPos = -1;
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1844
|
+
let matchRegex = null;
|
|
1845
|
+
const escaped = content_to_replace.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1846
|
+
if (content_to_replace !== "" && currentContent.includes(content_to_replace)) {
|
|
1847
|
+
matchRegex = new RegExp(escaped, "g");
|
|
1840
1848
|
} else {
|
|
1841
|
-
const
|
|
1842
|
-
const fuzzyPattern = escaped.trim().replace(/\s+/g, "\\s+");
|
|
1849
|
+
const fuzzyPattern = escaped.trim().replace(/\s+/g, "\\s*");
|
|
1843
1850
|
try {
|
|
1844
|
-
|
|
1845
|
-
const matches = [...currentContent.matchAll(fuzzyRegex)];
|
|
1846
|
-
if (matches.length > 0) {
|
|
1847
|
-
matchRegex = fuzzyRegex;
|
|
1848
|
-
instances = matches.length;
|
|
1849
|
-
startPos = matches[0].index;
|
|
1850
|
-
content_to_replace = matches[0][0];
|
|
1851
|
-
}
|
|
1851
|
+
matchRegex = new RegExp(fuzzyPattern, "g");
|
|
1852
1852
|
} catch (e) {
|
|
1853
1853
|
}
|
|
1854
1854
|
}
|
|
1855
|
+
const matches = matchRegex ? [...currentContent.matchAll(matchRegex)] : [];
|
|
1856
|
+
instances = matches.length;
|
|
1855
1857
|
if (instances === 0) {
|
|
1856
1858
|
const diskLen = currentContent.length;
|
|
1857
1859
|
const matchLen = content_to_replace.length;
|
|
@@ -1860,13 +1862,24 @@ var init_update_file = __esm({
|
|
|
1860
1862
|
- Match String Length (Normalized): ${matchLen}
|
|
1861
1863
|
- Check indentation/whitespace. Try re-reading the file for latest changes.`;
|
|
1862
1864
|
}
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1865
|
+
if (instances > 1) {
|
|
1866
|
+
return `ERROR: Unable to find unique match. [${instances}] instances of the specified "content_to_replace" were found in [${targetPath}]. Try providing more context (surrounding lines) to make the match unique.`;
|
|
1867
|
+
}
|
|
1868
|
+
startPos = matches[0].index;
|
|
1869
|
+
const firstMatchContent = matches[0][0];
|
|
1870
|
+
const newFileContent = currentContent.replace(matchRegex, (match, offset) => {
|
|
1871
|
+
const lineStart = currentContent.lastIndexOf("\n", offset) + 1;
|
|
1872
|
+
const leadingContext = currentContent.substring(lineStart, offset);
|
|
1873
|
+
return adjustIndentation(content_to_add, match, leadingContext);
|
|
1874
|
+
});
|
|
1875
|
+
const firstLineStart = currentContent.lastIndexOf("\n", startPos) + 1;
|
|
1876
|
+
const firstLeadingContext = currentContent.substring(firstLineStart, startPos);
|
|
1877
|
+
const finalContentToAdd = adjustIndentation(content_to_add, firstMatchContent, firstLeadingContext);
|
|
1878
|
+
const finalContentToReplace = firstMatchContent;
|
|
1866
1879
|
fs11.writeFileSync(absolutePath, newFileContent, "utf8");
|
|
1867
1880
|
const allOriginalLines = currentContent.split(/\r?\n/);
|
|
1881
|
+
const startLine = currentContent.substring(0, startPos).split(/\r?\n/).length;
|
|
1868
1882
|
const oldLines = content_to_replace.split(/\r?\n/);
|
|
1869
|
-
const newLines = content_to_add.split(/\r?\n/);
|
|
1870
1883
|
const endLine = startLine + oldLines.length - 1;
|
|
1871
1884
|
let diffText = `SUCCESS: File [${targetPath}] updated. [${instances}] instances replaced.
|
|
1872
1885
|
|
|
@@ -4766,7 +4779,7 @@ var init_app = __esm({
|
|
|
4766
4779
|
init_text();
|
|
4767
4780
|
SESSION_START_TIME = Date.now();
|
|
4768
4781
|
CHANGELOG_URL = "https://fluxflow-cli.onrender.com/changelog.html";
|
|
4769
|
-
versionFluxflow = "1.7.
|
|
4782
|
+
versionFluxflow = "1.7.21";
|
|
4770
4783
|
updatedOn = "2026-05-07";
|
|
4771
4784
|
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(
|
|
4772
4785
|
CommandMenu,
|