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

Continue installation when Pi is skipped (#1251)

Ali Khokharc14d4d4a5028
diff --git a/README.md b/README.md
index 76043c59..4ac93660 100644
--- a/README.md
+++ b/README.md
@@ -72,6 +72,8 @@ Windows PowerShell:
Re-run the same command whenever you want to update. You can review the installers before running them: [install.sh](scripts/install.sh) and [install.ps1](scripts/install.ps1).
+Pi is optional. If you decline Pi's installer, FCC continues installing with Claude Code and Codex.
+
### 2. Start FCC
#### Windows
diff --git a/pyproject.toml b/pyproject.toml
index 4cabfb0b..369a15b9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "free-claude-code"
-version = "4.12.3"
+version = "4.12.4"
description = "Local proxy connecting coding agents to OpenAI-compatible AI providers"
readme = "README.md"
requires-python = ">=3.14.0"
diff --git a/scripts/install.ps1 b/scripts/install.ps1
index 754c3963..78a20624 100644
--- a/scripts/install.ps1
+++ b/scripts/install.ps1
@@ -20,6 +20,7 @@ $ClaudeInstallUrl = "https://claude.ai/install.ps1"
$CodexInstallUrl = "https://chatgpt.com/codex/install.ps1"
$PiInstallUrl = "https://pi.dev/install.ps1"
$UvInstallUrl = "https://astral.sh/uv/install.ps1"
+$script:PiAvailable = $false
$FccCommands = @(
# Include retired entry points so updates reject older FCC processes before replacement.
"fcc-desktop",
@@ -35,7 +36,7 @@ function Show-Usage {
@"
Usage: install.ps1 [options]
-Installs Claude Code, Codex, and Pi if missing, ensures a compatible uv, and installs or updates Free Claude Code.
+Installs Claude Code and Codex, offers to install Pi, ensures a compatible uv, and installs or updates Free Claude Code.
Options:
-VoiceNim Install NVIDIA NIM voice transcription support.
@@ -338,6 +339,8 @@ function Ensure-Codex {
}
function Ensure-Pi {
+ $script:PiAvailable = $false
+ Add-PiBinDirectories
$existingPi = Get-ApplicationCommand "pi"
if ($existingPi -and ($DryRun -or (Test-PiApplication $existingPi))) {
Write-Host "Pi already found on PATH; verifying it."
@@ -348,9 +351,24 @@ function Ensure-Pi {
}
Invoke-DownloadedPowerShellInstaller -Url $PiInstallUrl -Name "Pi"
Add-PiBinDirectories
+
+ if (-not $DryRun) {
+ $currentPi = Get-ApplicationCommand "pi"
+ $unchangedIncompatiblePi = (
+ $currentPi -and
+ $existingPi -and
+ $currentPi.Source -eq $existingPi.Source -and
+ -not (Test-PiApplication $currentPi)
+ )
+ if ((-not $currentPi) -or $unchangedIncompatiblePi) {
+ Write-Host "Pi was not installed; continuing without it."
+ return
+ }
+ }
}
Confirm-PiApplication
+ $script:PiAvailable = $true
}
function Convert-UvVersionOutput {
@@ -630,7 +648,7 @@ Ensure-ClaudeCode
Write-Step "Ensuring Codex is installed"
Ensure-Codex
-Write-Step "Ensuring Pi is installed"
+Write-Step "Checking or installing Pi"
Ensure-Pi
Write-Step "Ensuring uv $MinUvVersion or newer is installed"
@@ -651,5 +669,7 @@ else {
Write-Host "For terminal use, start the proxy with: fcc-server"
Write-Host "Run Claude Code with: fcc-claude"
Write-Host "Run Codex with: fcc-codex"
- Write-Host "Run Pi with: fcc-pi"
+ if ($script:PiAvailable) {
+ Write-Host "Run Pi with: fcc-pi"
+ }
}
diff --git a/scripts/install.sh b/scripts/install.sh
index 5dfa2c8f..ce2495a7 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -20,12 +20,13 @@ voice_all=0
torch_backend=""
temporary_script=""
tool_bin=""
+pi_available=0
show_usage() {
cat <<'USAGE'
Usage: install.sh [options]
-Installs Claude Code, Codex, and Pi if missing, ensures a compatible uv, and installs or updates Free Claude Code.
+Installs Claude Code and Codex, offers to install Pi, ensures a compatible uv, and installs or updates Free Claude Code.
Options:
--voice-nim Install NVIDIA NIM voice transcription support.
@@ -299,19 +300,35 @@ ensure_codex() {
}
ensure_pi() {
+ pi_available=0
+ add_pi_bin_directories
+ existing_pi_path=$(command -v pi 2>/dev/null || true)
+
if [ "$dry_run" -eq 1 ] && command -v pi >/dev/null 2>&1; then
printf 'Pi already found on PATH; verifying it.\n'
elif pi_command_is_compatible; then
printf 'Pi already found on PATH; verifying it.\n'
else
- if existing_pi_path=$(command -v pi 2>/dev/null); then
+ if [ -n "$existing_pi_path" ]; then
printf "The existing 'pi' command at %s is not Pi Coding Agent; installing Pi.\n" "$existing_pi_path"
fi
download_and_run "$PI_INSTALL_URL" sh "Pi"
add_pi_bin_directories
+
+ if [ "$dry_run" -eq 0 ]; then
+ current_pi_path=$(command -v pi 2>/dev/null || true)
+ if [ -z "$current_pi_path" ] ||
+ { [ -n "$existing_pi_path" ] &&
+ [ "$current_pi_path" = "$existing_pi_path" ] &&
+ ! pi_command_is_compatible; }; then
+ printf 'Pi was not installed; continuing without it.\n'
+ return 0
+ fi
+ fi
fi
verify_pi_command
+ pi_available=1
}
current_uv_version() {
@@ -619,7 +636,7 @@ ensure_claude
step "Ensuring Codex is installed"
ensure_codex
-step "Ensuring Pi is installed"
+step "Checking or installing Pi"
ensure_pi
step "Ensuring uv $MIN_UV_VERSION or newer is installed"
@@ -647,5 +664,7 @@ else
fi
printf 'Run Claude Code with: fcc-claude\n'
printf 'Run Codex with: fcc-codex\n'
- printf 'Run Pi with: fcc-pi\n'
+ if [ "$pi_available" -eq 1 ]; then
+ printf 'Run Pi with: fcc-pi\n'
+ fi
fi
diff --git a/tests/scripts/test_installers.py b/tests/scripts/test_installers.py
index 33382ad1..1bf8a134 100644
--- a/tests/scripts/test_installers.py
+++ b/tests/scripts/test_installers.py
@@ -258,6 +258,7 @@ chmod +x "$HOME/.local/bin/codex"
"""#!/bin/sh
echo "pi-install" >> "$CALL_LOG"
[ "$FAIL_STEP" = "pi-install" ] && exit 24
+[ "$FAIL_STEP" = "pi-skip" ] && exit 0
if [ -n "${FAKE_NPM_PREFIX:-}" ]; then
pi_bin="$FAKE_NPM_PREFIX/bin"
else
@@ -461,6 +462,59 @@ def test_install_sh_discovers_custom_pi_npm_prefix(
assert "pi:--version" in calls
+def test_install_sh_continues_when_pi_is_not_installed(
+ posix_harness: PosixHarness,
+) -> None:
+ result = posix_harness.run(fail_step="pi-skip")
+
+ assert result.returncode == 0, result.stderr
+ assert "Pi was not installed; continuing without it." in result.stdout
+ assert "Run Pi with: fcc-pi" not in result.stdout
+ calls = posix_harness.calls()
+ assert "pi-install" in calls
+ assert not any(call.startswith("pi:") for call in calls)
+ assert "uv-install" in calls
+ assert "fcc-server:--version" in calls
+
+
+def test_install_sh_continues_when_unrelated_pi_is_unchanged(
+ posix_harness: PosixHarness,
+) -> None:
+ posix_harness.add_unrelated_pi()
+
+ result = posix_harness.run(fail_step="pi-skip")
+
+ assert result.returncode == 0, result.stderr
+ assert "Pi was not installed; continuing without it." in result.stdout
+ assert "Run Pi with: fcc-pi" not in result.stdout
+ calls = posix_harness.calls()
+ assert "unrelated-pi:--help" in calls
+ assert "unrelated-pi:--version" not in calls
+ assert "fcc-server:--version" in calls
+
+
+def test_install_sh_continues_when_pi_resolution_changes_to_unrelated_command(
+ posix_harness: PosixHarness,
+) -> None:
+ posix_harness.add_unrelated_pi()
+ npm_prefix = posix_harness.root / "custom-npm"
+ posix_harness.add_npm_prefix(npm_prefix)
+ _write_executable(
+ npm_prefix / "bin" / "pi",
+ _posix_command("other-unrelated-pi"),
+ )
+
+ result = posix_harness.run(fail_step="pi-skip")
+
+ assert result.returncode == 0, result.stderr
+ assert "Pi was not installed; continuing without it." in result.stdout
+ assert "Run Pi with: fcc-pi" not in result.stdout
+ calls = posix_harness.calls()
+ assert "other-unrelated-pi:--help" in calls
+ assert "other-unrelated-pi:--version" not in calls
+ assert "fcc-server:--version" in calls
+
+
def test_install_sh_replaces_obsolete_uv(posix_harness: PosixHarness) -> None:
posix_harness.add_client("claude")
posix_harness.add_client("codex")
@@ -863,6 +917,10 @@ Add-Content -LiteralPath $env:CALL_LOG -Value "codex-install:$env:CODEX_NON_INTE
)
(fixtures / "pi-installer.ps1").write_text(
r"""if ($env:FAIL_STEP -eq "pi-install") { exit 64 }
+if ($env:FAIL_STEP -eq "pi-skip") {
+ Add-Content -LiteralPath $env:CALL_LOG -Value "pi-install"
+ return
+}
$bin = if ($env:FAKE_NPM_PREFIX) { $env:FAKE_NPM_PREFIX } else { Join-Path $env:APPDATA "npm" }
New-Item -ItemType Directory -Force -Path $bin | Out-Null
Copy-Item (Join-Path $env:FAKE_FIXTURES "pi-command.cmd") (Join-Path $bin "pi.cmd") -Force
@@ -1075,6 +1133,59 @@ def test_install_ps1_discovers_custom_pi_npm_prefix(
assert "pi:--version" in calls
+def test_install_ps1_continues_when_pi_is_not_installed(
+ powershell_harness: PowerShellHarness,
+) -> None:
+ result = powershell_harness.run(fail_step="pi-skip")
+
+ assert result.returncode == 0, result.stderr
+ assert "Pi was not installed; continuing without it." in result.stdout
+ assert "Run Pi with: fcc-pi" not in result.stdout
+ calls = powershell_harness.calls()
+ assert "pi-install" in calls
+ assert not any(call.startswith("pi:") for call in calls)
+ assert "uv-install" in calls
+ assert "fcc-server:--version" in calls
+
+
+def test_install_ps1_continues_when_unrelated_pi_is_unchanged(
+ powershell_harness: PowerShellHarness,
+) -> None:
+ powershell_harness.add_unrelated_pi()
+
+ result = powershell_harness.run(fail_step="pi-skip")
+
+ assert result.returncode == 0, result.stderr
+ assert "Pi was not installed; continuing without it." in result.stdout
+ assert "Run Pi with: fcc-pi" not in result.stdout
+ calls = powershell_harness.calls()
+ assert "unrelated-pi:--help" in calls
+ assert "unrelated-pi:--version" not in calls
+ assert "fcc-server:--version" in calls
+
+
+def test_install_ps1_continues_when_pi_resolution_changes_to_unrelated_command(
+ powershell_harness: PowerShellHarness,
+) -> None:
+ powershell_harness.add_unrelated_pi()
+ npm_prefix = powershell_harness.root / "custom-npm"
+ powershell_harness.add_npm_prefix(npm_prefix)
+ _write_executable(
+ npm_prefix / "pi.cmd",
+ _batch_client("other-unrelated-pi"),
+ )
+
+ result = powershell_harness.run(fail_step="pi-skip")
+
+ assert result.returncode == 0, result.stderr
+ assert "Pi was not installed; continuing without it." in result.stdout
+ assert "Run Pi with: fcc-pi" not in result.stdout
+ calls = powershell_harness.calls()
+ assert "other-unrelated-pi:--help" in calls
+ assert "other-unrelated-pi:--version" not in calls
+ assert "fcc-server:--version" in calls
+
+
def test_install_ps1_replaces_obsolete_uv(
powershell_harness: PowerShellHarness,
) -> None:
diff --git a/uv.lock b/uv.lock
index 93047424..2252ea6e 100644
--- a/uv.lock
+++ b/uv.lock
@@ -620,7 +620,7 @@ wheels = [
[[package]]
name = "free-claude-code"
-version = "4.12.3"
+version = "4.12.4"
source = { editable = "." }
dependencies = [
{ name = "aiohttp" },