commit b013bef372267865abef4c7b5f83357254fe0306 Author: kenpat Date: Fri Jun 12 00:04:40 2026 -0500 init: samurai setup script — vault clone, git config, Obsidian auto-start diff --git a/README.md b/README.md new file mode 100644 index 0000000..276e1d0 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Device Setup Scripts + +Setup scripts for all KiteStacks devices. Clone this repo on any new device and run the relevant script. + +## Devices +- `samurai/` — Windows 11 gaming desktop (Tailscale: 100.74.0.109) +- `monk/` — Linux T14s primary host (Tailscale: 100.85.209.116) + +## Usage on a new device +```bash +git clone ssh://git@100.85.209.116:2222/kenpat/device-setup.git +cd device-setup +# then run the script for your device +``` diff --git a/samurai/setup.sh b/samurai/setup.sh new file mode 100644 index 0000000..a741f09 --- /dev/null +++ b/samurai/setup.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash +# samurai setup script — run from Claude Code (Git Bash) on samurai +# Usage: bash setup.sh + +set -e +MONK="100.85.209.116" +MONK_GIT_PORT="2222" +VAULT="$HOME/obsidian-vault" +STUDY="$HOME/study-tracker" + +echo "=== KiteStacks Samurai Setup ===" + +# ── Step 1: SSH host key ────────────────────────────────────────────── +echo "[1/5] Adding Forgejo host key..." +mkdir -p ~/.ssh +ssh-keyscan -p $MONK_GIT_PORT $MONK >> ~/.ssh/known_hosts 2>/dev/null +echo " done" + +# ── Step 2: Clone obsidian vault ────────────────────────────────────── +echo "[2/5] Cloning obsidian-vault..." +if [ -d "$VAULT" ]; then + echo " already exists, pulling latest..." + git -C "$VAULT" pull +else + git clone ssh://git@${MONK}:${MONK_GIT_PORT}/kenpat/obsidian-vault.git "$VAULT" +fi +echo " done: $VAULT" + +# ── Step 3: Clone study tracker ─────────────────────────────────────── +echo "[3/5] Cloning study-tracker..." +if [ -d "$STUDY" ]; then + echo " already exists, pulling latest..." + git -C "$STUDY" pull +else + git clone ssh://git@${MONK}:${MONK_GIT_PORT}/kenpat/study-tracker.git "$STUDY" +fi +echo " done: $STUDY" + +# ── Step 4: Configure git identity ─────────────────────────────────── +echo "[4/5] Configuring git..." +git -C "$VAULT" config user.email "kenpat7177@gmail.com" +git -C "$VAULT" config user.name "kenpat" +git -C "$STUDY" config user.email "kenpat7177@gmail.com" +git -C "$STUDY" config user.name "kenpat" +echo " done" + +# ── Step 5: Obsidian auto-start ─────────────────────────────────────── +echo "[5/5] Setting up Obsidian auto-start..." +STARTUP="$APPDATA/Microsoft/Windows/Start Menu/Programs/Startup" +OBSIDIAN_EXE=$(find "$LOCALAPPDATA/Obsidian" -name "Obsidian.exe" 2>/dev/null | head -1) + +if [ -n "$OBSIDIAN_EXE" ]; then + powershell.exe -ExecutionPolicy Bypass -Command " +\$lnk = (New-Object -ComObject WScript.Shell).CreateShortcut('$STARTUP\Obsidian.lnk') +\$lnk.TargetPath = '$OBSIDIAN_EXE' +\$lnk.Arguments = '--vault \"$VAULT\"' +\$lnk.Save() +Write-Host 'Auto-start shortcut created' +" +else + echo " Obsidian.exe not found — install Obsidian first then re-run this script" +fi + +echo "" +echo "=== Setup complete ===" +echo " Vault: $VAULT" +echo " Study log: $STUDY" +echo " Auto-start: Obsidian opens on login" +echo "" +echo "Next: Open Obsidian, select vault at $VAULT" +echo " Install plugins: Git + Pomodoro Timer"