flamecli 0.1.7__tar.gz → 0.1.8__tar.gz
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.
- {flamecli-0.1.7/src/flamecli.egg-info → flamecli-0.1.8}/PKG-INFO +29 -36
- {flamecli-0.1.7 → flamecli-0.1.8}/README.md +27 -35
- {flamecli-0.1.7 → flamecli-0.1.8}/pyproject.toml +40 -39
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/cli/repl.py +16 -5
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/main.py +4 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/utils/context.py +9 -4
- {flamecli-0.1.7 → flamecli-0.1.8/src/flamecli.egg-info}/PKG-INFO +29 -36
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flamecli.egg-info/requires.txt +1 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/LICENSE +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/setup.cfg +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/cli/repl.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/__init__.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/api/__init__.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/api/async_client.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/api/client.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/cli/__init__.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/cli/executor.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/tools/__init__.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/tools/base.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/tools/fs.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/tools/registry.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/tools/system.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/utils/__init__.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/utils/logger.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flame/utils/prompts.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flamecli.egg-info/SOURCES.txt +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flamecli.egg-info/dependency_links.txt +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flamecli.egg-info/entry_points.txt +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/src/flamecli.egg-info/top_level.txt +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/tests/test_basic.py +0 -0
- {flamecli-0.1.7 → flamecli-0.1.8}/tests/test_tools.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flamecli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: AI-powered CLI coding assistant with API
|
|
5
5
|
Author-email: Jameson Piscitello <piscitello284@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -19,21 +19,23 @@ Requires-Dist: prompt-toolkit>=3.0.0
|
|
|
19
19
|
Requires-Dist: httpx>=0.27.0
|
|
20
20
|
Requires-Dist: pathspec>=1.0.4
|
|
21
21
|
Requires-Dist: pygments>=2.13.0
|
|
22
|
+
Requires-Dist: executor>=23.2
|
|
22
23
|
Dynamic: license-file
|
|
23
24
|
|
|
24
25
|
# 🔥 Flame - AI-Powered CLI Coding Assistant
|
|
25
26
|
|
|
26
|
-
An intelligent command-line interface (CLI) application that functions as an AI coding assistant directly in your terminal, powered by **API**.
|
|
27
|
+
An intelligent command-line interface (CLI) application that functions as an AI coding assistant directly in your terminal, powered by **your choice of API**.
|
|
27
28
|
|
|
28
29
|
## ✨ Features
|
|
29
30
|
|
|
30
|
-
- **Interactive REPL**: Continuous chat loop with full conversation context
|
|
31
|
-
- **System Awareness**: Automatically gathers context about your environment (OS, project structure, git status)
|
|
32
|
-
- **
|
|
33
|
-
- **
|
|
34
|
-
- **
|
|
35
|
-
- **
|
|
36
|
-
- **
|
|
31
|
+
- **Interactive REPL**: Continuous chat loop with full conversation context.
|
|
32
|
+
- **System Awareness**: Automatically gathers context about your environment (OS, project structure, git status, etc.).
|
|
33
|
+
- **Global Configuration**: Persistent settings (API key, model, etc.) stored globally in `~/.flame/.env`.
|
|
34
|
+
- **Real-time Streaming**: Responses stream directly into your terminal for a responsive experience.
|
|
35
|
+
- **Safe File Operations**: Create and edit files with intelligent diff previews and explicit user approval.
|
|
36
|
+
- **Terminal Execution**: Command suggestions that you can execute safely with a single keypress.
|
|
37
|
+
- **Security First**: Dangerous command detection and path validation protect your system.
|
|
38
|
+
- **Multi-turn Logic**: Full chat history maintenance for complex workflow handling.
|
|
37
39
|
|
|
38
40
|
## 🚀 Quick Start
|
|
39
41
|
|
|
@@ -45,14 +47,15 @@ An intelligent command-line interface (CLI) application that functions as an AI
|
|
|
45
47
|
|
|
46
48
|
### Installation
|
|
47
49
|
|
|
48
|
-
1. **Install via pip
|
|
50
|
+
1. **Install via pip**:
|
|
49
51
|
```bash
|
|
50
52
|
pip install flamecli
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
2. **Setup configuration**:
|
|
54
56
|
```bash
|
|
55
|
-
#
|
|
57
|
+
# Run the interactive setup to configure your API key, base URL, and model.
|
|
58
|
+
# This will save your settings globally in ~/.flame/.env
|
|
56
59
|
flame --setup
|
|
57
60
|
```
|
|
58
61
|
|
|
@@ -76,17 +79,7 @@ Expected output:
|
|
|
76
79
|
flame
|
|
77
80
|
```
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
82
|
-
┃ 🔥 Flame - AI Coding Assistant ┃
|
|
83
|
-
┃ Powered by API ┃
|
|
84
|
-
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
85
|
-
|
|
86
|
-
Type 'help' for commands, 'exit' to quit
|
|
87
|
-
|
|
88
|
-
You: _
|
|
89
|
-
```
|
|
82
|
+
Happy coding! 🔥
|
|
90
83
|
|
|
91
84
|
## 💬 Usage Examples
|
|
92
85
|
|
|
@@ -225,12 +218,12 @@ flame/
|
|
|
225
218
|
┌──────┴──────┬────────────┐
|
|
226
219
|
▼ ▼ ▼
|
|
227
220
|
┌────────┐ ┌──────────┐ ┌─────────┐
|
|
228
|
-
│
|
|
229
|
-
│
|
|
230
|
-
│
|
|
231
|
-
│•
|
|
232
|
-
│•
|
|
233
|
-
│•
|
|
221
|
+
│ API │ │FileExecutor │ │CommandExecutor
|
|
222
|
+
│ Client │ │(executor.py)│ │(executor.py)
|
|
223
|
+
│ │ │ │ │
|
|
224
|
+
│• Stream │ │• Safe file │ │• Command checks
|
|
225
|
+
│• Validate│ │ ops │ │• Approval prompts
|
|
226
|
+
│• Async │ │• Diffs │ │• History
|
|
234
227
|
└────────┬────────┘ └──────────────┘ └─────────────┘
|
|
235
228
|
│
|
|
236
229
|
SystemContext
|
|
@@ -274,20 +267,21 @@ flame/
|
|
|
274
267
|
|
|
275
268
|
### Environment Variables
|
|
276
269
|
|
|
277
|
-
|
|
270
|
+
Flame uses a `.env` file for configuration. The `--setup` command handles this for you, but you can also manually edit the file at `~/.flame/.env`.
|
|
278
271
|
|
|
279
272
|
```env
|
|
280
273
|
# Required: Your API key
|
|
281
|
-
FLAME_API_KEY=
|
|
274
|
+
FLAME_API_KEY=your_key_here
|
|
282
275
|
|
|
283
|
-
# Optional: API endpoint (
|
|
284
|
-
FLAME_API_BASE_URL=https://api.example.com/
|
|
276
|
+
# Optional: API endpoint (defaults to a standard proxy)
|
|
277
|
+
FLAME_API_BASE_URL=https://api.example.com/v1
|
|
285
278
|
|
|
286
|
-
#
|
|
287
|
-
FLAME_MODEL=
|
|
279
|
+
# AI model to use
|
|
280
|
+
FLAME_MODEL=google/gemini-3-flash-preview
|
|
288
281
|
|
|
289
|
-
#
|
|
282
|
+
# CLI settings
|
|
290
283
|
CLI_THEME=dark
|
|
284
|
+
CLI_STREAM_SPEED=normal
|
|
291
285
|
DEBUG=false
|
|
292
286
|
```
|
|
293
287
|
|
|
@@ -410,4 +404,3 @@ Need help? Try:
|
|
|
410
404
|
---
|
|
411
405
|
|
|
412
406
|
**Made with 🔥 by API Community**
|
|
413
|
-
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# 🔥 Flame - AI-Powered CLI Coding Assistant
|
|
2
2
|
|
|
3
|
-
An intelligent command-line interface (CLI) application that functions as an AI coding assistant directly in your terminal, powered by **API**.
|
|
3
|
+
An intelligent command-line interface (CLI) application that functions as an AI coding assistant directly in your terminal, powered by **your choice of API**.
|
|
4
4
|
|
|
5
5
|
## ✨ Features
|
|
6
6
|
|
|
7
|
-
- **Interactive REPL**: Continuous chat loop with full conversation context
|
|
8
|
-
- **System Awareness**: Automatically gathers context about your environment (OS, project structure, git status)
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
7
|
+
- **Interactive REPL**: Continuous chat loop with full conversation context.
|
|
8
|
+
- **System Awareness**: Automatically gathers context about your environment (OS, project structure, git status, etc.).
|
|
9
|
+
- **Global Configuration**: Persistent settings (API key, model, etc.) stored globally in `~/.flame/.env`.
|
|
10
|
+
- **Real-time Streaming**: Responses stream directly into your terminal for a responsive experience.
|
|
11
|
+
- **Safe File Operations**: Create and edit files with intelligent diff previews and explicit user approval.
|
|
12
|
+
- **Terminal Execution**: Command suggestions that you can execute safely with a single keypress.
|
|
13
|
+
- **Security First**: Dangerous command detection and path validation protect your system.
|
|
14
|
+
- **Multi-turn Logic**: Full chat history maintenance for complex workflow handling.
|
|
14
15
|
|
|
15
16
|
## 🚀 Quick Start
|
|
16
17
|
|
|
@@ -22,14 +23,15 @@ An intelligent command-line interface (CLI) application that functions as an AI
|
|
|
22
23
|
|
|
23
24
|
### Installation
|
|
24
25
|
|
|
25
|
-
1. **Install via pip
|
|
26
|
+
1. **Install via pip**:
|
|
26
27
|
```bash
|
|
27
28
|
pip install flamecli
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
2. **Setup configuration**:
|
|
31
32
|
```bash
|
|
32
|
-
#
|
|
33
|
+
# Run the interactive setup to configure your API key, base URL, and model.
|
|
34
|
+
# This will save your settings globally in ~/.flame/.env
|
|
33
35
|
flame --setup
|
|
34
36
|
```
|
|
35
37
|
|
|
@@ -53,17 +55,7 @@ Expected output:
|
|
|
53
55
|
flame
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
59
|
-
┃ 🔥 Flame - AI Coding Assistant ┃
|
|
60
|
-
┃ Powered by API ┃
|
|
61
|
-
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
62
|
-
|
|
63
|
-
Type 'help' for commands, 'exit' to quit
|
|
64
|
-
|
|
65
|
-
You: _
|
|
66
|
-
```
|
|
58
|
+
Happy coding! 🔥
|
|
67
59
|
|
|
68
60
|
## 💬 Usage Examples
|
|
69
61
|
|
|
@@ -202,12 +194,12 @@ flame/
|
|
|
202
194
|
┌──────┴──────┬────────────┐
|
|
203
195
|
▼ ▼ ▼
|
|
204
196
|
┌────────┐ ┌──────────┐ ┌─────────┐
|
|
205
|
-
│
|
|
206
|
-
│
|
|
207
|
-
│
|
|
208
|
-
│•
|
|
209
|
-
│•
|
|
210
|
-
│•
|
|
197
|
+
│ API │ │FileExecutor │ │CommandExecutor
|
|
198
|
+
│ Client │ │(executor.py)│ │(executor.py)
|
|
199
|
+
│ │ │ │ │
|
|
200
|
+
│• Stream │ │• Safe file │ │• Command checks
|
|
201
|
+
│• Validate│ │ ops │ │• Approval prompts
|
|
202
|
+
│• Async │ │• Diffs │ │• History
|
|
211
203
|
└────────┬────────┘ └──────────────┘ └─────────────┘
|
|
212
204
|
│
|
|
213
205
|
SystemContext
|
|
@@ -251,20 +243,21 @@ flame/
|
|
|
251
243
|
|
|
252
244
|
### Environment Variables
|
|
253
245
|
|
|
254
|
-
|
|
246
|
+
Flame uses a `.env` file for configuration. The `--setup` command handles this for you, but you can also manually edit the file at `~/.flame/.env`.
|
|
255
247
|
|
|
256
248
|
```env
|
|
257
249
|
# Required: Your API key
|
|
258
|
-
FLAME_API_KEY=
|
|
250
|
+
FLAME_API_KEY=your_key_here
|
|
259
251
|
|
|
260
|
-
# Optional: API endpoint (
|
|
261
|
-
FLAME_API_BASE_URL=https://api.example.com/
|
|
252
|
+
# Optional: API endpoint (defaults to a standard proxy)
|
|
253
|
+
FLAME_API_BASE_URL=https://api.example.com/v1
|
|
262
254
|
|
|
263
|
-
#
|
|
264
|
-
FLAME_MODEL=
|
|
255
|
+
# AI model to use
|
|
256
|
+
FLAME_MODEL=google/gemini-3-flash-preview
|
|
265
257
|
|
|
266
|
-
#
|
|
258
|
+
# CLI settings
|
|
267
259
|
CLI_THEME=dark
|
|
260
|
+
CLI_STREAM_SPEED=normal
|
|
268
261
|
DEBUG=false
|
|
269
262
|
```
|
|
270
263
|
|
|
@@ -387,4 +380,3 @@ Need help? Try:
|
|
|
387
380
|
---
|
|
388
381
|
|
|
389
382
|
**Made with 🔥 by API Community**
|
|
390
|
-
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "flamecli"
|
|
3
|
-
version = "0.1.
|
|
4
|
-
authors = [
|
|
5
|
-
{ name="Jameson Piscitello", email="piscitello284@gmail.com" },
|
|
6
|
-
]
|
|
7
|
-
description = "AI-powered CLI coding assistant with API"
|
|
8
|
-
readme = "README.md"
|
|
9
|
-
requires-python = ">=3.10"
|
|
10
|
-
license = { text = "MIT" }
|
|
11
|
-
classifiers = [
|
|
12
|
-
"Programming Language :: Python :: 3",
|
|
13
|
-
"License :: OSI Approved :: MIT License",
|
|
14
|
-
"Operating System :: OS Independent",
|
|
15
|
-
]
|
|
16
|
-
dependencies = [
|
|
17
|
-
"openrouter>=0.1.0",
|
|
18
|
-
"rich>=13.0.0",
|
|
19
|
-
"python-dotenv>=1.0.0",
|
|
20
|
-
"prompt-toolkit>=3.0.0",
|
|
21
|
-
"httpx>=0.27.0",
|
|
22
|
-
"pathspec>=1.0.4",
|
|
23
|
-
"pygments>=2.13.0",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
[project]
|
|
2
|
+
name = "flamecli"
|
|
3
|
+
version = "0.1.8"
|
|
4
|
+
authors = [
|
|
5
|
+
{ name="Jameson Piscitello", email="piscitello284@gmail.com" },
|
|
6
|
+
]
|
|
7
|
+
description = "AI-powered CLI coding assistant with API"
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Programming Language :: Python :: 3",
|
|
13
|
+
"License :: OSI Approved :: MIT License",
|
|
14
|
+
"Operating System :: OS Independent",
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
"openrouter>=0.1.0",
|
|
18
|
+
"rich>=13.0.0",
|
|
19
|
+
"python-dotenv>=1.0.0",
|
|
20
|
+
"prompt-toolkit>=3.0.0",
|
|
21
|
+
"httpx>=0.27.0",
|
|
22
|
+
"pathspec>=1.0.4",
|
|
23
|
+
"pygments>=2.13.0",
|
|
24
|
+
"executor>=23.2",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
flame = "flame.main:main"
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://github.com/jameson-pi/flame"
|
|
32
|
+
Issues = "https://github.com/jameson-pi/flame/issues"
|
|
33
|
+
|
|
34
|
+
[tool.setuptools]
|
|
35
|
+
package-dir = {"" = "src"}
|
|
36
|
+
packages = {find = {where = ["src"]}}
|
|
37
|
+
|
|
38
|
+
[build-system]
|
|
39
|
+
requires = ["setuptools", "wheel"]
|
|
40
|
+
build-backend = "setuptools.build_meta"
|
|
@@ -33,8 +33,11 @@ class REPL:
|
|
|
33
33
|
):
|
|
34
34
|
self.client = api_client
|
|
35
35
|
self.console = Console()
|
|
36
|
+
|
|
36
37
|
self.working_dir = Path(working_dir or os.getcwd())
|
|
38
|
+
|
|
37
39
|
self.system_context = SystemContext(working_dir=str(self.working_dir))
|
|
40
|
+
|
|
38
41
|
self.file_executor = FileExecutor(base_dir=str(self.working_dir), console=self.console)
|
|
39
42
|
self.command_executor = CommandExecutor(console=self.console)
|
|
40
43
|
|
|
@@ -69,10 +72,13 @@ class REPL:
|
|
|
69
72
|
|
|
70
73
|
# Setup persistent history in user home
|
|
71
74
|
history_path = history_file or str(Path.home() / ".flame_history")
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
try:
|
|
76
|
+
self.prompt_session = PromptSession(
|
|
77
|
+
history=FileHistory(history_path),
|
|
78
|
+
lexer=PygmentsLexer(TechLexer),
|
|
79
|
+
)
|
|
80
|
+
except Exception:
|
|
81
|
+
self.prompt_session = PromptSession(lexer=PygmentsLexer(TechLexer))
|
|
76
82
|
|
|
77
83
|
def _register_tools(self):
|
|
78
84
|
"""Register all available tools."""
|
|
@@ -337,6 +343,11 @@ class REPL:
|
|
|
337
343
|
if processed:
|
|
338
344
|
self.run_conversation_step(processed)
|
|
339
345
|
|
|
340
|
-
except
|
|
346
|
+
except KeyboardInterrupt:
|
|
347
|
+
self.console.print("\n[yellow]Goodbye![/yellow]")
|
|
348
|
+
break
|
|
349
|
+
except EOFError:
|
|
341
350
|
self.console.print("\n[yellow]Goodbye![/yellow]")
|
|
342
351
|
break
|
|
352
|
+
except Exception as e:
|
|
353
|
+
self.console.print(f"\n[red]Error: {e}[/red]")
|
|
@@ -150,6 +150,8 @@ Examples:
|
|
|
150
150
|
console.print("\n[yellow]Setup Instructions:[/yellow]")
|
|
151
151
|
console.print("Run [bold cyan]flame --setup[/bold cyan] to configure your API key interactively.")
|
|
152
152
|
sys.exit(1)
|
|
153
|
+
except Exception as e:
|
|
154
|
+
console.print("Exception occurred during API client initialization:", e)
|
|
153
155
|
|
|
154
156
|
# Check connection if requested
|
|
155
157
|
if args.check:
|
|
@@ -169,10 +171,12 @@ Examples:
|
|
|
169
171
|
|
|
170
172
|
# Start REPL
|
|
171
173
|
try:
|
|
174
|
+
console.print("Initializing REPL...")
|
|
172
175
|
repl = REPL(
|
|
173
176
|
api_client=client,
|
|
174
177
|
working_dir=working_dir,
|
|
175
178
|
)
|
|
179
|
+
|
|
176
180
|
repl.run()
|
|
177
181
|
except KeyboardInterrupt:
|
|
178
182
|
pass
|
|
@@ -122,16 +122,21 @@ class SystemContext:
|
|
|
122
122
|
total = 0
|
|
123
123
|
|
|
124
124
|
try:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
# Avoid rglob("*") in potentially huge directories like user home
|
|
126
|
+
# Instead, just walk the top level or a small subset
|
|
127
|
+
# For now, let's limit it to one level deeep or skip in huge dirs
|
|
128
|
+
for path in self.working_dir.iterdir():
|
|
129
|
+
if path.is_file() and not path.name.startswith(".") and not self._is_ignored(path):
|
|
128
130
|
ext = path.suffix or "no_ext"
|
|
129
131
|
extensions[ext] = extensions.get(ext, 0) + 1
|
|
130
132
|
total += 1
|
|
133
|
+
elif path.is_dir() and not path.name.startswith(".") and not self._is_ignored(path):
|
|
134
|
+
# For directories, maybe just count them?
|
|
135
|
+
pass
|
|
131
136
|
except PermissionError:
|
|
132
137
|
pass
|
|
133
138
|
|
|
134
|
-
summary = f"Total files: {total}\n"
|
|
139
|
+
summary = f"Total top-level files: {total}\n"
|
|
135
140
|
for ext, count in sorted(extensions.items(), key=lambda x: x[1], reverse=True)[:5]:
|
|
136
141
|
summary += f" {ext}: {count}\n"
|
|
137
142
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flamecli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: AI-powered CLI coding assistant with API
|
|
5
5
|
Author-email: Jameson Piscitello <piscitello284@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -19,21 +19,23 @@ Requires-Dist: prompt-toolkit>=3.0.0
|
|
|
19
19
|
Requires-Dist: httpx>=0.27.0
|
|
20
20
|
Requires-Dist: pathspec>=1.0.4
|
|
21
21
|
Requires-Dist: pygments>=2.13.0
|
|
22
|
+
Requires-Dist: executor>=23.2
|
|
22
23
|
Dynamic: license-file
|
|
23
24
|
|
|
24
25
|
# 🔥 Flame - AI-Powered CLI Coding Assistant
|
|
25
26
|
|
|
26
|
-
An intelligent command-line interface (CLI) application that functions as an AI coding assistant directly in your terminal, powered by **API**.
|
|
27
|
+
An intelligent command-line interface (CLI) application that functions as an AI coding assistant directly in your terminal, powered by **your choice of API**.
|
|
27
28
|
|
|
28
29
|
## ✨ Features
|
|
29
30
|
|
|
30
|
-
- **Interactive REPL**: Continuous chat loop with full conversation context
|
|
31
|
-
- **System Awareness**: Automatically gathers context about your environment (OS, project structure, git status)
|
|
32
|
-
- **
|
|
33
|
-
- **
|
|
34
|
-
- **
|
|
35
|
-
- **
|
|
36
|
-
- **
|
|
31
|
+
- **Interactive REPL**: Continuous chat loop with full conversation context.
|
|
32
|
+
- **System Awareness**: Automatically gathers context about your environment (OS, project structure, git status, etc.).
|
|
33
|
+
- **Global Configuration**: Persistent settings (API key, model, etc.) stored globally in `~/.flame/.env`.
|
|
34
|
+
- **Real-time Streaming**: Responses stream directly into your terminal for a responsive experience.
|
|
35
|
+
- **Safe File Operations**: Create and edit files with intelligent diff previews and explicit user approval.
|
|
36
|
+
- **Terminal Execution**: Command suggestions that you can execute safely with a single keypress.
|
|
37
|
+
- **Security First**: Dangerous command detection and path validation protect your system.
|
|
38
|
+
- **Multi-turn Logic**: Full chat history maintenance for complex workflow handling.
|
|
37
39
|
|
|
38
40
|
## 🚀 Quick Start
|
|
39
41
|
|
|
@@ -45,14 +47,15 @@ An intelligent command-line interface (CLI) application that functions as an AI
|
|
|
45
47
|
|
|
46
48
|
### Installation
|
|
47
49
|
|
|
48
|
-
1. **Install via pip
|
|
50
|
+
1. **Install via pip**:
|
|
49
51
|
```bash
|
|
50
52
|
pip install flamecli
|
|
51
53
|
```
|
|
52
54
|
|
|
53
55
|
2. **Setup configuration**:
|
|
54
56
|
```bash
|
|
55
|
-
#
|
|
57
|
+
# Run the interactive setup to configure your API key, base URL, and model.
|
|
58
|
+
# This will save your settings globally in ~/.flame/.env
|
|
56
59
|
flame --setup
|
|
57
60
|
```
|
|
58
61
|
|
|
@@ -76,17 +79,7 @@ Expected output:
|
|
|
76
79
|
flame
|
|
77
80
|
```
|
|
78
81
|
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
|
82
|
-
┃ 🔥 Flame - AI Coding Assistant ┃
|
|
83
|
-
┃ Powered by API ┃
|
|
84
|
-
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
|
85
|
-
|
|
86
|
-
Type 'help' for commands, 'exit' to quit
|
|
87
|
-
|
|
88
|
-
You: _
|
|
89
|
-
```
|
|
82
|
+
Happy coding! 🔥
|
|
90
83
|
|
|
91
84
|
## 💬 Usage Examples
|
|
92
85
|
|
|
@@ -225,12 +218,12 @@ flame/
|
|
|
225
218
|
┌──────┴──────┬────────────┐
|
|
226
219
|
▼ ▼ ▼
|
|
227
220
|
┌────────┐ ┌──────────┐ ┌─────────┐
|
|
228
|
-
│
|
|
229
|
-
│
|
|
230
|
-
│
|
|
231
|
-
│•
|
|
232
|
-
│•
|
|
233
|
-
│•
|
|
221
|
+
│ API │ │FileExecutor │ │CommandExecutor
|
|
222
|
+
│ Client │ │(executor.py)│ │(executor.py)
|
|
223
|
+
│ │ │ │ │
|
|
224
|
+
│• Stream │ │• Safe file │ │• Command checks
|
|
225
|
+
│• Validate│ │ ops │ │• Approval prompts
|
|
226
|
+
│• Async │ │• Diffs │ │• History
|
|
234
227
|
└────────┬────────┘ └──────────────┘ └─────────────┘
|
|
235
228
|
│
|
|
236
229
|
SystemContext
|
|
@@ -274,20 +267,21 @@ flame/
|
|
|
274
267
|
|
|
275
268
|
### Environment Variables
|
|
276
269
|
|
|
277
|
-
|
|
270
|
+
Flame uses a `.env` file for configuration. The `--setup` command handles this for you, but you can also manually edit the file at `~/.flame/.env`.
|
|
278
271
|
|
|
279
272
|
```env
|
|
280
273
|
# Required: Your API key
|
|
281
|
-
FLAME_API_KEY=
|
|
274
|
+
FLAME_API_KEY=your_key_here
|
|
282
275
|
|
|
283
|
-
# Optional: API endpoint (
|
|
284
|
-
FLAME_API_BASE_URL=https://api.example.com/
|
|
276
|
+
# Optional: API endpoint (defaults to a standard proxy)
|
|
277
|
+
FLAME_API_BASE_URL=https://api.example.com/v1
|
|
285
278
|
|
|
286
|
-
#
|
|
287
|
-
FLAME_MODEL=
|
|
279
|
+
# AI model to use
|
|
280
|
+
FLAME_MODEL=google/gemini-3-flash-preview
|
|
288
281
|
|
|
289
|
-
#
|
|
282
|
+
# CLI settings
|
|
290
283
|
CLI_THEME=dark
|
|
284
|
+
CLI_STREAM_SPEED=normal
|
|
291
285
|
DEBUG=false
|
|
292
286
|
```
|
|
293
287
|
|
|
@@ -410,4 +404,3 @@ Need help? Try:
|
|
|
410
404
|
---
|
|
411
405
|
|
|
412
406
|
**Made with 🔥 by API Community**
|
|
413
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|