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.
Files changed (35) hide show
  1. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/PKG-INFO +1 -1
  2. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/__init__.py +1 -1
  3. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/config.py +20 -4
  4. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/init.py +17 -8
  5. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/runner.py +2 -3
  6. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/templates.py +0 -4
  7. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/PKG-INFO +1 -1
  8. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/pyproject.toml +1 -1
  9. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/README.md +0 -0
  10. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/arg_binder.py +0 -0
  11. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/__init__.py +0 -0
  12. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/generate.py +0 -0
  13. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/parse.py +0 -0
  14. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/record.py +0 -0
  15. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/run.py +0 -0
  16. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/commands/status.py +0 -0
  17. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/config_loader.py +0 -0
  18. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/config_schema.py +0 -0
  19. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/constants.py +0 -0
  20. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/input_generator.py +0 -0
  21. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/llm_generator.py +0 -0
  22. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/main.py +0 -0
  23. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/project_paths.py +0 -0
  24. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/target_loader.py +0 -0
  25. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli/validators.py +0 -0
  26. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/SOURCES.txt +0 -0
  27. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/dependency_links.txt +0 -0
  28. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/entry_points.txt +0 -0
  29. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/requires.txt +0 -0
  30. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/fluxloop_cli.egg-info/top_level.txt +0 -0
  31. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/setup.cfg +0 -0
  32. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/tests/test_arg_binder.py +0 -0
  33. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/tests/test_config_command.py +0 -0
  34. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/tests/test_input_generator.py +0 -0
  35. {fluxloop_cli-0.2.15 → fluxloop_cli-0.2.16}/tests/test_target_loader.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fluxloop-cli
3
- Version: 0.2.15
3
+ Version: 0.2.16
4
4
  Summary: FluxLoop CLI for running agent simulations
5
5
  Author-email: FluxLoop Team <team@fluxloop.dev>
6
6
  License: Apache-2.0
@@ -2,7 +2,7 @@
2
2
  FluxLoop CLI - Command-line interface for running agent simulations.
3
3
  """
4
4
 
5
- __version__ = "0.2.15"
5
+ __version__ = "0.2.16"
6
6
 
7
7
  from .main import app
8
8
 
@@ -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
- # Check for .env file
218
- env_file = resolve_env_path(Path(".env"), project, root)
219
- if env_file.exists():
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
- # Ensure root .env exists, create project override template
140
+ # Create project .env (unified)
141
141
  root_env_file = root_dir / ".env"
142
- if not root_env_file.exists():
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
- project_env_content = "# Project-specific overrides\n"
151
- env_file.write_text(project_env_content)
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fluxloop-cli
3
- Version: 0.2.15
3
+ Version: 0.2.16
4
4
  Summary: FluxLoop CLI for running agent simulations
5
5
  Author-email: FluxLoop Team <team@fluxloop.dev>
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "fluxloop-cli"
7
- version = "0.2.15"
7
+ version = "0.2.16"
8
8
  description = "FluxLoop CLI for running agent simulations"
9
9
  authors = [
10
10
  {name = "FluxLoop Team", email = "team@fluxloop.dev"}
File without changes
File without changes