Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

Feature/ask and init config (#397)

Louis Choquel8515f0d4bc33
diff --git a/.pipelex/inference/backends.toml b/.pipelex/inference/backends.toml
index 97206e935..b4fbef7ce 100644
--- a/.pipelex/inference/backends.toml
+++ b/.pipelex/inference/backends.toml
@@ -1,5 +1,4 @@
[pipelex_inference]
-enabled = true
endpoint = "https://inference.pipelex.com/v1"
api_key = "${PIPELEX_INFERENCE_API_KEY}"
@@ -37,21 +36,21 @@ enabled = true
api_key = "${MISTRAL_API_KEY}"
[xai]
-enabled = true
+enabled = false
endpoint = "https://api.x.ai/v1"
api_key = "${XAI_API_KEY}"
[ollama]
-enabled = true
+enabled = false
endpoint = "http://localhost:11434/v1"
[blackboxai]
-enabled = true
+enabled = false
endpoint = "https://api.blackbox.ai/v1"
api_key = "${BLACKBOX_API_KEY}"
[fal]
-enabled = true
+enabled = false
api_key = "${FAL_API_KEY}"
[internal] # software-only backend, runs internally, without AI
diff --git a/.pipelex/inference/backends/pipelex_inference.toml b/.pipelex/inference/backends/pipelex_inference.toml
index 0f5b09cf1..c04fe8563 100644
--- a/.pipelex/inference/backends/pipelex_inference.toml
+++ b/.pipelex/inference/backends/pipelex_inference.toml
@@ -78,8 +78,8 @@ costs = { input = 1.25, output = 10.00 }
[gpt-5]
model_id = "pipelex/gpt-5"
inputs = ["text", "images"]
-outputs = ["text", "structured"]
-costs = { input = 1.25, output = 10.0 }
+outputs = ["text"]
+costs = { input = 1.25, output = 10.00 }
# --- Claude LLMs --------------------------------------------------------------
["claude-4-sonnet"]
diff --git a/.pipelex/telemetry.toml b/.pipelex/telemetry.toml
index 327955340..da28e66d3 100644
--- a/.pipelex/telemetry.toml
+++ b/.pipelex/telemetry.toml
@@ -1,4 +1,4 @@
-telemetry_mode = "anonymous" # Values: "off" | "anonymous" | "identified"
+telemetry_mode = "anonymous" # Values: "off" | "anonymous" | "identified"
host = "https://eu.i.posthog.com"
project_api_key = "phc_HPJnNKpIXh0SxNDYyTAyUtnq9KxNNZJWQszynsWVx4Y"
respect_dnt = true
diff --git a/docs/stylesheets/general.css b/docs/stylesheets/general.css
index 46c984aff..726b048d7 100644
--- a/docs/stylesheets/general.css
+++ b/docs/stylesheets/general.css
@@ -5,4 +5,11 @@
width: 100%;
max-width: 300px;
display: inline-block;
+}
+
+/* Enable word wrapping in code blocks */
+pre code {
+ white-space: pre-wrap !important;
+ word-wrap: break-word;
+ overflow-wrap: break-word;
}
\ No newline at end of file
diff --git a/pipelex/cli/_cli.py b/pipelex/cli/_cli.py
index c302453eb..bf657355b 100644
--- a/pipelex/cli/_cli.py
+++ b/pipelex/cli/_cli.py
@@ -1,4 +1,4 @@
-import os
+from typing import Annotated
import typer
from click import Command, Context
@@ -7,17 +7,12 @@ from typer.core import TyperGroup
from typing_extensions import override
from pipelex.cli.commands.build_cmd import build_app
-from pipelex.cli.commands.init_cmd import init_app
+from pipelex.cli.commands.init_cmd import InitFocus, init_cmd
from pipelex.cli.commands.kit_cmd import kit_app
from pipelex.cli.commands.run_cmd import run_cmd
from pipelex.cli.commands.show_cmd import show_app
from pipelex.cli.commands.validate_cmd import validate_cmd
-from pipelex.kit.paths import get_configs_dir
-from pipelex.system.configuration.config_loader import config_manager
-from pipelex.system.telemetry.telemetry_config import TELEMETRY_CONFIG_FILE_NAME, TelemetryMode
from pipelex.system.telemetry.telemetry_manager_abstract import TelemetryManagerAbstract
-from pipelex.tools.misc.file_utils import path_exists
-from pipelex.tools.misc.toml_utils import load_toml_with_tomlkit, save_toml_to_path
class PipelexCLI(TyperGroup):
@@ -36,89 +31,6 @@ class PipelexCLI(TyperGroup):
return cmd
-def check_telemetry_consent() -> TelemetryMode | None:
- """Check if user has configured telemetry and prompt if not."""
- # Check if .pipelex directory exists - if not, user must run pipelex init first
- pipelex_config_dir = config_manager.pipelex_config_dir
- if not path_exists(pipelex_config_dir):
- typer.echo("Pipelex has not been initialized in this directory.", err=True)
- typer.echo("Please run 'pipelex init' first to set up the configuration.", err=True)
- raise typer.Exit(code=1)
-
- telemetry_config_path = os.path.join(pipelex_config_dir, TELEMETRY_CONFIG_FILE_NAME)
-
- # If telemetry.toml exists, settings are already configured
- if path_exists(telemetry_config_path):
- return None
-
- # If file doesn't exist, prompt user and create it
- try:
- # Map choice to telemetry mode using enum
- mode_map: dict[str, TelemetryMode] = {
- "1": TelemetryMode.OFF,
- "2": TelemetryMode.ANONYMOUS,
- "3": TelemetryMode.IDENTIFIED,
- "off": TelemetryMode.OFF,
- "anonymous": TelemetryMode.ANONYMOUS,
- "identified": TelemetryMode.IDENTIFIED,
- }
-
- # Prompt user for telemetry preference
- typer.echo("\n" + "=" * 70)
- typer.echo("Telemetry Configuration")
- typer.echo("=" * 70)
- typer.echo("\nPipelex can collect anonymous usage data to help improve the product.")
- typer.echo("\nPlease choose your telemetry preference:")
- typer.echo(f" [1] {TelemetryMode.OFF:11} - No telemetry data collected")
- typer.echo(f" [2] {TelemetryMode.ANONYMOUS:11} - Anonymous usage data only")
- typer.echo(f" [3] {TelemetryMode.IDENTIFIED:11} - Usage data with user identification")
- typer.echo(f" [q] {'quit':11} - Exit without configuring")
- typer.echo()
-
- # Loop until valid input is received
- telemetry_mode: TelemetryMode | None = None
- while telemetry_mode is None:
- choice_str = typer.prompt(
- "Enter your choice",
- type=str,
- )
-
- # Normalize input to lowercase
- choice_normalized = choice_str.lower().strip()
-
- # Handle quit option
- if choice_normalized in ("q", "quit"):
- typer.echo("\nExiting without configuring telemetry.")
- raise typer.Exit(code=0)
-
- # Check if valid choice
- if choice_normalized in mode_map:
- telemetry_mode = mode_map[choice_normalized]
- else:
- typer.echo(f"Invalid choice: '{choice_str}'. Please enter 1, 2, 3, off, anonymous, identified, or q to quit.\n")
-
- # Load template and set the chosen mode
- template_path = os.path.join(str(get_configs_dir()), TELEMETRY_CONFIG_FILE_NAME)
- toml_doc = load_toml_with_tomlkit(template_path)
- toml_doc["telemetry_mode"] = telemetry_mode
-
- # Save to user's .pipelex directory
- save_toml_to_path(toml_doc, telemetry_config_path)
-
- typer.echo(f"\n✓ Telemetry mode set to: {telemetry_mode}")
- typer.echo("=" * 70 + "\n")
-
- return telemetry_mode
-
- except typer.Exit:
- # Re-raise Exit exceptions (e.g., when user quits)
- raise
- except Exception as exc:
- # Silently fail if there's any issue - don't block CLI usage
- typer.echo(f"Warning: Could not save telemetry preference: {exc}", err=True)
- return None
-
-
def main() -> None:
"""Entry point for the pipelex CLI."""
app()
@@ -155,10 +67,18 @@ def app_callback(ctx: typer.Context) -> None:
if ctx.invoked_subcommand is None or ctx.invoked_subcommand == "init":
return
- TelemetryManagerAbstract.telemetry_mode_just_set = check_telemetry_consent()
+ TelemetryManagerAbstract.telemetry_mode_just_set = init_cmd()
+
+
[email protected](name="init", help="Initialize Pipelex configuration in a `.pipelex` directory")
+def init_command(
+ focus: Annotated[InitFocus, typer.Argument(help="What to initialize: 'config', 'telemetry', or 'all'")] = InitFocus.ALL,
+ reset: Annotated[bool, typer.Option("--reset", "-r", help="Reset existing configuration files")] = False,
+) -> None:
+ """Initialize Pipelex configuration and telemetry."""
+ init_cmd(focus=focus, reset=reset)
-app.add_typer(init_app, name="init", help="Initialize Pipelex configuration in a `.pipelex` directory")
app.add_typer(kit_app, name="kit", help="Manage kit assets: agent rules, migration rules")
app.add_typer(
build_app, name="build", help="Generate AI workflows from natural language requirements: pipelines in .plx format and python code to run them"
diff --git a/pipelex/cli/commands/init_cmd.py b/pipelex/cli/commands/init_cmd.py
index 220ee92e4..3c597034e 100644
--- a/pipelex/cli/commands/init_cmd.py
+++ b/pipelex/cli/commands/init_cmd.py
@@ -1,21 +1,44 @@
import os
import shutil
from importlib.metadata import metadata
-from typing import Annotated
import typer
+from rich.console import Console, Group
+from rich.panel import Panel
+from rich.prompt import Confirm, Prompt
+from rich.table import Table
+from rich.text import Text
from pipelex.exceptions import PipelexCLIError
from pipelex.kit.paths import get_configs_dir
from pipelex.system.configuration.config_loader import config_manager
-from pipelex.system.telemetry.telemetry_config import TELEMETRY_CONFIG_FILE_NAME
+from pipelex.system.telemetry.telemetry_config import TELEMETRY_CONFIG_FILE_NAME, TelemetryMode
+from pipelex.tools.misc.file_utils import path_exists
+from pipelex.tools.misc.toml_utils import load_toml_with_tomlkit, save_toml_to_path
+from pipelex.types import StrEnum
PACKAGE_NAME = __name__.split(".", maxsplit=1)[0]
PACKAGE_VERSION = metadata(PACKAGE_NAME)["Version"]
-def do_init_config(reset: bool = False) -> None:
- """Initialize pipelex configuration in the current directory."""
+class InitFocus(StrEnum):
+ """Focus options for initialization."""
+
+ ALL = "all"
+ CONFIG = "config"
+ TELEMETRY = "telemetry"
+
+
+def init_config(reset: bool = False, dry_run: bool = False) -> int:
+ """Initialize pipelex configuration in the .pipelex directory. Does not install telemetry, just the main config dans inference backends.
+
+ Args:
+ reset: Whether to overwrite existing files.
+ dry_run: Whether to only print the files that would be copied, without actually copying them.
+
+ Returns:
+ The number of files copied.
+ """
config_template_dir = str(get_configs_dir())
target_config_dir = config_manager.pipelex_config_dir
@@ -25,7 +48,7 @@ def do_init_config(reset: bool = False) -> None:
copied_files: list[str] = []
existing_files: list[str] = []
- def copy_directory_structure(src_dir: str, dst_dir: str, relative_path: str = "") -> None:
+ def copy_directory_structure(src_dir: str, dst_dir: str, relative_path: str = "", dry_run: bool = False) -> None:
"""Recursively copy directory structure, handling existing files."""
for item in os.listdir(src_dir):
src_item = os.path.join(src_dir, item)
@@ -43,9 +66,13 @@ def do_init_config(reset: bool = False) -> None:
existing_files.append(relative_item)
else:
shutil.copy2(src_item, dst_item)
- copied_files.append(relative_item)
+ if not dry_run:
+ copied_files.append(relative_item)
- copy_directory_structure(config_template_dir, target_config_dir)
+ copy_directory_structure(src_dir=config_template_dir, dst_dir=target_config_dir, dry_run=dry_run)
+
+ if dry_run:
+ return len(copied_files)
# Report results
if copied_files:
@@ -65,13 +92,213 @@ def do_init_config(reset: bool = False) -> None:
msg = f"Failed to initialize configuration: {exc}"
raise PipelexCLIError(msg) from exc
+ return len(copied_files)
+
+
+def init_cmd(
+ focus: InitFocus = InitFocus.ALL,
+ reset: bool = False,
+) -> TelemetryMode | None:
+ """Initialize Pipelex configuration and telemetry if needed, in a unified flow.
+
+ Args:
+ focus: What to initialize - 'config', 'telemetry', or 'all' (default)
+ reset: Whether to reset/overwrite existing files
+ """
+ console = Console()
+ pipelex_config_dir = config_manager.pipelex_config_dir
+ telemetry_config_path = os.path.join(pipelex_config_dir, TELEMETRY_CONFIG_FILE_NAME)
+
+ # Determine what to check based on focus parameter
+ check_config = focus in (InitFocus.ALL, InitFocus.CONFIG)
+ check_telemetry = focus in (InitFocus.ALL, InitFocus.TELEMETRY)
+
+ # Check what needs to be initialized
+ nb_missing_config_files = init_config(reset=False, dry_run=True) if check_config else 0
+ needs_config = check_config and (nb_missing_config_files > 0 or reset)
+ needs_telemetry = check_telemetry and (not path_exists(telemetry_config_path) or reset)
+
+ # Track if user already confirmed to avoid double prompting
+ user_already_confirmed = False
+
+ # If nothing needs to be done, handle based on focus
+ if not needs_config and not needs_telemetry:
+ match focus:
+ case InitFocus.TELEMETRY:
+ # Special case: if user explicitly asked for telemetry, offer to reconfigure
+ console.print()
+ console.print("[green]✓[/green] Telemetry preferences are already configured!")
+ console.print()
+ console.print(f"[dim]Configuration file:[/dim] [cyan]{telemetry_config_path}[/cyan]")
+ console.print()
+
+ if Confirm.ask("[bold]Would you like to reconfigure telemetry preferences?[/bold]", default=False):
+ # User wants to reconfigure, so proceed with telemetry setup
+ needs_telemetry = True
+ user_already_confirmed = True
+ else:
+ console.print("\n[dim]No changes made.[/dim]")
+ console.print()
+ return None
+
+ case InitFocus.ALL:
+ console.print()
+ console.print("[green]✓[/green] Pipelex is already fully initialized!")
+ console.print()
+ console.print("[dim]Configuration files are in place:[/dim] [cyan].pipelex/[/cyan]")
+ console.print("[dim]Telemetry preferences are configured[/dim]")
+ console.print()
+ console.print("[dim]💡 Tip: Use[/dim] [cyan]--reset[/cyan] [dim]to reconfigure or troubleshoot:[/dim]")
+ console.print(" [cyan]pipelex init --reset[/cyan]")
+ console.print()
+ return None
+
+ case InitFocus.CONFIG:
+ console.print()
+ console.print("[green]✓[/green] Configuration files are already in place!")
+ console.print()
+ console.print("[dim]Configuration directory:[/dim] [cyan].pipelex/[/cyan]")
+ console.print()
+ console.print("[dim]💡 Tip: Use[/dim] [cyan]--reset[/cyan] [dim]to reconfigure or troubleshoot:[/dim]")
+ console.print(f" [cyan]pipelex init {focus} --reset[/cyan]")
+ console.print()
+ return None
+
+ try:
+ # Show unified initialization prompt (skip if user already confirmed)
+ if not user_already_confirmed:
+ console.print()
+
+ # Build message based on what's being initialized
+ message_parts: list[str] = []
+ if reset:
+ if needs_config and needs_telemetry:
+ message_parts.append("• [yellow]Reset and reconfigure[/yellow] configuration files in [cyan].pipelex/[/cyan]")
+ message_parts.append("• [yellow]Reset and reconfigure[/yellow] telemetry preferences")
+ elif needs_config:
+ message_parts.append("• [yellow]Reset and reconfigure[/yellow] configuration files in [cyan].pipelex/[/cyan]")
+ elif needs_telemetry:
+ message_parts.append("• [yellow]Reset and reconfigure[/yellow] telemetry preferences")
+ elif needs_config and needs_telemetry:
+ message_parts.append("• Create required configuration files in [cyan].pipelex/[/cyan]")
+ message_parts.append("• Ask you to choose your telemetry preferences")
+ elif needs_config:
+ message_parts.append("• Create required configuration files in [cyan].pipelex/[/cyan]")
+ elif needs_telemetry:
+ message_parts.append("• Ask you to choose your telemetry preferences")
+
+ if needs_config and needs_telemetry:
+ title_text = "[bold yellow]Resetting Configuration[/bold yellow]" if reset else "[bold cyan]Pipelex Initialization[/bold cyan]"
+ elif needs_config:
+ title_text = "[bold yellow]Resetting Configuration Files[/bold yellow]" if reset else "[bold cyan]Configuration Setup[/bold cyan]"
+ else:
+ title_text = "[bold yellow]Resetting Telemetry[/bold yellow]" if reset else "[bold cyan]Telemetry Setup[/bold cyan]"
+
+ message = "\n".join(message_parts)
+ border_color = "yellow" if reset else "cyan"
+
+ panel = Panel(
+ message,
+ title=title_text,
+ border_style=border_color,
+ padding=(1, 2),
+ )
+ console.print(panel)
+
+ if not Confirm.ask("[bold]Continue with initialization?[/bold]", default=True):
+ console.print("\n[yellow]Initialization cancelled.[/yellow]")
+ if needs_config:
+ match focus:
+ case InitFocus.ALL:
+ init_cmd_str = "pipelex init"
+ case InitFocus.CONFIG:
+ init_cmd_str = f"pipelex init {focus}"
+ case InitFocus.TELEMETRY:
+ init_cmd_str = f"pipelex init {focus}"
+ console.print(f"[dim]You can initialize later by running:[/dim] [cyan]{init_cmd_str}[/cyan]")
+ console.print()
+ raise typer.Exit(code=0)
+ else:
+ # User already confirmed, just add a blank line for spacing
+ console.print()
+
+ # Step 1: Initialize config if needed
+ if needs_config:
+ console.print()
+ init_config(reset=reset)
+
+ # Step 2: Set up telemetry if needed
+ telemetry_mode: TelemetryMode | None = None
+ if needs_telemetry:
+ console.print()
+
+ # Create a table for telemetry options
+ table = Table(show_header=False, box=None, padding=(0, 2))
+ table.add_column(style="bold cyan", justify="right")
+ table.add_column(style="bold")
+ table.add_column()
-# Typer group for init commands
-init_app = typer.Typer(no_args_is_help=True)
+ table.add_row("[1]", TelemetryMode.OFF, "No telemetry data collected")
+ table.add_row("[2]", TelemetryMode.ANONYMOUS, "Anonymous usage data only")
+ table.add_row("[3]", TelemetryMode.IDENTIFIED, "Usage data with user identification")
+ table.add_row("[Q]", "[dim]quit[/dim]", "[dim]Exit without configuring[/dim]")
+ description = Text(
+ "Pipelex can collect anonymous usage data to help improve the product.",
+ style="dim",
+ )
+ telemetry_panel = Panel(
+ Group(description, Text(""), table),
+ title="[bold yellow]Telemetry Configuration[/bold yellow]",
+ border_style="yellow",
+ padding=(1, 2),
+ )
+ console.print(telemetry_panel)
-@init_app.command("config", help="Initialize Pipelex configuration in a `.pipelex` directory")
-def init_config_cmd(
- reset: Annotated[bool, typer.Option("--reset", "-r", help="Warning: If set, existing files will be overwritten.")] = False,
-) -> None:
- do_init_config(reset=reset)
+ # Map choice to telemetry mode
+ mode_map: dict[str, TelemetryMode] = {
+ "1": TelemetryMode.OFF,
+ "2": TelemetryMode.ANONYMOUS,
+ "3": TelemetryMode.IDENTIFIED,
+ "off": TelemetryMode.OFF,
+ "anonymous": TelemetryMode.ANONYMOUS,
+ "identified": TelemetryMode.IDENTIFIED,
+ }
+
+ # Loop until valid input
+ while telemetry_mode is None:
+ choice_str = Prompt.ask("[bold]Enter your choice[/bold]", console=console)
+ choice_normalized = choice_str.lower().strip()
+
+ # Handle quit option
+ if choice_normalized in ("q", "quit"):
+ console.print("\n[yellow]Exiting without configuring telemetry.[/yellow]")
+ raise typer.Exit(code=0)
+
+ if choice_normalized in mode_map:
+ telemetry_mode = mode_map[choice_normalized]
+ else:
+ console.print(
+ f"[red]Invalid choice: '{choice_str}'.[/red] "
+ "Please enter [cyan]1[/cyan], [cyan]2[/cyan], [cyan]3[/cyan], or [cyan]q[/cyan] to quit.\n"
+ )
+
+ # Save telemetry config
+ template_path = os.path.join(str(get_configs_dir()), TELEMETRY_CONFIG_FILE_NAME)
+ toml_doc = load_toml_with_tomlkit(template_path)
+ toml_doc["telemetry_mode"] = telemetry_mode
+ save_toml_to_path(toml_doc, telemetry_config_path)
+
+ console.print(f"\n[green]✓[/green] Telemetry mode set to: [bold cyan]{telemetry_mode}[/bold cyan]")
+
+ console.print()
+ return telemetry_mode
+
+ except typer.Exit:
+ # Re-raise Exit exceptions
+ raise
+ except Exception as exc:
+ console.print(f"\n[red]⚠ Warning: Initialization failed: {exc}[/red]", style="bold")
+ if needs_config:
+ console.print("[red]Please run 'pipelex init config' manually.[/red]")
+ return None
diff --git a/pipelex/kit/configs/inference/backends.toml b/pipelex/kit/configs/inference/backends.toml
index 459b4692a..b4fbef7ce 100644
--- a/pipelex/kit/configs/inference/backends.toml
+++ b/pipelex/kit/configs/inference/backends.toml
@@ -3,7 +3,7 @@ endpoint = "https://inference.pipelex.com/v1"
api_key = "${PIPELEX_INFERENCE_API_KEY}"
[azure_openai]
-enabled = false
+enabled = true
endpoint = "${AZURE_API_BASE}"
api_key = "${AZURE_API_KEY}"
api_version = "${AZURE_API_VERSION}"
@@ -23,16 +23,16 @@ gcp_location = "${GCP_LOCATION}"
gcp_credentials_file_path = "${GCP_CREDENTIALS_FILE_PATH}"
[openai]
-enabled = false
+enabled = true
api_key = "${OPENAI_API_KEY}"
[anthropic]
-enabled = false
+enabled = true
api_key = "${ANTHROPIC_API_KEY}"
claude_4_tokens_limit = 8192
[mistral]
-enabled = false
+enabled = true
api_key = "${MISTRAL_API_KEY}"
[xai]
@@ -55,4 +55,3 @@ api_key = "${FAL_API_KEY}"
[internal] # software-only backend, runs internally, without AI
enabled = true
-
diff --git a/pipelex/kit/configs/inference/backends/pipelex_inference.toml b/pipelex/kit/configs/inference/backends/pipelex_inference.toml
index d22b08cea..c04fe8563 100644
--- a/pipelex/kit/configs/inference/backends/pipelex_inference.toml
+++ b/pipelex/kit/configs/inference/backends/pipelex_inference.toml
@@ -75,6 +75,12 @@ inputs = ["text", "images"]
outputs = ["text"]
costs = { input = 1.25, output = 10.00 }
+[gpt-5]
+model_id = "pipelex/gpt-5"
+inputs = ["text", "images"]
+outputs = ["text"]
+costs = { input = 1.25, output = 10.00 }
+
# --- Claude LLMs --------------------------------------------------------------
["claude-4-sonnet"]
model_id = "pipelex/claude-4-sonnet"
diff --git a/pipelex/system/telemetry/telemetry_config.py b/pipelex/system/telemetry/telemetry_config.py
index a607f5308..e1bd34f49 100644
--- a/pipelex/system/telemetry/telemetry_config.py
+++ b/pipelex/system/telemetry/telemetry_config.py
@@ -7,17 +7,17 @@ TELEMETRY_CONFIG_FILE_NAME = "telemetry.toml"
class TelemetryMode(StrEnum):
- OFF = "off"
ANONYMOUS = "anonymous"
+ OFF = "off"
IDENTIFIED = "identified"
@property
def is_enabled(self) -> bool:
match self:
- case TelemetryMode.OFF:
- return False
case TelemetryMode.ANONYMOUS:
return True
+ case TelemetryMode.OFF:
+ return False
case TelemetryMode.IDENTIFIED:
return True
diff --git a/tests/unit/cli/commands/test_init_cmd.py b/tests/unit/cli/commands/test_init_cmd.py
index fecd8fade..4c09966db 100644
--- a/tests/unit/cli/commands/test_init_cmd.py
+++ b/tests/unit/cli/commands/test_init_cmd.py
@@ -10,7 +10,7 @@ if TYPE_CHECKING:
from pytest_mock import MockerFixture
-from pipelex.cli.commands.init_cmd import do_init_config
+from pipelex.cli.commands.init_cmd import init_config
from pipelex.exceptions import PipelexCLIError
@@ -33,7 +33,7 @@ class TestInitCmd:
mock_echo = mocker.patch("typer.echo")
# Execute
- do_init_config(reset=False)
+ init_config(reset=False)
# Verify
assert (target_dir / "pipelex.toml").exists()
@@ -59,7 +59,7 @@ class TestInitCmd:
mock_echo = mocker.patch("typer.echo")
# Execute
- do_init_config(reset=False)
+ init_config(reset=False)
# Verify existing file was not overwritten
content = (target_dir / "pipelex.toml").read_text()
@@ -92,7 +92,7 @@ class TestInitCmd:
mock_echo = mocker.patch("typer.echo")
# Execute
- do_init_config(reset=True)
+ init_config(reset=True)
# Verify file was overwritten
content = (target_dir / "pipelex.toml").read_text()
@@ -129,7 +129,7 @@ class TestInitCmd:
mock_echo = mocker.patch("typer.echo")
# Execute
- do_init_config(reset=False)
+ init_config(reset=False)
# Verify all files and directories were created
assert (target_dir / "pipelex.toml").exists()
@@ -161,7 +161,7 @@ class TestInitCmd:
# Execute and verify exception
with pytest.raises(PipelexCLIError) as exc_info:
- do_init_config(reset=False)
+ init_config(reset=False)
assert "Failed to initialize configuration" in str(exc_info.value)
@@ -182,7 +182,7 @@ class TestInitCmd:
mock_echo = mocker.patch("typer.echo")
# Execute
- do_init_config(reset=False)
+ init_config(reset=False)
# Verify directory was created and file was copied
assert target_dir.exists()