fluxloop-cli 0.2.15__tar.gz → 0.2.16__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.
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/PKG-INFO +1 -1
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/__init__.py +1 -1
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/config.py +20 -4
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/init.py +17 -8
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/runner.py +2 -3
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/templates.py +0 -4
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/PKG-INFO +1 -1
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/pyproject.toml +1 -1
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/README.md +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/arg_binder.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/__init__.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/generate.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/parse.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/record.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/run.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/status.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/config_loader.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/config_schema.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/constants.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/input_generator.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/llm_generator.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/main.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/project_paths.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/target_loader.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/validators.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/SOURCES.txt +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/dependency_links.txt +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/entry_points.txt +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/requires.txt +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/top_level.txt +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/setup.cfg +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/tests/test_arg_binder.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/tests/test_config_command.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/tests/test_input_generator.py +0 -0
- {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/tests/test_target_loader.py +0 -0
|
@@ -3,6 +3,7 @@ Config command for managing configuration.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
+
import fluxloop
|
|
6
7
|
from pathlib import Path
|
|
7
8
|
from typing import Dict, Optional
|
|
8
9
|
|
|
@@ -174,6 +175,22 @@ def env(
|
|
|
174
175
|
"""
|
|
175
176
|
Show environment variables used by FluxLoop.
|
|
176
177
|
"""
|
|
178
|
+
# Load environment files so values reflect merged root -> project overrides
|
|
179
|
+
try:
|
|
180
|
+
from ..project_paths import resolve_root_dir, resolve_project_dir
|
|
181
|
+
loaded_paths = []
|
|
182
|
+
root_env = resolve_root_dir(root) / ".env"
|
|
183
|
+
if root_env.exists():
|
|
184
|
+
fluxloop.load_env(root_env, override=True, refresh_config=False)
|
|
185
|
+
loaded_paths.append(str(root_env))
|
|
186
|
+
if project:
|
|
187
|
+
project_env = resolve_project_dir(project, root) / ".env"
|
|
188
|
+
if project_env.exists():
|
|
189
|
+
fluxloop.load_env(project_env, override=True, refresh_config=False)
|
|
190
|
+
loaded_paths.append(str(project_env))
|
|
191
|
+
except Exception:
|
|
192
|
+
loaded_paths = []
|
|
193
|
+
|
|
177
194
|
env_vars = [
|
|
178
195
|
("FLUXLOOP_COLLECTOR_URL", "Collector service URL", "http://localhost:8000"),
|
|
179
196
|
("FLUXLOOP_API_KEY", "API key for authentication", None),
|
|
@@ -214,10 +231,9 @@ def env(
|
|
|
214
231
|
|
|
215
232
|
console.print(table)
|
|
216
233
|
|
|
217
|
-
#
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
console.print(f"\n[dim]Loading from:[/dim] {env_file}")
|
|
234
|
+
# Show loaded env sources (root first, then project)
|
|
235
|
+
if loaded_paths:
|
|
236
|
+
console.print("\n[dim]Loaded from:[/dim] " + ", ".join(loaded_paths))
|
|
221
237
|
else:
|
|
222
238
|
console.print("\n[yellow]No .env file found[/yellow]")
|
|
223
239
|
console.print("Create one with: [cyan]fluxloop init project[/cyan]")
|
|
@@ -137,18 +137,27 @@ def project(
|
|
|
137
137
|
section_path = section_paths[key]
|
|
138
138
|
section_path.write_text(content)
|
|
139
139
|
|
|
140
|
-
#
|
|
140
|
+
# Create project .env (unified)
|
|
141
141
|
root_env_file = root_dir / ".env"
|
|
142
|
-
|
|
143
|
-
console.print("🔐 Creating root environment template...")
|
|
144
|
-
root_env_file.write_text(create_env_file())
|
|
145
|
-
|
|
146
|
-
console.print("🔐 Creating project .env template...")
|
|
142
|
+
console.print("🔐 Creating project .env...")
|
|
147
143
|
recordings_dir = project_path / "recordings"
|
|
148
144
|
recordings_dir.mkdir(exist_ok=True)
|
|
149
145
|
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
# If a root .env exists, seed project .env with its contents so project can override locally
|
|
147
|
+
if root_env_file.exists():
|
|
148
|
+
try:
|
|
149
|
+
root_contents = root_env_file.read_text()
|
|
150
|
+
except Exception:
|
|
151
|
+
root_contents = ""
|
|
152
|
+
merged = (
|
|
153
|
+
"# Project .env (seeded from FluxLoop root .env)\n"
|
|
154
|
+
+ (root_contents if root_contents.endswith("\n") else root_contents + "\n")
|
|
155
|
+
+ "\n# Project-specific overrides (take precedence)\n"
|
|
156
|
+
)
|
|
157
|
+
env_file.write_text(merged)
|
|
158
|
+
console.print("[dim]Seeded from root .env (project overrides take precedence).[/dim]")
|
|
159
|
+
else:
|
|
160
|
+
env_file.write_text(create_env_file())
|
|
152
161
|
|
|
153
162
|
# Update .gitignore
|
|
154
163
|
if not gitignore_file.exists():
|
|
@@ -99,11 +99,12 @@ class ExperimentRunner:
|
|
|
99
99
|
source_dir = self.config.get_source_dir()
|
|
100
100
|
env_candidates: List[Path] = []
|
|
101
101
|
|
|
102
|
+
# Load parent (root) .env first, then project .env so project overrides take precedence
|
|
102
103
|
if source_dir:
|
|
103
|
-
env_candidates.append(source_dir / ".env")
|
|
104
104
|
parent = source_dir.parent
|
|
105
105
|
if parent != source_dir:
|
|
106
106
|
env_candidates.append(parent / ".env")
|
|
107
|
+
env_candidates.append(source_dir / ".env")
|
|
107
108
|
|
|
108
109
|
for candidate in env_candidates:
|
|
109
110
|
if candidate.exists():
|
|
@@ -111,8 +112,6 @@ class ExperimentRunner:
|
|
|
111
112
|
fluxloop.load_env(candidate, override=True, refresh_config=True)
|
|
112
113
|
except Exception:
|
|
113
114
|
console.log(f"[yellow]Warning:[/yellow] Failed to load environment from {candidate}")
|
|
114
|
-
else:
|
|
115
|
-
break
|
|
116
115
|
|
|
117
116
|
env_vars = getattr(self.config.runner, "environment_vars", {}) or {}
|
|
118
117
|
for key, value in env_vars.items():
|
|
@@ -63,10 +63,6 @@ def create_input_config() -> str:
|
|
|
63
63
|
base_inputs:
|
|
64
64
|
- input: "How do I get started?"
|
|
65
65
|
expected_intent: help
|
|
66
|
-
- input: "What can you do?"
|
|
67
|
-
expected_intent: capabilities
|
|
68
|
-
- input: "Show me an example"
|
|
69
|
-
expected_intent: demo
|
|
70
66
|
|
|
71
67
|
variation_strategies:
|
|
72
68
|
- rephrase
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|