Audit and optimize for CapableMind development
Brewfile: stripped to essential tools (~600MB freed), removed boost, cmake, aerc, newsboat, fontforge, starship, and 24 auto-dependencies. Added caffeine, ollama, fastfetch, ocrmypdf, tea, sshpass, vitetris. Dropped 1password, iterm2, github-desktop, hazel, swiftbar, oversight. Shell: fixed all stale references (fzf, zoxide, starship, old paths, Homebrew node aliases). Updated project paths to ~/_Dev/. Added CapableMind aliases (cm, bmf, bmf-health, bmf-status, bmf-logs). Configs: removed iterm2, neofetch, swiftbar configs. Added capablemind (launchd plists, MCP example, bmf-start script). Updated SSH config with git.skemantix.com. Added CLAUDE.md to dotfiles. Scripts: consolidated 3 backup scripts into 1 (backup-all-secrets.sh), added pass store backup. Added setup-capablemind.sh for full environment reconstruction. Updated symlinks.sh for new config structure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
e7bb361bd2
commit
066a47a26b
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# BMF (BetterMemories) launch script for launchd
|
||||
# Pulls ANTHROPIC_API_KEY from macOS keychain, starts BMF with teacher in API mode.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export HOME="/Users/davidglidden"
|
||||
export PATH="/Users/davidglidden/.nvm/versions/node/v22.16.0/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
|
||||
# Pull API key from env file
|
||||
set -a
|
||||
source /Users/davidglidden/.capablemind/env
|
||||
set +a
|
||||
|
||||
# BMF config
|
||||
export BM_PORT="3011"
|
||||
export BM_TEACHER_TRANSPORT="api"
|
||||
export BMF_MCP_TOKEN="bm_key_REDACTED"
|
||||
|
||||
# Ollama needs to be reachable
|
||||
export OLLAMA_HOST="${OLLAMA_HOST:-http://127.0.0.1:11434}"
|
||||
|
||||
cd /Users/davidglidden/_Dev/BetterMemories.io
|
||||
exec node dist/index.js
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/zsh
|
||||
# Mirror CapableMind thinking/David/ to Obsidian vault
|
||||
# Excludes CLAUDE.md (repo-specific, not for vault)
|
||||
|
||||
SOURCE="$HOME/_Dev/CapableMind-AI/docs/thinking/David/"
|
||||
DEST="$HOME/Library/Mobile Documents/iCloud~md~obsidian/Documents/David, root-and-branch/00. Compass/00b. Constellations/CapableMind/thinking-mirror/"
|
||||
|
||||
rsync -av --delete --exclude='CLAUDE.md' "$SOURCE" "$DEST" > /dev/null 2>&1
|
||||
@@ -0,0 +1,14 @@
|
||||
# Git internals (never mirror a .git from anywhere)
|
||||
.git/
|
||||
# OS cruft
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
# Obsidian volatile state
|
||||
.obsidian/workspace.json
|
||||
.obsidian/workspace-mobile.json
|
||||
.obsidian/plugins/obsidian-git/data.json
|
||||
.obsidian/cache/
|
||||
# Optional: ignore huge/unneeded subtrees on the mirror
|
||||
# attachments/raw_video/
|
||||
# attachments/raw_audio/
|
||||
# node_modules/ # if you keep code inside the vault
|
||||
Executable
+92
@@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
########################################
|
||||
# CONFIG — EDIT THESE 4 LINES
|
||||
########################################
|
||||
VAULT_PATH="/Users/davidglidden/Library/Mobile Documents/iCloud~md~obsidian/Documents/David, root-and-branch"
|
||||
MIRROR_PATH="/Users/davidglidden/_Dev/david-root-and-branch-vault-git"
|
||||
GIT_REMOTE="https://git.skemantix.com/David/david-root-and-branch-vault-git.git"
|
||||
GIT_BRANCH="main"
|
||||
|
||||
# Optional: set your git identity here (comment out if already global)
|
||||
# GIT_NAME="David Glidden"
|
||||
# GIT_EMAIL="you@example.com"
|
||||
|
||||
# Excludes file lives alongside this script
|
||||
EXCLUDES_FILE="$(dirname "$0")/obsidian_rsync_excludes.txt"
|
||||
LOG_FILE="${HOME}/Library/Logs/vaultsync.log"
|
||||
########################################
|
||||
|
||||
timestamp() { date "+%Y-%m-%d %H:%M:%S"; }
|
||||
log() { printf "[%s] %s\n" "$(timestamp)" "$*" | tee -a "$LOG_FILE"; }
|
||||
|
||||
ensure_paths() {
|
||||
mkdir -p "$(dirname "$LOG_FILE")"
|
||||
mkdir -p "$MIRROR_PATH"
|
||||
}
|
||||
|
||||
# Guard: skip if iCloud still downloading placeholders (*.icloud)
|
||||
icloud_busy() {
|
||||
# Any placeholder files inside vault?
|
||||
# NOTE: adjust -prune if you want to skip very large folders from scanning
|
||||
if find "$VAULT_PATH" -type f -name "*.icloud" -print -quit | grep -q . ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
init_git_repo() {
|
||||
if [ ! -d "$MIRROR_PATH/.git" ]; then
|
||||
log "Initializing git repo in $MIRROR_PATH"
|
||||
git init "$MIRROR_PATH"
|
||||
git -C "$MIRROR_PATH" checkout -b "$GIT_BRANCH" || true
|
||||
git -C "$MIRROR_PATH" remote add origin "$GIT_REMOTE" || true
|
||||
git -C "$MIRROR_PATH" config user.name "$GIT_NAME" || true
|
||||
git -C "$MIRROR_PATH" config user.email "$GIT_EMAIL" || true
|
||||
fi
|
||||
}
|
||||
|
||||
do_rsync() {
|
||||
log "Syncing from iCloud vault → mirror"
|
||||
rsync -av --delete \
|
||||
--exclude-from="$EXCLUDES_FILE" \
|
||||
"$VAULT_PATH"/ "$MIRROR_PATH"/ | tee -a "$LOG_FILE"
|
||||
}
|
||||
|
||||
do_commit_push() {
|
||||
log "Checking for changes to commit"
|
||||
if ! git -C "$MIRROR_PATH" diff --quiet || \
|
||||
! git -C "$MIRROR_PATH" diff --cached --quiet || \
|
||||
[ -n "$(git -C "$MIRROR_PATH" ls-files --others --exclude-standard)" ]; then
|
||||
git -C "$MIRROR_PATH" add -A
|
||||
git -C "$MIRROR_PATH" commit -m "Mirror sync $(date +%Y-%m-%d_%H-%M-%S)" --no-verify
|
||||
log "Committed changes"
|
||||
# Push; if first push, set upstream
|
||||
if git -C "$MIRROR_PATH" rev-parse --verify "$GIT_BRANCH" >/dev/null 2>&1; then
|
||||
git -C "$MIRROR_PATH" push origin "$GIT_BRANCH" || log "Push failed (network?). Will retry next run."
|
||||
else
|
||||
git -C "$MIRROR_PATH" push -u origin "$GIT_BRANCH" || log "First push failed. Check remote."
|
||||
fi
|
||||
else
|
||||
log "No changes to commit"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
ensure_paths
|
||||
|
||||
if icloud_busy; then
|
||||
log "iCloud still downloading placeholders (*.icloud). Skipping this run."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
init_git_repo
|
||||
do_rsync
|
||||
do_commit_push
|
||||
|
||||
log "Done."
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user