Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: update stale .env paths in cron script, docs, and package.json m…
…ain entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • Loading branch information
willynikes2 and claude committed Mar 23, 2026
commit 3e2469ff9681325b8760038f84dfc681fc999d14
2 changes: 1 addition & 1 deletion EXTENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ journalctl -u kb-server -f
- `ProtectSystem=strict` and `NoNewPrivileges=true` for security hardening
- `Restart=on-failure` with 5 attempts per 60 seconds

Environment variables should be set in a `.env` file in the project root (loaded by `dotenv/config`).
Environment variables should be set in `~/.knowledge-base/.env` (loaded automatically on startup). Run `kb setup` to generate this file.

### Recipe 5: Add New Ingestion Source Type

Expand Down
15 changes: 7 additions & 8 deletions bin/cron-capture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ export NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
export PATH="$HOME/.nvm/versions/node/$(node -v 2>/dev/null || echo v22.22.1)/bin:/usr/local/bin:/usr/bin:$PATH"
export OBSIDIAN_VAULT_PATH="${OBSIDIAN_VAULT_PATH:-$HOME/obsidian-vault}"
KB_DIR="${KB_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
KB_DATA_DIR="$HOME/.knowledge-base"

# Load .env
if [ -f "$KB_DIR/.env" ]; then
set -a; source "$KB_DIR/.env"; set +a
# Load .env from canonical location
if [ -f "$KB_DATA_DIR/.env" ]; then
set -a; source "$KB_DATA_DIR/.env"; set +a
fi

# 1. Sync X bookmarks
Expand All @@ -17,13 +17,12 @@ if [ -f ~/knowledgebase/sync-x-bookmarks.sh ]; then
fi

# 2. Capture X bookmarks to vault
cd "$KB_DIR"
node bin/kb.js capture-x 2>/dev/null
kb capture-x 2>/dev/null

# 3. Reindex vault (safety net)
node bin/kb.js vault reindex 2>/dev/null
kb vault reindex 2>/dev/null

# 4. Auto-classify new clippings/inbox notes
node bin/kb.js classify 2>/dev/null
kb classify 2>/dev/null

echo "[cron-capture] Done at $(date)"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bin": {
"kb": "./bin/kb.js"
},
"main": "./src/index.js",
"main": "./src/server.js",
"engines": {
"node": ">=18.0.0"
},
Expand Down