@flowdevcli/flowdev 1.0.10 → 1.1.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 CHANGED
@@ -1,157 +1,359 @@
1
- FLOWDEV
2
- =======
3
- The intelligent CLI for modern workflow automation.
1
+ # FLOWDEV
4
2
 
5
- FlowDev is a privacy-first, offline-capable CLI tool designed to accelerate developer workflows. From scaffolding Docker environments to generating project structures using local or cloud AI, FlowDev keeps you in the flow without leaving your terminal.
3
+ **FlowDev The Intelligent CLI for Modern Workflow Automation**
6
4
 
7
- > "The developer tool for the next generation."
5
+ FlowDev is a privacy-first, hybrid AI-powered Command Line Interface designed to accelerate and automate modern developer workflows. From infrastructure scaffolding to AI-assisted audits and documentation generation, FlowDev keeps developers productive without leaving the terminal.
8
6
 
9
- [![npm version](https://img.shields.io/npm/v/flowdev.svg?style=flat-square)](https://www.npmjs.com/package/flowdev)
10
- [![install size](https://img.shields.io/badge/install%20size-unknown-blue?style=flat-square)](https://packagephobia.com/result?p=flowdev)
11
- [![downloads](https://img.shields.io/npm/dm/flowdev.svg?style=flat-square)](https://www.npmjs.com/package/flowdev)
7
+ > “Automation without context switching.”
12
8
 
13
- Install
14
- =======
9
+ Published on npm. Designed for professional environments and production-grade workflows.
15
10
 
16
- Global Installation (Recommended)
17
- ---------------------------------
18
- To use FlowDev commands anywhere on your system:
11
+ ---
12
+
13
+ Replace the path above with your official SVG logo. SVG format is strongly recommended for clarity and scalability.
14
+
15
+ ---
16
+
17
+ ## Badges
18
+
19
+ [![npm version](https://img.shields.io/npm/v/flowdev.svg?style=flat-square)](https://www.npmjs.com/package/flowdev)
20
+ [![weekly downloads](https://img.shields.io/npm/dw/flowdev.svg?style=flat-square)](https://www.npmjs.com/package/flowdev)
21
+ [![license](https://img.shields.io/badge/license-MIT-green?style=flat-square)](./LICENSE)
22
+ [![node version](https://img.shields.io/badge/node-%3E%3D18-blue?style=flat-square)](https://nodejs.org)
23
+
24
+ ---
25
+
26
+ ## Table of Contents
27
+
28
+ - Overview
29
+ - Installation
30
+ - Core Commands
31
+ - AI Capabilities
32
+ - DevOps Utilities
33
+ - Project Scaffolding
34
+ - Feature Comparison
35
+ - Requirements
36
+ - AI Configuration (Local & Cloud)
37
+ - Versioning & Known Issues
38
+ - Maintainer Workflow
39
+ - Contributing
40
+ - License
41
+
42
+ ---
43
+
44
+ ## Overview
45
+
46
+ FlowDev provides:
47
+
48
+ • AI-assisted development
49
+ • Automated Docker and Kubernetes configuration
50
+ • Intelligent project analysis
51
+ • AI-generated documentation
52
+ • Hybrid local/cloud processing architecture
53
+ • CI-ready deterministic outputs
54
+
55
+ It is built for developers and teams who value speed, clarity, reproducibility, and terminal-native workflows.
56
+
57
+ FlowDev integrates with local AI runtimes such as Ollama and optionally supports cloud-based reasoning providers. Cloud usage is strictly opt-in.
58
+
59
+ ---
60
+
61
+ ## Installation
62
+
63
+ ### Global Installation (Recommended)
19
64
 
20
65
  ```bash
21
66
  npm install -g flowdev
67
+ ```
22
68
 
23
- Local Installation
69
+ ### Local Installation (Per Project)
24
70
 
25
- If you prefer to use it per project:
26
- Bash
71
+ ```bash
72
+ npm install --save-dev flowdev
73
+ ```
27
74
 
28
- npm install flowdev --save-dev
75
+ ### Verify Installation
29
76
 
30
- Usage
77
+ ```bash
78
+ flowdev --version
79
+ ```
31
80
 
32
- Once installed, FlowDev exposes the flowdev binary.
81
+ ---
33
82
 
34
- Check your installation:
83
+ ## Core Commands
35
84
 
36
- Bash
37
- flowdev --version
85
+ ### Display Version
38
86
 
39
- *Configure your environment (API keys & Models):
40
- Bash
41
- flowdev config
87
+ ```bash
88
+ flowdev version
89
+ ```
90
+
91
+ ---
42
92
 
93
+ ### Project Tree Visualization
94
+
95
+ ```bash
96
+ flowdev tree
97
+ ```
43
98
 
44
- *Analyze your current project:
45
- Bash
99
+ ---
100
+
101
+ ### Project Statistics Analysis
102
+
103
+ ```bash
46
104
  flowdev stats
105
+ ```
47
106
 
48
- *Generate a Docker environment:
49
- Bash
50
- flowdev dockerize
107
+ ---
108
+
109
+ ### Pattern Search (Recursive, Developer-Optimized)
110
+
111
+ ```bash
112
+ flowdev find "TODO" --ext js,ts
113
+ ```
114
+
115
+ ---
116
+
117
+ ## AI Capabilities
51
118
 
52
- Features
53
- AI & Automation (Hybrid Engine)
119
+ ### Ask AI a Technical Question
54
120
 
55
- FlowDev integrates with Ollama for offline capabilities and supports DeepSeek for high-performance cloud reasoning.
121
+ ```bash
122
+ flowdev ask "How can I optimize a React useEffect hook?"
123
+ ```
124
+
125
+ ---
56
126
 
57
- 1. Smart Assistant
58
- Ask questions about code or architecture using local or cloud models.
59
- Bash
127
+ ### Explain a Source File
128
+
129
+ ```bash
130
+ flowdev explain src/app.js
131
+ ```
60
132
 
61
- flowdev ask "How do I optimize a React useEffect hook?"
133
+ ---
62
134
 
63
- 2. Intelligent Audit
64
- Audit your code for bugs, security, and performance using AI.
65
- Bash
135
+ ### Audit Code (Security, Performance, Logic)
66
136
 
137
+ ```bash
67
138
  flowdev audit
139
+ ```
140
+
141
+ ---
142
+
143
+ ### Generate Unit Tests for a File
68
144
 
69
- 3. Automatic Documentation
70
- Generate a professional README.md for your project instantly.
71
- Bash
145
+ ```bash
146
+ flowdev test src/app.js
147
+ ```
148
+
149
+ ---
72
150
 
151
+ ### Generate README Automatically
152
+
153
+ ```bash
73
154
  flowdev readme
155
+ ```
156
+
157
+ ---
158
+
159
+ ### AI-Powered Commit Message
160
+
161
+ ```bash
162
+ flowdev commit
163
+ ```
164
+
165
+ ---
74
166
 
75
- DevOps & Infrastructure
167
+ ## DevOps Utilities
76
168
 
77
- 1. Dockerize
78
- Instantly generate production-ready Dockerfile and docker-compose.yml files.
79
- Bash
169
+ ### Generate Docker Configuration
80
170
 
171
+ ```bash
81
172
  flowdev dockerize
173
+ ```
174
+
175
+ Automatically creates:
82
176
 
83
- 2. Kubernetes (Kube)
84
- Generate Kubernetes deployment and service manifests for your application.
85
- Bash
177
+ Production-ready Dockerfile
178
+ docker-compose.yml
179
+ • Multi-stage builds
180
+ • Non-root security practices
86
181
 
182
+ ---
183
+
184
+ ### Generate Kubernetes Manifests
185
+
186
+ ```bash
87
187
  flowdev kube
188
+ ```
88
189
 
89
- Utilities
190
+ Creates deployment and service configuration files.
90
191
 
91
- 1. Generate
92
- Generate a complete project (React, Django, Vue, Angular, Express) with Git and dependencies automatically configured.
93
- Bash
192
+ ---
94
193
 
194
+ ### Generate Environment Template
195
+
196
+ ```bash
197
+ flowdev env
198
+ ```
199
+
200
+ Scans your codebase and generates a `.env.example` file.
201
+
202
+ ---
203
+
204
+ ## Project Scaffolding
205
+
206
+ ### Generate a Full Project
207
+
208
+ ```bash
95
209
  flowdev generate
210
+ ```
96
211
 
97
- 2. Find (Pattern Search)
98
- A recursive search tool optimized for developers. Ignores node_modules and binaries.
99
- Bash
212
+ Supports scaffolding for:
100
213
 
101
- flowdev find "TODO" --ext js,ts
214
+ React
215
+ • Django
216
+ • Vue
217
+ • Angular
218
+ • Express
102
219
 
103
- 3. Stats
104
- Get an instant breakdown of your project's size, file count, and language distribution.
105
- Bash
220
+ Includes Git initialization and dependency installation.
106
221
 
107
- flowdev stats
222
+ ---
108
223
 
109
- Requirements
110
- Node.js
224
+ ## Feature Comparison
111
225
 
112
- FlowDev requires Node.js v18+.
113
- Local AI (Optional)
226
+ | Capability | FlowDev | Custom Scripts | Generic CLI Tools |
227
+ |-------------------------------------|:-------:|:--------------:|:-----------------:|
228
+ | Terminal-first design | Yes | Partial | Partial |
229
+ | Local AI (offline support) | Yes | No | No |
230
+ | AI code auditing | Yes | No | Limited |
231
+ | Docker + Kubernetes generation | Yes | Partial | Varies |
232
+ | Automatic README generation | Yes | No | Limited |
233
+ | Environment template generation | Yes | No | No |
234
+ | CI-compatible structured output | Yes | Varies | Varies |
114
235
 
115
- To use local AI features, you must have Ollama running locally.
236
+ ---
116
237
 
117
- Install Ollama: ollama.com
238
+ ## Requirements
118
239
 
119
- Start the service: ollama serve
240
+ Node.js v18 or higher
241
+ • Optional: Local AI via Ollama
242
+ • Optional: Cloud AI API key
120
243
 
121
- FlowDev handles the rest.
244
+ ---
122
245
 
123
- Cloud AI (Optional)
246
+ ## AI Configuration
124
247
 
125
- To use Cloud features (DeepSeek), configure your API key via flowdev config.
126
- Documentation
127
- flowdev generate
248
+ ### Local AI (Offline Mode)
128
249
 
129
- Provisions full-stack templates. Includes a fail-safe execution wrapper that generates a flowdev-debug.log if an installation fails.
130
- flowdev audit
250
+ To enable local AI features:
131
251
 
132
- Uses AI to scan for security vulnerabilities and logic flaws. Perfect for pre-commit checks.
133
- flowdev dockerize
252
+ 1. Install Ollama
253
+ 2. Start the service:
134
254
 
135
- Generates optimized configurations using multi-stage builds and non-root security practices.
136
- flowdev env
255
+ ```bash
256
+ ollama serve
257
+ ```
258
+
259
+ FlowDev will automatically detect and use the local runtime.
260
+
261
+ ---
262
+
263
+ ### Cloud AI
264
+
265
+ To enable cloud-based reasoning:
266
+
267
+ ```bash
268
+ flowdev config
269
+ ```
270
+
271
+ Add your API key and select your preferred model.
272
+
273
+ Cloud usage is strictly opt-in and fully configurable.
274
+
275
+ ---
276
+
277
+ ## Versioning & Known Issues
278
+
279
+ ### Current Stable Version
280
+
281
+ Use version:
282
+
283
+ ```bash
284
+ >= 1.0.11
285
+ ```
286
+
287
+ ### Important Notice
288
+
289
+ Versions **1.0.5 through 1.0.9** contained critical regressions and should not be used in production environments.
290
+
291
+ If you are using one of these versions, upgrade immediately:
292
+
293
+ ```bash
294
+ npm install -g flowdev@latest
295
+ ```
296
+
297
+ ---
298
+
299
+ ## Maintainer Workflow
300
+
301
+ ### Publishing a New Version
302
+
303
+ After modifying code or documentation:
304
+
305
+ ```bash
306
+ npm version patch
307
+ npm publish
308
+ ```
309
+
310
+ ### Deprecating Faulty Versions
311
+
312
+ To deprecate a specific version:
313
+
314
+ ```bash
315
+ npm deprecate flowdev@1.0.7 "Critical bug — upgrade to >= 1.0.11"
316
+ ```
317
+
318
+ To deprecate multiple versions:
319
+
320
+ ```bash
321
+ for v in 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9; do
322
+ npm deprecate flowdev@$v "Critical bugs — upgrade to >= 1.0.11"
323
+ done
324
+ ```
325
+
326
+ To verify deprecation:
327
+
328
+ ```bash
329
+ npm view flowdev@1.0.5 deprecated
330
+ ```
331
+
332
+ ---
333
+
334
+ ## Contributing
335
+
336
+ 1. Fork the repository
337
+ 2. Create a feature branch
338
+ 3. Submit a Pull Request with clear technical description
339
+ 4. Follow semantic versioning principles
137
340
 
138
- Scans your project code and generates a .env.example file based on your environment variable usage.
139
- FAQ
140
- Does FlowDev send my code to the cloud?
341
+ Major architectural changes should begin with a proposal issue before implementation.
141
342
 
142
- By default, No. Local AI processing happens on your machine via Ollama. Cloud processing is only used if you explicitly configure it and choose a cloud model.
143
- Do I need an API Key?
343
+ ---
144
344
 
145
- No for local use. Yes if you wish to use cloud models like DeepSeek.
146
- Why "flowdev"?
345
+ ## Philosophy
147
346
 
148
- Because switching contexts breaks your flow. FlowDev keeps you in the terminal, automating the boring stuff so you can focus on the code.
149
- Changelog
347
+ FlowDev exists to reduce friction in modern development.
150
348
 
151
- See CHANGELOG.md for details on recent updates.
152
- License
349
+ Automation should enhance engineering judgment, not replace it.
350
+ Tooling should remain transparent, reproducible, and privacy-aware.
351
+ The terminal remains the most powerful development interface.
153
352
 
154
- [MIT](https://www.google.com/search?q=LICENSE)
353
+ ---
155
354
 
355
+ ## License
156
356
 
357
+ MIT License
157
358
 
359
+ © 2026 FlowDev Technologies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowdevcli/flowdev",
3
- "version": "1.0.10",
3
+ "version": "1.1.0",
4
4
  "description": "AI-powered CLI tool",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,109 @@
1
+ import { execSync } from 'node:child_process';
2
+ import chalk from 'chalk';
3
+ import ora from 'ora';
4
+ import inquirer from 'inquirer';
5
+ import { logger } from '../../utils/logger.js';
6
+ import { selectAIModel, ensureEngineReady, getAIResponse } from '../../utils/engine-check.js';
7
+
8
+ export async function commitCommand() {
9
+ try {
10
+ try {
11
+ execSync('git rev-parse --is-inside-work-tree', { stdio: 'ignore' });
12
+ } catch (e) {
13
+ logger.error('Not a git repository. Please initialize git first.');
14
+ return;
15
+ }
16
+
17
+ const diff = execSync('git diff --cached').toString();
18
+
19
+ if (!diff) {
20
+ console.log(chalk.yellow('\nNo changes staged. Please use "git add" before committing.'));
21
+ return;
22
+ }
23
+
24
+ const provider = await selectAIModel();
25
+ const spinner = ora(chalk.cyan('Analyzing staged changes...')).start();
26
+
27
+ await ensureEngineReady(spinner, provider);
28
+
29
+ const prompt = `Analyze this git diff and write a concise "Conventional Commit" message (feat, fix, docs, style, refactor, chore).
30
+ Return ONLY the message, no markdown, no quotes, no explanations.
31
+
32
+ Diff:
33
+ ${diff.substring(0, 8000)}`;
34
+
35
+ const responseStream = await getAIResponse(provider, prompt);
36
+
37
+ let suggestedMessage = "";
38
+ for await (const part of responseStream) {
39
+ suggestedMessage += part.message.content;
40
+ }
41
+
42
+ spinner.stop();
43
+ suggestedMessage = suggestedMessage.trim();
44
+
45
+ console.log(chalk.gray('\nProposed Commit Message:'));
46
+ console.log(chalk.bold.green(`"${suggestedMessage}"\n`));
47
+
48
+ const { action } = await inquirer.prompt([
49
+ {
50
+ type: 'list',
51
+ name: 'action',
52
+ message: 'Select an action for this commit:',
53
+ choices: [
54
+ { name: 'Commit this message', value: 'commit' },
55
+ { name: 'Edit message manually', value: 'edit' },
56
+ { name: 'Cancel operation', value: 'cancel' }
57
+ ]
58
+ }
59
+ ]);
60
+
61
+ if (action === 'cancel') {
62
+ console.log(chalk.gray('Commit operation cancelled.'));
63
+ return;
64
+ }
65
+
66
+ let finalMessage = suggestedMessage;
67
+ if (action === 'edit') {
68
+ const { edited } = await inquirer.prompt([{
69
+ type: 'input',
70
+ name: 'edited',
71
+ message: 'Enter your commit message:',
72
+ default: suggestedMessage
73
+ }]);
74
+ finalMessage = edited;
75
+ }
76
+
77
+ const safeMessage = finalMessage.replace(/"/g, '\\"');
78
+ execSync(`git commit -m "${safeMessage}"`, { stdio: 'ignore' });
79
+
80
+ console.log(chalk.green('Changes committed successfully.'));
81
+
82
+ const { pushAction } = await inquirer.prompt([
83
+ {
84
+ type: 'confirm',
85
+ name: 'pushAction',
86
+ message: 'Do you want to push these changes to the remote repository?',
87
+ default: false
88
+ }
89
+ ]);
90
+
91
+ if (pushAction) {
92
+ const pushSpinner = ora(chalk.cyan('Pushing to remote...')).start();
93
+ try {
94
+
95
+ execSync('git push', { stdio: 'pipe' });
96
+ pushSpinner.succeed(chalk.green('Changes pushed to remote successfully.'));
97
+ } catch (pushErr) {
98
+ pushSpinner.fail(chalk.red('Push operation failed.'));
99
+ const stderr = pushErr.stderr ? pushErr.stderr.toString() : pushErr.message;
100
+ console.log(chalk.yellow(`\nGit output:\n${stderr.trim()}`));
101
+ }
102
+ }
103
+
104
+ } catch (error) {
105
+ const spinner = ora();
106
+ if (spinner.isSpinning) spinner.stop();
107
+ logger.error(`Commit error: ${error.message}`);
108
+ }
109
+ }
package/src/core/cli.js CHANGED
@@ -36,6 +36,7 @@ import { testCommand } from '../commands/ai/test.js';
36
36
  import { updateCommand } from '../commands/system/update.js';
37
37
  import { readmeCommand } from '../commands/ai/readme.js';
38
38
  import { configCommand } from '../commands/config.js'
39
+ import { commitCommand } from '../commands/git/commit.js';
39
40
 
40
41
 
41
42
  const require = createRequire(import.meta.url);
@@ -138,6 +139,11 @@ export function setupCLI() {
138
139
  .description('Automatically generate a README.md for the project')
139
140
  .action(readmeCommand);
140
141
 
142
+ program
143
+ .command('commit')
144
+ .description('Generate an AI-powered commit message based on staged changes')
145
+ .action(commitCommand);
146
+
141
147
  program
142
148
  .command('config')
143
149
  .description('Configure AI models (API keys, settings)')