Skip to content

Commit 667d495

Browse files
committed
feat: add install-pi.sh for one-command Pi installation
Patches {{skill_dir}} to actual path at install time. Simplifies README install instructions.
1 parent 92b8e45 commit 667d495

File tree

4 files changed

+65
-13
lines changed

4 files changed

+65
-13
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
# Changelog
22

3+
## [0.6.1] - 2026-03-08
4+
5+
### Pi Install Script
6+
- New `install-pi.sh` for one-command installation
7+
- Automatically patches `{{skill_dir}}` to actual install path
8+
- Usage: `curl -fsSL https://raw.githubusercontent.com/nicobailon/visual-explainer/main/install-pi.sh | bash`
9+
310
## [0.6.0] - 2026-03-08
411

5-
Thanks to [@peak-flow](https://github.com/peak-flow) (David Abraham) for the adaptive zoom/pan engine PR (#25).
12+
Based on PR #25 by [@peak-flow](https://github.com/peak-flow), with additional multi-diagram architecture and bug fixes.
613

714
### Multi-Diagram Support
815
- New vector-based zoom/pan engine replacing CSS `zoom` with direct SVG sizing

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,15 @@ This skill fixes that. Real typography, dark/light themes, interactive Mermaid d
3636

3737
Note: Claude Code plugins namespace commands as `/visual-explainer:command-name`.
3838

39-
**Pi (manual):**
39+
**Pi:**
4040
```bash
41-
# Clone the repo
42-
git clone --depth 1 https://github.com/nicobailon/visual-explainer.git /tmp/visual-explainer
43-
44-
# Install skill
45-
cp -r /tmp/visual-explainer/plugins/visual-explainer ~/.pi/agent/skills/visual-explainer
46-
47-
# Install prompt templates (slash commands)
48-
cp /tmp/visual-explainer/plugins/visual-explainer/commands/*.md ~/.pi/agent/prompts/
41+
curl -fsSL https://raw.githubusercontent.com/nicobailon/visual-explainer/main/install-pi.sh | bash
42+
```
4943

50-
# Cleanup
51-
rm -rf /tmp/visual-explainer
44+
Or clone and run:
45+
```bash
46+
git clone --depth 1 https://github.com/nicobailon/visual-explainer.git
47+
cd visual-explainer && ./install-pi.sh
5248
```
5349

5450
**OpenAI Codex:**

install-pi.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/bash
2+
# install-pi.sh - Install visual-explainer for Pi
3+
4+
set -e
5+
6+
SKILL_DIR="$HOME/.pi/agent/skills/visual-explainer"
7+
PROMPTS_DIR="$HOME/.pi/agent/prompts"
8+
9+
# Check if we're in the repo or need to clone
10+
if [ ! -f "plugins/visual-explainer/SKILL.md" ]; then
11+
echo "Cloning visual-explainer..."
12+
TEMP_DIR=$(mktemp -d)
13+
git clone --depth 1 https://github.com/nicobailon/visual-explainer.git "$TEMP_DIR"
14+
cd "$TEMP_DIR"
15+
CLEANUP=true
16+
else
17+
CLEANUP=false
18+
fi
19+
20+
# Copy skill
21+
echo "Installing skill to $SKILL_DIR..."
22+
rm -rf "$SKILL_DIR"
23+
cp -r plugins/visual-explainer "$SKILL_DIR"
24+
25+
# Replace {{skill_dir}} with actual path
26+
echo "Patching paths..."
27+
if [[ "$OSTYPE" == "darwin"* ]]; then
28+
find "$SKILL_DIR" -name "*.md" -exec sed -i '' "s|{{skill_dir}}|$SKILL_DIR|g" {} \;
29+
else
30+
find "$SKILL_DIR" -name "*.md" -exec sed -i "s|{{skill_dir}}|$SKILL_DIR|g" {} \;
31+
fi
32+
33+
# Copy prompts (slash commands)
34+
echo "Installing prompts to $PROMPTS_DIR..."
35+
mkdir -p "$PROMPTS_DIR"
36+
cp "$SKILL_DIR/commands/"*.md "$PROMPTS_DIR/"
37+
38+
# Cleanup if we cloned
39+
if [ "$CLEANUP" = true ]; then
40+
rm -rf "$TEMP_DIR"
41+
fi
42+
43+
echo ""
44+
echo "Done! Restart pi to use visual-explainer."
45+
echo ""
46+
echo "Commands available:"
47+
echo " /diff-review, /plan-review, /project-recap, /fact-check"
48+
echo " /generate-web-diagram, /generate-slides, /generate-visual-plan"
49+
echo " /share"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "visual-explainer",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Agent skill that generates beautiful HTML pages for diagrams, diff reviews, plan reviews, and data tables",
55
"keywords": [
66
"claude-code-plugin",

0 commit comments

Comments
 (0)