Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ paper/

# macOS Finder metadata
.DS_Store
docs/
.gitnexus
.serena/
CLAUDE.md
AGENTS.md
21 changes: 21 additions & 0 deletions graphify/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,23 @@ def _version_tuple(version: str) -> tuple[int, ...]:





def enrich_skill_install() -> None:
"""Copy skill-enrich.md to ~/.claude/skills/graphify-enrich/SKILL.md."""
skill_src = Path(__file__).parent / "skill-enrich.md"
if not skill_src.exists():
print("error: skill-enrich.md not found in package - reinstall graphify", file=sys.stderr)
sys.exit(1)
skill_dst = Path.home() / ".claude" / "skills" / "graphify-enrich" / "SKILL.md"
skill_dst.parent.mkdir(parents=True, exist_ok=True)
shutil.copy(skill_src, skill_dst)
print(f" skill installed → {skill_dst}")
print()
print("Done. In Claude Code type:")
print()
print(" /graphify-enrich <corpus_path> --index-dir <index_dir>")
print()


def main() -> None:
Expand Down Expand Up @@ -649,6 +666,10 @@ def main() -> None:
print(" pi uninstall remove skill from ~/.pi/agent/skills/graphify/")
print(" devin install write skill to ~/.config/devin/skills/graphify/ (Devin CLI)")
print(" devin uninstall remove skill from ~/.config/devin/skills/graphify/")
print(
" enrich <path> [--index-dir <dir>] [--watch] [--dry-run] [--master-only] enrich INDEX.md files from graph.json"
)
print(" enrich-skill install install /graphify-enrich skill for Claude Code")
print()
return

Expand Down
30 changes: 30 additions & 0 deletions graphify/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1842,6 +1842,36 @@ def _to_simple(g: "_nx.Graph") -> "_nx.Graph":
result = run_benchmark(graph_path, corpus_words=corpus_words)
print_benchmark(result)

elif cmd == "enrich-skill":
from graphify.__main__ import enrich_skill_install

subcmd = sys.argv[2] if len(sys.argv) > 2 else ""
if subcmd == "install":
enrich_skill_install()
else:
print("Usage: graphify enrich-skill install", file=sys.stderr)
sys.exit(1)

elif cmd == "enrich":
from graphify.enrich import enrich as _enrich

if len(sys.argv) < 3:
print("Usage: graphify enrich <path> [--index-dir <dir>] [--watch] [--dry-run] [--master-only]", file=sys.stderr)
sys.exit(1)

corpus_path = Path(sys.argv[2])
args = sys.argv[3:]
watch = "--watch" in args
dry_run = "--dry-run" in args
master_only = "--master-only" in args
index_dir = None
if "--index-dir" in args:
idx = args.index("--index-dir")
if idx + 1 < len(args):
index_dir = Path(args[idx + 1])

_enrich(corpus_path, index_dir=index_dir, watch=watch, dry_run=dry_run, master_only=master_only)

elif cmd == "global":
subcmd = sys.argv[2] if len(sys.argv) > 2 else ""
from graphify.global_graph import (
Expand Down
Loading