MCPcopy Create free account
hub / github.com/T0UGH/codex-self-evolution-plugin / mangle_project_path

Function mangle_project_path

src/codex_self_evolution/config.py:50–58  ·  view source on GitHub ↗

Encode an absolute repo path as a single directory name. Same scheme as Claude Code: drop leading slash, then ``/`` → ``-``. So ``/Users/alice/code/repo`` becomes ``-Users-alice-code-repo``. Reversible visually by eye, which is enough for discoverability (``ls`` shows every repo tha

(path: Path)

Source from the content-addressed store, hash-verified

48
49
50def mangle_project_path(path: Path) -> str:
51 """Encode an absolute repo path as a single directory name.
52
53 Same scheme as Claude Code: drop leading slash, then ``/`` → ``-``. So
54 ``/Users/alice/code/repo`` becomes ``-Users-alice-code-repo``. Reversible
55 visually by eye, which is enough for discoverability (``ls`` shows every
56 repo that has been reviewed).
57 """
58 return str(path).replace("/", "-")
59
60
61def unmangle_bucket_name(name: str) -> Path:

Calls

no outgoing calls