Skip to content

fix(cli): exclude profiles/ from profile create --clone-all#17633

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-dcdd2bb4
Apr 29, 2026
Merged

fix(cli): exclude profiles/ from profile create --clone-all#17633
teknium1 merged 2 commits into
mainfrom
hermes/hermes-dcdd2bb4

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Stops hermes profile create <name> --clone-all from recursively copying ~/.hermes/profiles/ into the new profile, which fills the disk.

Salvage of #13129 by @hejuntt1014 onto current main + AUTHOR_MAP entry.

Changes

  • hermes_cli/profiles.py: shutil.copytree() now takes an ignore= callback that filters profiles/ at the source-dir root only (sibling profiles tree), matching existing _DEFAULT_EXPORT_EXCLUDE_ROOT behavior.
  • tests/hermes_cli/test_profiles.py: asserts sibling profiles/ tree is excluded while memories/ still copies.
  • scripts/release.py: AUTHOR_MAP entry for @hejuntt1014.

Validation

  • tests/hermes_cli/test_profiles.py: 93 passed, including new test_clone_all_excludes_sibling_profiles_tree.
  • E2E: real ~/.hermes with 3 sibling profiles + memories/note.md → cloned profile has no nested profiles/, config.yaml and memories/note.md present, max dir depth 1.

Closes #13129.

hejuntt1014 and others added 2 commits April 29, 2026 14:17
shutil.copytree from default ~/.hermes duplicated ~/.hermes/profiles into
the new profile, causing nested profiles/.../profiles/... and huge disk use.
Match export behavior (_DEFAULT_EXPORT_EXCLUDE_ROOT) by ignoring the sibling
profiles tree at the source root.

Made-with: Cursor
@teknium1 teknium1 merged commit b52b633 into main Apr 29, 2026
11 of 12 checks passed
@teknium1 teknium1 deleted the hermes/hermes-dcdd2bb4 branch April 29, 2026 21:21
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants