Onboarding improvements: 15-minute quickstart, fix Windows date & Obsidian path, safe mission insertion, accurate Claude init messaging, unify vault naming, update links
This commit is contained in:
@@ -67,19 +67,26 @@ customize_mission() {
|
||||
read -p "Enter your mission statement: " MISSION
|
||||
|
||||
if [ -n "$MISSION" ]; then
|
||||
# Update files with mission
|
||||
for file in "CLAUDE.md" "Templates/Daily Template.md"; do
|
||||
if [ -f "$file" ]; then
|
||||
# Backup original
|
||||
cp "$file" "$file.bak"
|
||||
# Update mission (handling both macOS and Linux)
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' "1s/.*/_$MISSION_/" "$file"
|
||||
else
|
||||
sed -i "1s/.*/_$MISSION_/" "$file"
|
||||
fi
|
||||
# Update mission in CLAUDE.md placeholder
|
||||
if [ -f "CLAUDE.md" ]; then
|
||||
cp "CLAUDE.md" "CLAUDE.md.bak"
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' "s/\[CUSTOMIZE THIS: Add your personal mission statement or life purpose here\]/$MISSION/" "CLAUDE.md"
|
||||
else
|
||||
sed -i "s/\[CUSTOMIZE THIS: Add your personal mission statement or life purpose here\]/$MISSION/" "CLAUDE.md"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# Update mission line in Daily Template placeholder
|
||||
if [ -f "Templates/Daily Template.md" ]; then
|
||||
cp "Templates/Daily Template.md" "Templates/Daily Template.md.bak"
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' "s/_\[CUSTOMIZE THIS: Add your personal mission statement or daily reminder here\]_/_$MISSION_/" "Templates/Daily Template.md"
|
||||
else
|
||||
sed -i "s/_\[CUSTOMIZE THIS: Add your personal mission statement or daily reminder here\]_/_$MISSION_/" "Templates/Daily Template.md"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}✓ Mission statement updated${NC}"
|
||||
fi
|
||||
|
||||
|
||||
@@ -185,11 +185,8 @@ echo.
|
||||
echo What's your main focus right now?
|
||||
set /p FOCUS="Current focus: "
|
||||
|
||||
REM Create first daily note
|
||||
for /f "tokens=1-3 delims=/ " %%a in ('date /t') do (
|
||||
set TODAY=%%c-%%a-%%b
|
||||
)
|
||||
set TODAY=%TODAY: =%
|
||||
REM Create first daily note (locale-agnostic date via PowerShell)
|
||||
for /f %%I in ('powershell -NoProfile -Command "Get-Date -Format yyyy-MM-dd"') do set TODAY=%%I
|
||||
set DAILY_NOTE=%VAULT_PATH%\Daily Notes\%TODAY%.md
|
||||
|
||||
if not exist "%DAILY_NOTE%" (
|
||||
@@ -198,6 +195,11 @@ if not exist "%DAILY_NOTE%" (
|
||||
echo [OK] First daily note created: %TODAY%.md
|
||||
)
|
||||
|
||||
REM Inject focus into Today's Priority if provided
|
||||
if not "%FOCUS%"=="" (
|
||||
powershell -NoProfile -Command "(Get-Content -Raw '%DAILY_NOTE%') -replace '\\*\\*Today''s Priority:\\*\\*','**Today''s Priority:** %FOCUS%' | Set-Content -Encoding UTF8 '%DAILY_NOTE%'"
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
REM Step 8: Final Setup
|
||||
@@ -235,12 +237,17 @@ echo Read the documentation in docs\ for detailed guidance
|
||||
echo.
|
||||
|
||||
REM Offer to open Obsidian
|
||||
if exist "%LOCALAPPDATA%\Obsidian\Obsidian.exe" (
|
||||
set /p OPEN_OBSIDIAN="Open Obsidian now? (y/n): "
|
||||
if /i "!OPEN_OBSIDIAN!"=="y" (
|
||||
set /p OPEN_OBSIDIAN="Open Obsidian now? (y/n): "
|
||||
if /i "!OPEN_OBSIDIAN!"=="y" (
|
||||
REM Try common install locations, then PATH
|
||||
if exist "%LOCALAPPDATA%\Programs\Obsidian\Obsidian.exe" (
|
||||
start "" "%LOCALAPPDATA%\Programs\Obsidian\Obsidian.exe"
|
||||
) else if exist "%LOCALAPPDATA%\Obsidian\Obsidian.exe" (
|
||||
start "" "%LOCALAPPDATA%\Obsidian\Obsidian.exe"
|
||||
echo [OK] Obsidian launched
|
||||
) else (
|
||||
where obsidian >nul 2>nul && start "" obsidian
|
||||
)
|
||||
echo [OK] Obsidian launched
|
||||
)
|
||||
|
||||
echo.
|
||||
|
||||
@@ -125,8 +125,11 @@ if command_exists claude; then
|
||||
fi
|
||||
|
||||
# Initialize Claude in vault
|
||||
claude init 2>/dev/null || true
|
||||
print_success "Claude Code initialized in vault"
|
||||
if claude init >/dev/null 2>&1; then
|
||||
print_success "Claude Code initialized in vault"
|
||||
else
|
||||
print_warning "Claude Code initialization did not complete. You can run 'claude init' inside '$VAULT_PATH' later."
|
||||
fi
|
||||
else
|
||||
print_warning "Skipping Claude Code setup (not installed)"
|
||||
fi
|
||||
@@ -277,7 +280,13 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
read -p "Open Obsidian now? (y/n): " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
open -a Obsidian
|
||||
# Try to open directly to this vault via obsidian URL
|
||||
if command_exists python3; then
|
||||
ENCODED_PATH=$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1]))" "$VAULT_PATH")
|
||||
open "obsidian://open?path=$ENCODED_PATH" || open -a Obsidian
|
||||
else
|
||||
open -a Obsidian
|
||||
fi
|
||||
print_success "Obsidian launched"
|
||||
fi
|
||||
fi
|
||||
@@ -285,7 +294,13 @@ elif command_exists obsidian; then
|
||||
read -p "Open Obsidian now? (y/n): " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
obsidian &
|
||||
# On Linux, try obsidian URL first if xdg-open available
|
||||
if command_exists xdg-open && command_exists python3; then
|
||||
ENCODED_PATH=$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1]))" "$VAULT_PATH")
|
||||
xdg-open "obsidian://open?path=$ENCODED_PATH" >/dev/null 2>&1 || obsidian &
|
||||
else
|
||||
obsidian &
|
||||
fi
|
||||
print_success "Obsidian launched"
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user