Skip to content

Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)

Python

Remove obsolete init and server alias commands (#1220)

Ali Khokhar5305bd7e0898
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 8cc4aeb9..a02c02ad 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -164,7 +164,7 @@ for real prompts against supported providers:
reply-based conversation branches, status updates, transcript rendering,
managed Claude/Codex task execution where configured, task stop/clear flows,
persistence, and optional voice-note transcription.
-- Installation, update, init, and uninstall scripts insofar as they make the
+- Installation, update, and uninstall scripts insofar as they make the
above workflows available on a user's machine.
Internal modules, class designs, helper APIs, route implementations, and tests
@@ -208,8 +208,7 @@ new places to add unrelated behavior:
Console scripts are registered in [pyproject.toml](pyproject.toml):
-- `fcc-server` and `free-claude-code` call `free_claude_code.cli.entrypoints:serve`.
-- `fcc-init` calls `free_claude_code.cli.entrypoints:init`.
+- `fcc-server` calls `free_claude_code.cli.entrypoints:serve`.
- `fcc-claude` calls `free_claude_code.cli.launchers.claude:launch`.
- `fcc-codex` calls `free_claude_code.cli.launchers.codex:launch`.
- `fcc-pi` calls `free_claude_code.cli.launchers.pi:launch`.
@@ -338,9 +337,11 @@ atomically commits the managed env, and publishes a new provider generation.
Restart-required changes preserve the existing supervisor restart flow and do
not publish an in-process generation first.
-[.env.example](.env.example) is the single install/init/admin template source.
-It is packaged as a [src/free_claude_code/config/](src/free_claude_code/config/) resource for `fcc-init` and Admin UI
-template defaults; runtime settings do not read it as a live config file.
+[.env.example](.env.example) is the single Admin UI template source. It is
+packaged as a [src/free_claude_code/config/](src/free_claude_code/config/) resource for Admin UI defaults;
+runtime settings do not read it as a live config file. The Admin UI creates and
+atomically replaces `~/.fcc/.env` when configuration is applied; server startup
+only migrates legacy env files when the managed file is absent.
Admin routes call `require_loopback_admin()`, which rejects non-loopback clients
and non-local origins.
diff --git a/pyproject.toml b/pyproject.toml
index c5e19f27..4ff60f60 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "free-claude-code"
-version = "4.11.4"
+version = "4.11.5"
description = "Local proxy connecting coding agents to OpenAI-compatible AI providers"
readme = "README.md"
requires-python = ">=3.14.0"
@@ -29,8 +29,6 @@ dependencies = [
[project.scripts]
fcc-server = "free_claude_code.cli.entrypoints:serve"
-free-claude-code = "free_claude_code.cli.entrypoints:serve"
-fcc-init = "free_claude_code.cli.entrypoints:init"
fcc-claude = "free_claude_code.cli.launchers.claude:launch"
fcc-codex = "free_claude_code.cli.launchers.codex:launch"
fcc-pi = "free_claude_code.cli.launchers.pi:launch"
diff --git a/scripts/install.ps1 b/scripts/install.ps1
index cc5eee78..a666e8b2 100644
--- a/scripts/install.ps1
+++ b/scripts/install.ps1
@@ -21,6 +21,7 @@ $CodexInstallUrl = "https://chatgpt.com/codex/install.ps1"
$PiInstallUrl = "https://pi.dev/install.ps1"
$UvInstallUrl = "https://astral.sh/uv/install.ps1"
$FccCommands = @(
+ # Include retired entry points so updates reject older FCC processes before replacement.
"fcc-server",
"fcc-claude",
"fcc-codex",
diff --git a/scripts/install.sh b/scripts/install.sh
index 42805e77..9b54cde9 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -8,6 +8,7 @@ CLAUDE_INSTALL_URL="https://claude.ai/install.sh"
CODEX_INSTALL_URL="https://chatgpt.com/codex/install.sh"
PI_INSTALL_URL="https://pi.dev/install.sh"
UV_INSTALL_URL="https://astral.sh/uv/install.sh"
+# Include retired entry points so updates reject older FCC processes before replacement.
FCC_COMMANDS="fcc-server fcc-claude fcc-codex fcc-pi fcc-init free-claude-code"
dry_run=0
diff --git a/scripts/uninstall.ps1 b/scripts/uninstall.ps1
index 06d0c877..e6a9309f 100644
--- a/scripts/uninstall.ps1
+++ b/scripts/uninstall.ps1
@@ -11,6 +11,7 @@ $ErrorActionPreference = "Stop"
$PackageName = "free-claude-code"
$FccHomeDirname = ".fcc"
$FccCommands = @(
+ # Include retired entry points so older installations are fully stopped and removed.
"fcc-server",
"fcc-claude",
"fcc-codex",
diff --git a/scripts/uninstall.sh b/scripts/uninstall.sh
index 03ec07df..c22a921a 100644
--- a/scripts/uninstall.sh
+++ b/scripts/uninstall.sh
@@ -3,6 +3,7 @@ set -eu
PACKAGE_NAME="free-claude-code"
FCC_HOME_DIRNAME=".fcc"
+# Include retired entry points so older installations are fully stopped and removed.
FCC_COMMANDS="fcc-server fcc-claude fcc-codex fcc-pi fcc-init free-claude-code"
dry_run=0
diff --git a/smoke/README.md b/smoke/README.md
index 5a6d2c96..6042d749 100644
--- a/smoke/README.md
+++ b/smoke/README.md
@@ -55,7 +55,7 @@ Default targets do not send real bot messages or load voice backends:
| --- | --- | --- |
| `api` | messages, count_tokens full payload, errors, `/stop`, optimizations | configured provider only for streaming messages |
| `auth` | canonical bearer auth, conflicting legacy headers, invalid/missing auth | none; test sets an isolated token |
-| `cli` | `fcc-init`, server entrypoint, Claude CLI adaptive thinking, session cleanup | Claude CLI binary and provider only for real CLI |
+| `cli` | server entrypoint, Claude CLI adaptive thinking, session cleanup | Claude CLI binary and provider only for real CLI |
| `clients` | VS Code and JetBrains protocol payloads | configured provider |
| `config` | env precedence, removed-env migration, proxy/timeouts | none |
| `extensibility` | provider runtime and platform factory construction | none |
@@ -161,7 +161,7 @@ uv run pytest smoke/product -n 0 -s --tb=short
Run smoke the same way you run tests (`uv run pytest smoke` from the repo). Child
processes use the **same Python interpreter** as the test runner, not nested
-`uv run`, so Windows does not try to replace `free-claude-code.exe` while it is
+`uv run`, so Windows does not try to replace `fcc-server.exe` while it is
locked.
## Failure Classes
diff --git a/smoke/capabilities.py b/smoke/capabilities.py
index 7898f2d6..053387e3 100644
--- a/smoke/capabilities.py
+++ b/smoke/capabilities.py
@@ -451,12 +451,11 @@ CAPABILITY_CONTRACTS: tuple[CapabilityContract, ...] = (
"package_cli_entrypoints",
"free_claude_code.cli.entrypoints",
"installed console scripts",
- "config scaffold, package version, or uvicorn server startup",
+ "package version or uvicorn server startup",
"process cleanup in finally",
("tests/cli/test_entrypoints.py", "tests/core/test_version.py"),
(
- "test_fcc_init_scaffolds_user_config",
- "test_free_claude_code_entrypoint_starts_server",
+ "test_fcc_server_entrypoint_starts_server",
"test_entrypoint_version_e2e",
),
),
diff --git a/smoke/features.py b/smoke/features.py
index 37fa898a..0b45cbb0 100644
--- a/smoke/features.py
+++ b/smoke/features.py
@@ -411,15 +411,11 @@ FEATURE_INVENTORY: tuple[FeatureCoverage, ...] = (
),
FeatureCoverage(
"package_cli_entrypoints",
- "Installed package scripts scaffold config, report version, and start the server",
+ "Installed package scripts report version and start the server",
"public_surface",
("tests/cli/test_entrypoints.py", "tests/core/test_version.py"),
+ ("test_fcc_server_entrypoint_starts_server",),
(
- "test_fcc_init_scaffolds_user_config",
- "test_free_claude_code_entrypoint_starts_server",
- ),
- (
- "test_entrypoint_init_e2e",
"test_entrypoint_server_e2e",
"test_entrypoint_version_e2e",
),
diff --git a/smoke/lib/child_process.py b/smoke/lib/child_process.py
index 79e5dc3c..4b81a64c 100644
--- a/smoke/lib/child_process.py
+++ b/smoke/lib/child_process.py
@@ -1,7 +1,7 @@
"""Child-process commands for smoke (avoid nested ``uv run`` on Windows).
Nested ``uv run`` can try to refresh console scripts while they are locked
-(``free-claude-code.exe`` in use), causing flaky smoke. The smoke runner is
+(``fcc-server.exe`` in use), causing flaky smoke. The smoke runner is
already executed under the project environment (``uv run pytest``), so children
should use the same interpreter.
"""
@@ -20,14 +20,6 @@ def cmd_python_c(script: str) -> list[str]:
return [python_exe(), "-c", script]
-def cmd_fcc_init() -> list[str]:
- return [
- python_exe(),
- "-c",
- "from free_claude_code.cli.entrypoints import init; init()",
- ]
-
-
def cmd_fcc_version() -> list[str]:
return [
python_exe(),
@@ -40,7 +32,7 @@ def cmd_fcc_version() -> list[str]:
]
-def cmd_free_claude_code_serve() -> list[str]:
+def cmd_fcc_server() -> list[str]:
return [
python_exe(),
"-c",
diff --git a/smoke/lib/server.py b/smoke/lib/server.py
index 553e8c61..47bd7ab5 100644
--- a/smoke/lib/server.py
+++ b/smoke/lib/server.py
@@ -11,7 +11,7 @@ from pathlib import Path
import httpx
-from .child_process import cmd_free_claude_code_serve
+from .child_process import cmd_fcc_server
from .config import SmokeConfig, redacted
@@ -58,7 +58,7 @@ def start_server(
if env_overrides:
env.update(env_overrides)
- cmd = command or cmd_free_claude_code_serve()
+ cmd = command or cmd_fcc_server()
with log_path.open("ab") as log_file:
process = subprocess.Popen(
diff --git a/smoke/prereq/test_cli_prereq_live.py b/smoke/prereq/test_cli_prereq_live.py
index db058b39..1f7415e3 100644
--- a/smoke/prereq/test_cli_prereq_live.py
+++ b/smoke/prereq/test_cli_prereq_live.py
@@ -6,8 +6,7 @@ import pytest
from free_claude_code.cli.claude_env import build_claude_proxy_env
from smoke.lib.child_process import (
- cmd_fcc_init,
- cmd_free_claude_code_serve,
+ cmd_fcc_server,
run_captured_text,
)
from smoke.lib.config import SmokeConfig
@@ -17,27 +16,10 @@ from smoke.lib.skips import skip_upstream_unavailable
pytestmark = [pytest.mark.live, pytest.mark.smoke_target("cli")]
-def test_fcc_init_scaffolds_user_config(
- smoke_config: SmokeConfig, tmp_path: Path
-) -> None:
- env = os.environ.copy()
- env["HOME"] = str(tmp_path)
- env["USERPROFILE"] = str(tmp_path)
- result = run_captured_text(
- cmd_fcc_init(),
- cwd=smoke_config.root,
- env=env,
- timeout=smoke_config.timeout_s,
- check=False,
- )
- assert result.returncode == 0, result.stderr or result.stdout
- assert (tmp_path / ".fcc" / ".env").is_file()
-
-
-def test_free_claude_code_entrypoint_starts_server(smoke_config: SmokeConfig) -> None:
+def test_fcc_server_entrypoint_starts_server(smoke_config: SmokeConfig) -> None:
with start_server(
smoke_config,
- command=cmd_free_claude_code_serve(),
+ command=cmd_fcc_server(),
env_overrides={"MESSAGING_PLATFORM": "none"},
name="entrypoint",
) as server:
diff --git a/smoke/product/test_cli_package_product_live.py b/smoke/product/test_cli_package_product_live.py
index cf269c95..082217b6 100644
--- a/smoke/product/test_cli_package_product_live.py
+++ b/smoke/product/test_cli_package_product_live.py
@@ -8,29 +8,12 @@ import pytest
from free_claude_code.cli.managed.manager import ManagedClaudeSessionManager
from free_claude_code.cli.managed.session import ManagedClaudeSession
from free_claude_code.core.version import package_version
-from smoke.lib.child_process import cmd_fcc_init, cmd_fcc_version, run_captured_text
+from smoke.lib.child_process import cmd_fcc_version, run_captured_text
from smoke.lib.config import SmokeConfig
pytestmark = [pytest.mark.live, pytest.mark.smoke_target("cli")]
-def test_entrypoint_init_e2e(smoke_config: SmokeConfig, tmp_path: Path) -> None:
- env = os.environ.copy()
- env["HOME"] = str(tmp_path)
- env["USERPROFILE"] = str(tmp_path)
- result = run_captured_text(
- cmd_fcc_init(),
- cwd=smoke_config.root,
- env=env,
- timeout=smoke_config.timeout_s,
- check=False,
- )
- assert result.returncode == 0, result.stderr or result.stdout
- env_file = tmp_path / ".fcc" / ".env"
- assert env_file.is_file()
- assert env_file.read_text(encoding="utf-8").strip()
-
-
def test_entrypoint_version_e2e(smoke_config: SmokeConfig, tmp_path: Path) -> None:
env = os.environ.copy()
env["HOME"] = str(tmp_path)
diff --git a/smoke/product/test_config_extensibility_product_live.py b/smoke/product/test_config_extensibility_product_live.py
index 73d90a7d..4797243e 100644
--- a/smoke/product/test_config_extensibility_product_live.py
+++ b/smoke/product/test_config_extensibility_product_live.py
@@ -7,7 +7,7 @@ from free_claude_code.config.settings import Settings
from free_claude_code.messaging.platforms.factory import create_messaging_components
from free_claude_code.providers.runtime import build_provider_config
from smoke.lib.child_process import (
- cmd_free_claude_code_serve,
+ cmd_fcc_server,
cmd_python_c,
run_captured_text,
)
@@ -178,7 +178,7 @@ def test_entrypoint_server_e2e(smoke_config: SmokeConfig) -> None:
with SmokeServerDriver(
smoke_config,
name="product-entrypoint",
- command=cmd_free_claude_code_serve(),
+ command=cmd_fcc_server(),
env_overrides={"MESSAGING_PLATFORM": "none"},
).run() as server:
assert server.process.poll() is None
diff --git a/src/free_claude_code/cli/commands.py b/src/free_claude_code/cli/commands.py
index c31c8042..bb75cd15 100644
--- a/src/free_claude_code/cli/commands.py
+++ b/src/free_claude_code/cli/commands.py
@@ -16,9 +16,7 @@ from free_claude_code.config.env_migrations import (
explicit_env_file_migration_warning,
migrate_owned_env_files,
)
-from free_claude_code.config.env_template import load_env_template
from free_claude_code.config.paths import (
- config_dir_path,
legacy_env_paths,
managed_env_path,
)
@@ -100,32 +98,6 @@ def _run_supervised_server(settings: Settings, *, open_admin_browser: bool) -> b
return restart_requested and asgi_app.runtime.is_closed
-def init() -> None:
- """Scaffold config at ~/.fcc/.env."""
- config_dir = config_dir_path()
- env_file = managed_env_path()
-
- migrated_from = _migrate_legacy_env_if_missing()
- _migrate_config_env_keys()
- if migrated_from is not None:
- print(f"Config migrated from {migrated_from} to {env_file}")
- print(
- "Edit it to set your API keys and model preferences, then run: fcc-server"
- )
- return
-
- if env_file.exists():
- print(f"Config already exists at {env_file}")
- print("Delete it first if you want to reset to defaults.")
- return
-
- config_dir.mkdir(parents=True, exist_ok=True)
- template = load_env_template()
- env_file.write_text(template, encoding="utf-8")
- print(f"Config created at {env_file}")
- print("Edit it to set your API keys and model preferences, then run: fcc-server")
-
-
def _migrate_legacy_env_if_missing() -> Path | None:
"""Copy a legacy user env into the managed config path when absent."""
diff --git a/src/free_claude_code/cli/entrypoints.py b/src/free_claude_code/cli/entrypoints.py
index f0db25ab..5c6567e6 100644
--- a/src/free_claude_code/cli/entrypoints.py
+++ b/src/free_claude_code/cli/entrypoints.py
@@ -17,17 +17,6 @@ def serve(argv: Sequence[str] | None = None) -> None:
run_server()
-def init(argv: Sequence[str] | None = None) -> None:
- """Scaffold config at ~/.fcc/.env (registered as ``fcc-init``)."""
- if _print_version_if_requested(argv):
- return
-
- # Config initialization shares command infrastructure with the server.
- from free_claude_code.cli.commands import init as initialize_config
-
- initialize_config()
-
-
def _print_version_if_requested(argv: Sequence[str] | None) -> bool:
args = sys.argv[1:] if argv is None else argv
if "--version" not in args:
diff --git a/tests/cli/test_entrypoints.py b/tests/cli/test_entrypoints.py
index c72a8173..86e77ae8 100644
--- a/tests/cli/test_entrypoints.py
+++ b/tests/cli/test_entrypoints.py
@@ -31,25 +31,6 @@ def _launcher_settings(
)
-def _run_init(tmp_home: Path) -> tuple[str, Path]:
- """Run init() with home directory redirected to tmp_home. Returns (printed output, env_file path)."""
- from free_claude_code.cli.commands import init
-
- env_file = tmp_home / ".fcc" / ".env"
- printed: list[str] = []
-
- with (
- patch("pathlib.Path.home", return_value=tmp_home),
- patch(
- "builtins.print",
- side_effect=lambda *a: printed.append(" ".join(str(x) for x in a)),
- ),
- ):
- init()
-
- return "\n".join(printed), env_file
-
-
class _JsonResponse:
def __init__(self, payload: dict[str, object]) -> None:
self._payload = payload
@@ -64,47 +45,20 @@ class _JsonResponse:
return json.dumps(self._payload).encode("utf-8")
-def test_init_creates_env_file(tmp_path: Path) -> None:
- """init() creates .env from the bundled template when it doesn't exist yet."""
- output, env_file = _run_init(tmp_path)
-
- assert env_file.exists()
- assert env_file.stat().st_size > 0
- assert str(env_file) in output
-
-
-def test_init_copies_template_content(tmp_path: Path) -> None:
- """init() writes the canonical root env.example content, not an empty file."""
- template = (Path(__file__).resolve().parents[2] / ".env.example").read_text(
- encoding="utf-8"
- )
- _, env_file = _run_init(tmp_path)
-
- assert env_file.read_text("utf-8") == template
-
-
-def test_init_migrates_home_checkout_env_before_template(tmp_path: Path) -> None:
- """init() preserves users who kept config in ~/free-claude-code/.env."""
- legacy_env = tmp_path / "free-claude-code" / ".env"
- legacy_env.parent.mkdir(parents=True)
- legacy_env.write_text("MODEL=deepseek/deepseek-chat\n", encoding="utf-8")
-
- output, env_file = _run_init(tmp_path)
-
- assert env_file.read_text("utf-8") == "MODEL=deepseek/deepseek-chat\n"
- assert f"Config migrated from {legacy_env}" in output
-
+def test_legacy_env_migration_supports_xdg_path(tmp_path: Path) -> None:
+ """Server startup preserves config from ~/.config/free-claude-code/.env."""
+ from free_claude_code.cli.commands import _migrate_legacy_env_if_missing
-def test_init_migrates_legacy_xdg_env_before_template(tmp_path: Path) -> None:
- """init() preserves users who kept config in ~/.config/free-claude-code/.env."""
legacy_env = tmp_path / ".config" / "free-claude-code" / ".env"
legacy_env.parent.mkdir(parents=True)
legacy_env.write_text("MODEL=open_router/free-model\n", encoding="utf-8")
- output, env_file = _run_init(tmp_path)
+ with patch("pathlib.Path.home", return_value=tmp_path):
+ migrated_from = _migrate_legacy_env_if_missing()
+ env_file = tmp_path / ".fcc" / ".env"
+ assert migrated_from == legacy_env
assert env_file.read_text("utf-8") == "MODEL=open_router/free-model\n"
- assert f"Config migrated from {legacy_env}" in output
def test_legacy_env_migration_does_not_overwrite_managed_env(
@@ -127,48 +81,6 @@ def test_legacy_env_migration_does_not_overwrite_managed_env(
assert managed_env.read_text("utf-8") == "MODEL=nvidia_nim/current\n"
-def test_env_template_loader_uses_root_template_in_source_checkout() -> None:
- """Source checkout fallback uses the root .env.example as the single source."""
- from free_claude_code.config.env_template import load_env_template
-
- template = (Path(__file__).resolve().parents[2] / ".env.example").read_text(
- encoding="utf-8"
- )
-
- assert load_env_template() == template
-
-
-def test_init_creates_parent_directories(tmp_path: Path) -> None:
- """init() creates ~/.fcc/ even if it doesn't exist."""
- config_dir = tmp_path / ".fcc"
- assert not config_dir.exists()
-
- _run_init(tmp_path)
-
- assert config_dir.is_dir()
-
-
-def test_init_skips_if_env_already_exists(tmp_path: Path) -> None:
- """init() does not overwrite an existing .env and prints a warning."""
- # Create it first
- _run_init(tmp_path)
-
- env_file = tmp_path / ".fcc" / ".env"
- env_file.write_text("existing content", encoding="utf-8")
-
- output, _ = _run_init(tmp_path)
-
- assert env_file.read_text("utf-8") == "existing content"
- assert "already exists" in output
-
-
-def test_init_prints_next_step_hint(tmp_path: Path) -> None:
- """init() tells the user to run fcc-server after editing .env."""
- output, _ = _run_init(tmp_path)
-
- assert "fcc-server" in output
-
-
def test_cli_scripts_are_registered() -> None:
pyproject = tomllib.loads(
(Path(__file__).resolve().parents[2] / "pyproject.toml").read_text(
@@ -176,42 +88,37 @@ def test_cli_scripts_are_registered() -> None:
)
)
- scripts = pyproject["project"]["scripts"]
- assert scripts["fcc-server"] == "free_claude_code.cli.entrypoints:serve"
- assert scripts["free-claude-code"] == "free_claude_code.cli.entrypoints:serve"
- assert scripts["fcc-claude"] == "free_claude_code.cli.launchers.claude:launch"
- assert scripts["fcc-codex"] == "free_claude_code.cli.launchers.codex:launch"
- assert scripts["fcc-pi"] == "free_claude_code.cli.launchers.pi:launch"
+ assert pyproject["project"]["scripts"] == {
+ "fcc-server": "free_claude_code.cli.entrypoints:serve",
+ "fcc-claude": "free_claude_code.cli.launchers.claude:launch",
+ "fcc-codex": "free_claude_code.cli.launchers.codex:launch",
+ "fcc-pi": "free_claude_code.cli.launchers.pi:launch",
+ }
[email protected]("entrypoint_name", ["serve", "init"])
@pytest.mark.parametrize(
"argv",
[("--version",), ("--version", "--help"), ("--help", "--version")],
)
-def test_fcc_owned_entrypoints_report_version_without_side_effects(
- entrypoint_name: str,
+def test_fcc_server_reports_version_without_side_effects(
argv: tuple[str, ...],
capsys: pytest.CaptureFixture[str],
) -> None:
from free_claude_code.cli import entrypoints
with patch.object(entrypoints, "package_version", return_value="9.8.7"):
- getattr(entrypoints, entrypoint_name)(argv)
+ entrypoints.serve(argv)
assert capsys.readouterr() == ("free-claude-code 9.8.7\n", "")
[email protected]("entrypoint_name", ["serve", "init"])
-def test_version_entrypoints_do_not_import_command_runtime(
- entrypoint_name: str,
-) -> None:
+def test_version_entrypoint_does_not_import_command_runtime() -> None:
script = "\n".join(
(
"import json",
"import sys",
- f"from free_claude_code.cli.entrypoints import {entrypoint_name}",
- f"{entrypoint_name}(['--version'])",
+ "from free_claude_code.cli.entrypoints import serve",
+ "serve(['--version'])",
"forbidden = ('uvicorn', 'fastapi', 'openai', "
"'free_claude_code.cli.commands', "
"'free_claude_code.runtime.bootstrap')",
@@ -230,14 +137,11 @@ def test_version_entrypoints_do_not_import_command_runtime(
assert json.loads(completed.stdout.splitlines()[-1]) == []
[email protected]("entrypoint_name", ["serve", "init"])
-def test_non_version_entrypoints_delegate_to_command_implementation(
- entrypoint_name: str,
-) -> None:
+def test_non_version_entrypoint_delegates_to_server_command() -> None:
from free_claude_code.cli import commands, entrypoints
- with patch.object(commands, entrypoint_name) as command:
- getattr(entrypoints, entrypoint_name)(())
+ with patch.object(commands, "serve") as command:
+ entrypoints.serve(())
command.assert_called_once_with()
diff --git a/tests/config/test_env_template.py b/tests/config/test_env_template.py
new file mode 100644
index 00000000..db8a3dd3
--- /dev/null
+++ b/tests/config/test_env_template.py
@@ -0,0 +1,13 @@
+from pathlib import Path
+
+from free_claude_code.config.env_template import load_env_template
+
+
+def test_env_template_loader_uses_root_template_in_source_checkout() -> None:
+ """Source checkout fallback uses the root .env.example as the single source."""
+
+ template = (Path(__file__).resolve().parents[2] / ".env.example").read_text(
+ encoding="utf-8"
+ )
+
+ assert load_env_template() == template
diff --git a/tests/contracts/test_smoke_child_process.py b/tests/contracts/test_smoke_child_process.py
index bee5cb97..888fc31b 100644
--- a/tests/contracts/test_smoke_child_process.py
+++ b/tests/contracts/test_smoke_child_process.py
@@ -5,15 +5,15 @@ from free_claude_code.config.settings import Settings
from smoke.lib import child_process
from smoke.lib import server as smoke_server
from smoke.lib.child_process import (
- cmd_free_claude_code_serve,
+ cmd_fcc_server,
cmd_python_c,
run_captured_text,
)
from smoke.lib.config import SmokeConfig
-def test_free_claude_code_serve_command_uses_cli_entrypoint() -> None:
- assert cmd_free_claude_code_serve() == [
+def test_fcc_server_command_uses_cli_entrypoint() -> None:
+ assert cmd_fcc_server() == [
child_process.python_exe(),
"-c",
"from free_claude_code.cli.entrypoints import serve; serve()",
diff --git a/uv.lock b/uv.lock
index 1f84a7f8..f76351fd 100644
--- a/uv.lock
+++ b/uv.lock
@@ -620,7 +620,7 @@ wheels = [
[[package]]
name = "free-claude-code"
-version = "4.11.4"
+version = "4.11.5"
source = { editable = "." }
dependencies = [
{ name = "aiohttp" },