-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·55 lines (47 loc) · 1.8 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·55 lines (47 loc) · 1.8 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
54
55
#!/bin/bash
set -e
CONFIG_DIR="$HOME/.learn-while-code"
DATA_DIR="$CONFIG_DIR/data"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
echo "Setting up learn-while-code..."
# Create directories
mkdir -p "$DATA_DIR"
# Copy seed data if no existing data
if [ ! -f "$DATA_DIR/concepts.jsonl" ]; then
cp "$SCRIPT_DIR/data/concepts-seed.jsonl" "$DATA_DIR/concepts.jsonl"
echo "Seeded $DATA_DIR/concepts.jsonl with 20 starter concepts"
else
echo "concepts.jsonl already exists, skipping seed"
fi
if [ ! -f "$DATA_DIR/patterns.jsonl" ]; then
cp "$SCRIPT_DIR/data/patterns-seed.jsonl" "$DATA_DIR/patterns.jsonl"
echo "Seeded $DATA_DIR/patterns.jsonl with 20 pattern definitions"
else
echo "patterns.jsonl already exists, skipping seed"
fi
# Create empty quiz history if not exists
touch "$DATA_DIR/quiz-history.jsonl"
# Create config from example if not exists
if [ ! -f "$CONFIG_DIR/config.json" ]; then
cp "$SCRIPT_DIR/config/learn-while-code.example.json" "$CONFIG_DIR/config.json"
echo "Created $CONFIG_DIR/config.json (edit to configure Obsidian vault, language, etc.)"
else
echo "config.json already exists, skipping"
fi
echo ""
echo "Setup complete!"
echo ""
echo "Data directory: $CONFIG_DIR"
echo "Config file: $CONFIG_DIR/config.json"
echo ""
echo "To install as Claude Code plugin:"
echo " /plugin install learn-while-code@USERNAME/learn-while-code"
echo ""
echo "Or manually add hooks to .claude/settings.json (see README.md)"
echo ""
echo "Available commands after install:"
echo " /learn-while-code:teach - Explain recent code changes"
echo " /learn-while-code:defend - Defense mode before commit"
echo " /learn-while-code:quiz - Spaced repetition quiz"
echo " /learn-while-code:map-arch - Architecture summary"
echo " /learn-while-code:learning-status - Progress dashboard"