-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-skill.sh
More file actions
executable file
·53 lines (46 loc) · 1.87 KB
/
Copy pathinstall-skill.sh
File metadata and controls
executable file
·53 lines (46 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
# install-skill.sh — manual/dev installer for the kb umbrella.
# Delegates to skills/kb/bootstrap.sh for link creation and ownership
# tracking. Also symlinks the umbrella itself at ~/.claude/skills/kb so
# manual installs expose /kb just like a skills.sh install does.
#
# Does NOT symlink tests/ into ~/.config/kb/tests/. Tests run from a
# repository checkout only: python3 -m pytest tests/ -v
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
UMBRELLA="$SCRIPT_DIR/skills/kb"
CLAUDE_SKILLS_DIR="${HOME}/.claude/skills"
echo "Installing kb umbrella from $UMBRELLA..."
mkdir -p "$CLAUDE_SKILLS_DIR"
# Symlink the umbrella itself
umbrella_link="$CLAUDE_SKILLS_DIR/kb"
if [[ -L "$umbrella_link" ]]; then
if [[ "$(readlink "$umbrella_link")" != "$UMBRELLA" ]]; then
echo " Repointing $umbrella_link -> $UMBRELLA"
rm "$umbrella_link"
ln -s "$UMBRELLA" "$umbrella_link"
fi
elif [[ -e "$umbrella_link" ]]; then
echo "ERROR: $umbrella_link exists and is not a symlink. Remove it manually, then retry." >&2
exit 1
else
ln -s "$UMBRELLA" "$umbrella_link"
echo " Linked umbrella at $umbrella_link"
fi
# Delegate to bootstrap for scripts + subskills
bash "$UMBRELLA/bootstrap.sh"
echo ""
echo "Installation complete. Available commands:"
echo " /kb Umbrella + dispatcher help"
echo " /kb-bootstrap Initialize a new KB"
echo " /kb-ingest Ingest a source"
echo " /kb-reingest Re-process an updated source"
echo " /kb-query Query the KB"
echo " /kb-promote Promote output to wiki"
echo " /kb-lint Health check"
echo " /kb-contradictions Semantic contradiction sweep"
echo " /kb-prune Deprecate outdated content"
echo " /kb-rebuild Regenerate wiki from raw sources"
echo ""
echo "Run tests from this checkout:"
echo " python3 -m pytest tests/ -v"