From ff5a168ff9319a123cb7aad46a7220d669631490 Mon Sep 17 00:00:00 2001 From: Noah Brier Date: Sat, 13 Sep 2025 19:47:34 -0400 Subject: [PATCH] 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 --- .claude/commands/init-bootstrap.md | 3 +++ .claude/settings.json | 15 +++++++++++++++ FIRST_RUN | 6 ++++++ 3 files changed, 24 insertions(+) create mode 100644 .claude/settings.json create mode 100644 FIRST_RUN diff --git a/.claude/commands/init-bootstrap.md b/.claude/commands/init-bootstrap.md index ec01ba4..a1b058c 100644 --- a/.claude/commands/init-bootstrap.md +++ b/.claude/commands/init-bootstrap.md @@ -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) - Create initial templates if requested - 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 8. **Run Test Commands** @@ -197,6 +198,7 @@ Setup completed with: ✅ Dependencies ✅ Folder structure ✅ Git initialized ✅ Folder structure created ✅ Git repository initialized and disconnected from original ✅ CLAUDE.md personalized +✅ First-run setup completed [✅ MCP Gemini Vision configured - if set up] [✅ First commit made - if git was initialized] ``` @@ -224,6 +226,7 @@ Now setting up your environment... ✅ Dependencies installed ✅ Core folders created ✅ Git repository ready (disconnected from original claudesidian) +✅ First-run marker removed Now let me ask you a few questions to customize your setup: diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..3fce932 --- /dev/null +++ b/.claude/settings.json @@ -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" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/FIRST_RUN b/FIRST_RUN new file mode 100644 index 0000000..920480d --- /dev/null +++ b/FIRST_RUN @@ -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 \ No newline at end of file