feat: add first-run welcome message with SessionStart hook

- Added FIRST_RUN marker file to detect fresh installs
- Configured SessionStart hook to show welcome message
- Styled message with markdown formatting
- init-bootstrap removes marker after setup completion
- No external shell scripts needed - inline command in settings.json
This commit is contained in:
Noah Brier
2025-09-13 19:47:34 -04:00
parent 5b3df4f78b
commit ff5a168ff9
3 changed files with 24 additions and 0 deletions
+3
View File
@@ -101,6 +101,7 @@ Then generate a customized CLAUDE.md file tailored to their needs.
- Set up .gitignore if using git (include .mcp.json, node_modules) - Set up .gitignore if using git (include .mcp.json, node_modules)
- Create initial templates if requested - Create initial templates if requested
- Create WEEKLY_REVIEW.md if user wants review ritual - Create WEEKLY_REVIEW.md if user wants review ritual
- Remove FIRST_RUN marker file if it exists
- Make initial git commit if repository was initialized - Make initial git commit if repository was initialized
8. **Run Test Commands** 8. **Run Test Commands**
@@ -197,6 +198,7 @@ Setup completed with: ✅ Dependencies ✅ Folder structure ✅ Git initialized
✅ Folder structure created ✅ Folder structure created
✅ Git repository initialized and disconnected from original ✅ Git repository initialized and disconnected from original
✅ CLAUDE.md personalized ✅ CLAUDE.md personalized
✅ First-run setup completed
[✅ MCP Gemini Vision configured - if set up] [✅ MCP Gemini Vision configured - if set up]
[✅ First commit made - if git was initialized] [✅ First commit made - if git was initialized]
``` ```
@@ -224,6 +226,7 @@ Now setting up your environment...
✅ Dependencies installed ✅ Dependencies installed
✅ Core folders created ✅ Core folders created
✅ Git repository ready (disconnected from original claudesidian) ✅ Git repository ready (disconnected from original claudesidian)
✅ First-run marker removed
Now let me ask you a few questions to customize your setup: Now let me ask you a few questions to customize your setup:
+15
View File
@@ -0,0 +1,15 @@
{
"hooks": {
"SessionStart": [
{
"matcher": "startup",
"hooks": [
{
"type": "command",
"command": "[ -f FIRST_RUN ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"# 🚀 Welcome to Claudesidian!\\n\\n**This appears to be your first time using this vault.**\\n\\n## Quick Start\\n\\nRun the setup wizard:\\n\\n```\\n/init-bootstrap\\n```\\n\\n## What this will do:\\n\\n✅ Set up your personalized configuration\\n✅ Disconnect from the original repository \\n✅ Help you import any existing Obsidian vault\\n✅ Configure your preferred workflow\\n✅ Create your PARA folder structure\\n\\nThe setup wizard will guide you through everything!\"}}' || true"
}
]
}
]
}
}
+6
View File
@@ -0,0 +1,6 @@
# First Run Marker
This file indicates that init-bootstrap has not been run yet.
It will be automatically removed after successful setup.
Please run: /init-bootstrap