This repository was archived by the owner on Apr 22, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
fuzzforge-cli/src/fuzzforge_cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,7 +177,9 @@ def _generate_mcp_config(
177177 # User-global storage paths for FuzzForge containers.
178178 # Kept under ~/.fuzzforge so images are built once and shared across
179179 # all workspaces — regardless of where `fuzzforge mcp install` is run.
180- fuzzforge_home = Path .home () / ".fuzzforge"
180+ # Override with FUZZFORGE_USER_DIR for isolated testing.
181+ user_dir_env = os .environ .get ("FUZZFORGE_USER_DIR" )
182+ fuzzforge_home = Path (user_dir_env ).resolve () if user_dir_env else Path .home () / ".fuzzforge"
181183 graphroot = fuzzforge_home / "containers" / "storage"
182184 runroot = fuzzforge_home / "containers" / "run"
183185
Original file line number Diff line number Diff line change 99from __future__ import annotations
1010
1111import json
12+ import os
1213import subprocess
1314from pathlib import Path
1415from typing import Any
@@ -37,9 +38,16 @@ def get_fuzzforge_user_dir() -> Path:
3738 repositories, the hub registry, container storage (graphroot/runroot),
3839 and the hub workspace volume.
3940
40- :return: ``Path.home() / ".fuzzforge"``
41+ Override with the ``FUZZFORGE_USER_DIR`` environment variable to
42+ redirect all user-global data to a custom path — useful for testing
43+ a fresh install without touching the real ``~/.fuzzforge/``.
44+
45+ :return: ``Path.home() / ".fuzzforge"`` or ``$FUZZFORGE_USER_DIR``
4146
4247 """
48+ env_dir = os .environ .get ("FUZZFORGE_USER_DIR" )
49+ if env_dir :
50+ return Path (env_dir ).resolve ()
4351 return Path .home () / ".fuzzforge"
4452
4553
You can’t perform that action at this time.
0 commit comments