diff --git a/hermes_cli/main.py b/hermes_cli/main.py index 9ad4d0142..1e0400884 100644 --- a/hermes_cli/main.py +++ b/hermes_cli/main.py @@ -4243,18 +4243,24 @@ def cmd_profile(args): print(f' Add to your shell config (~/.bashrc or ~/.zshrc):') print(f' export PATH="$HOME/.local/bin:$PATH"') + # Profile dir for display + try: + profile_dir_display = "~/" + str(profile_dir.relative_to(Path.home())) + except ValueError: + profile_dir_display = str(profile_dir) + # Next steps print(f"\nNext steps:") print(f" {name} setup Configure API keys and model") print(f" {name} chat Start chatting") print(f" {name} gateway start Start the messaging gateway") if clone or clone_all: - try: - profile_dir_display = "~/" + str(profile_dir.relative_to(Path.home())) - except ValueError: - profile_dir_display = str(profile_dir) print(f"\n Edit {profile_dir_display}/.env for different API keys") print(f" Edit {profile_dir_display}/SOUL.md for different personality") + else: + print(f"\n ⚠ This profile has no API keys yet. Run '{name} setup' first,") + print(f" or it will inherit keys from your shell environment.") + print(f" Edit {profile_dir_display}/SOUL.md to customize personality") print() except (ValueError, FileExistsError, FileNotFoundError) as e: diff --git a/hermes_cli/profiles.py b/hermes_cli/profiles.py index 6735ff0f0..1e9fcae00 100644 --- a/hermes_cli/profiles.py +++ b/hermes_cli/profiles.py @@ -459,6 +459,16 @@ def create_profile( dst.parent.mkdir(parents=True, exist_ok=True) shutil.copy2(src, dst) + # Seed a default SOUL.md so the user has a file to customize immediately. + # Skipped when the profile already has one (from --clone / --clone-all). + soul_path = profile_dir / "SOUL.md" + if not soul_path.exists(): + try: + from hermes_cli.default_soul import DEFAULT_SOUL_MD + soul_path.write_text(DEFAULT_SOUL_MD, encoding="utf-8") + except Exception: + pass # best-effort — don't fail profile creation over this + return profile_dir diff --git a/tests/hermes_cli/test_profiles.py b/tests/hermes_cli/test_profiles.py index c970cb6c5..e6de2f67f 100644 --- a/tests/hermes_cli/test_profiles.py +++ b/tests/hermes_cli/test_profiles.py @@ -177,7 +177,8 @@ class TestCreateProfile: # No error; optional files just not copied assert not (profile_dir / "config.yaml").exists() assert not (profile_dir / ".env").exists() - assert not (profile_dir / "SOUL.md").exists() + # SOUL.md is always seeded with the default even when clone source lacks it + assert (profile_dir / "SOUL.md").exists() # ===================================================================