mirror of
https://github.com/Ar9av/obsidian-wiki.git
synced 2026-09-14 20:36:34 +08:00
ea4508114e
setup.sh had an interactive git-sync flow (git init, .gitignore, remote, a generated sync.sh, optional cron) that `obsidian-wiki setup` — the entry point pip/uv installs actually run — never had, so those installs silently skipped it and .env.example documented a var nothing ever read. Move the git plumbing into obsidian_wiki/sync.py (configure_sync/run_sync/ get_remote) and expose it as `obsidian-wiki sync-setup <url>` and `obsidian-wiki sync`. `obsidian-wiki setup` now offers the same interactive prompt setup.sh always had (or accepts --remote non-interactively), and setup.sh's own prompt delegates into the same module via the CLI instead of re-implementing it. Sync status is read live from the vault's own `git remote` (via `obsidian-wiki info`) rather than a config var that could drift.
123 lines
5.4 KiB
Bash
123 lines
5.4 KiB
Bash
# =============================================================================
|
|
# Obsidian Wiki — Environment Configuration
|
|
# Copy this to .env and set your vault path
|
|
# =============================================================================
|
|
|
|
# --- Required ---
|
|
|
|
# Absolute path to your Obsidian vault
|
|
OBSIDIAN_VAULT_PATH=
|
|
|
|
# --- Optional ---
|
|
|
|
# GitHub sync (any install path — pip/uv or setup.sh) is opt-in and configured
|
|
# with `obsidian-wiki sync-setup <repo-url>`, or the GitHub-sync prompt inside
|
|
# `obsidian-wiki setup` / `setup.sh`. There's no env var for it: the vault's own
|
|
# `git remote` is the source of truth, so it can't drift out of sync with this
|
|
# file. Run `obsidian-wiki sync` any time to commit and push pending changes.
|
|
|
|
# Comma-separated source directories to ingest documents from
|
|
# Leave empty to skip document ingestion
|
|
#
|
|
# Local git repo clones work here too (public or private, any host — GitHub,
|
|
# GitLab, self-hosted). Clone the repo locally first, then add its path here.
|
|
# Repo directories are auto-detected (a `.git` folder is present) and
|
|
# enumerated via `git ls-files`, so whatever the repo's own .gitignore
|
|
# excludes (node_modules, build output, venvs, secrets, ...) is skipped
|
|
# automatically instead of relying on a hardcoded skip-list.
|
|
OBSIDIAN_SOURCES_DIR=
|
|
|
|
# Wiki categories (directories created in the vault)
|
|
OBSIDIAN_CATEGORIES=concepts,entities,skills,references,synthesis,journal
|
|
|
|
# Max pages to create/update per ingest operation
|
|
OBSIDIAN_MAX_PAGES_PER_INGEST=15
|
|
|
|
# Projects to exclude from history ingest (claude/codex/hermes/… history-ingest skills).
|
|
# Comma-separated substrings matched against the project directory name. A project
|
|
# dir whose name contains any of these is skipped during scan, delta, and manifest steps.
|
|
# Example: WIKI_SKIP_PROJECTS=archived,scratch,sandbox
|
|
WIKI_SKIP_PROJECTS=
|
|
|
|
# Claude conversation history path (auto-discovered from ~/.claude if empty)
|
|
CLAUDE_HISTORY_PATH=
|
|
|
|
# Codex history path (defaults to ~/.codex if empty)
|
|
CODEX_HISTORY_PATH=
|
|
|
|
# Pi agent session history path (defaults to ~/.pi/agent/sessions if empty)
|
|
PI_HISTORY_PATH=
|
|
|
|
# Lint schedule: daily | weekly | manual
|
|
LINT_SCHEDULE=weekly
|
|
|
|
# Internal link format for generated/updated pages
|
|
# wikilink (default) → [[concepts/foo]] or [[concepts/foo|display text]]
|
|
# markdown → [display text](relative/path.md)
|
|
# Only affects future writes — existing vault content is never migrated automatically.
|
|
OBSIDIAN_LINK_FORMAT=wikilink
|
|
|
|
# --- QMD Semantic Search (optional) ---
|
|
#
|
|
# QMD indexes your wiki and sources for fast semantic search.
|
|
# Install: https://github.com/tobi/qmd
|
|
# After installing, point these at your QMD collection names (set when you ran `qmd index`).
|
|
#
|
|
# Without QMD: wiki-ingest and wiki-query fall back to Grep/Glob — fully functional, just slower.
|
|
# With QMD: semantic search replaces grep passes, enabling concept-level matches and cross-collection queries.
|
|
|
|
# Name of the QMD collection indexing your compiled wiki pages (OBSIDIAN_VAULT_PATH)
|
|
QMD_WIKI_COLLECTION=
|
|
|
|
# Name of the QMD collection indexing your raw source documents (OBSIDIAN_SOURCES_DIR or _raw/)
|
|
QMD_PAPERS_COLLECTION=
|
|
|
|
# QMD integration transport: mcp | cli
|
|
# mcp preserves the original behavior and uses an agent-configured QMD MCP server.
|
|
# cli runs the local qmd command directly; useful for agents without QMD MCP support.
|
|
QMD_TRANSPORT=mcp
|
|
|
|
# CLI search quality mode: quality | balanced | fast
|
|
# quality: qmd query with reranking (best relevance, slowest on CPU)
|
|
# balanced: qmd query --no-rerank (good hybrid results, faster)
|
|
# fast: qmd vsearch (semantic only) or qmd search when exact terms matter
|
|
QMD_CLI_SEARCH_MODE=quality
|
|
|
|
# Optional qmd binary override if qmd is not on PATH.
|
|
QMD_CLI=qmd
|
|
|
|
# --- Vault Skill Factory (optional) ---
|
|
#
|
|
# vault-skill-factory turns mature curated pages into portable Agent Skills.
|
|
# Generated skills land in a REVIEW directory — never auto-installed, never written to .skills/.
|
|
#
|
|
# Where generated skills are written (default: <OBSIDIAN_VAULT_PATH>/_generated-skills — a
|
|
# vault-level excluded dir like _raw/_staging, NOT the skills/ knowledge category).
|
|
SKILL_FACTORY_OUTPUT_DIR=
|
|
# Which lifecycle states count as "mature" enough to harvest (pages with tier: core also qualify).
|
|
SKILL_FACTORY_MATURITY=reviewed,verified
|
|
# --- PageIndex: structure-aware long-PDF preprocessing (optional) ---
|
|
#
|
|
# For long PDFs (books, reports), build a table-of-contents tree (section titles +
|
|
# summaries + page ranges) before ingest, so the agent reads only relevant sections.
|
|
# Install: clone https://github.com/VectifyAI/PageIndex, create a venv (uv), and put an
|
|
# LLM key in <repo>/.env (LiteLLM; e.g. deepseek/deepseek-v4-flash or openai/glm-4.6).
|
|
# See wiki-ingest/references/pageindex.md. Without it: wiki-ingest reads PDFs directly.
|
|
#
|
|
# Path to the PageIndex repo (enables the wiki-ingest long-PDF branch).
|
|
PAGEINDEX_REPO=
|
|
# LiteLLM model id PageIndex uses (default openai/glm-4.6).
|
|
PAGEINDEX_MODEL=openai/glm-4.6
|
|
# Only preprocess PDFs with at least this many pages.
|
|
PAGEINDEX_MIN_PAGES=30
|
|
# Optional cache dir for *_structure.json (default: <PAGEINDEX_REPO>/results).
|
|
PAGEINDEX_WORKSPACE=
|
|
|
|
# --- Raw Staging Directory (optional) ---
|
|
#
|
|
# A directory inside OBSIDIAN_VAULT_PATH for unprocessed draft pages.
|
|
# Drop rough notes, clipboard pastes, or quick captures here.
|
|
# wiki-ingest will promote them to proper wiki pages when you run it.
|
|
# Promoted files are deleted from _raw/ after processing.
|
|
OBSIDIAN_RAW_DIR=_raw
|