wiki-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Obsidian Setup — Vault Initialization

Obsidian设置 — Vault初始化

You are setting up a new Obsidian wiki vault (or repairing an existing one).
你正在搭建一个新的Obsidian wiki vault(或修复现有vault)。

Step 1: Create .env

步骤1:创建.env

If
.env
doesn't exist, create it from
.env.example
. Ask the user for:
  1. Where should the vault live?
    OBSIDIAN_VAULT_PATH
    • Default:
      ~/Documents/obsidian-wiki-vault
    • Must be an absolute path (after expansion)
  2. Where are your source documents?
    OBSIDIAN_SOURCES_DIR
    • Can be multiple paths, comma-separated
    • Default:
      ~/Documents
  3. Want to import Claude history?
    CLAUDE_HISTORY_PATH
    • Default: auto-discovers from
      ~/.claude
    • Set explicitly if Claude data is elsewhere
  4. Have QMD installed?
    QMD_WIKI_COLLECTION
    /
    QMD_PAPERS_COLLECTION
    • Optional. Enables semantic search in
      wiki-query
      and source discovery in
      wiki-ingest
      .
    • If unsure, skip for now — both skills fall back to
      Grep
      automatically.
    • Install instructions: see
      .env.example
      (QMD section).
如果
.env
不存在,就基于
.env.example
创建它。向用户询问以下信息:
  1. vault应该存放在哪里?
    OBSIDIAN_VAULT_PATH
    • 默认值:
      ~/Documents/obsidian-wiki-vault
    • 必须是(展开后的)绝对路径
  2. 你的源文档存放在哪里?
    OBSIDIAN_SOURCES_DIR
    • 可以是多个路径,用英文逗号分隔
    • 默认值:
      ~/Documents
  3. 需要导入Claude历史记录吗?
    CLAUDE_HISTORY_PATH
    • 默认值:自动从
      ~/.claude
      路径发现
    • 如果Claude数据存放在其他位置请明确设置
  4. 是否安装了QMD?
    QMD_WIKI_COLLECTION
    /
    QMD_PAPERS_COLLECTION
    • 可选配置。开启后可支持
      wiki-query
      的语义搜索和
      wiki-ingest
      的源发现功能
    • 如果不确定可以暂时跳过,这两个技能会自动降级使用
      Grep
    • 安装说明:查看
      .env.example
      的QMD部分

Step 2: Create Vault Directory Structure

步骤2:创建Vault目录结构

bash
mkdir -p "$OBSIDIAN_VAULT_PATH"/{concepts,entities,skills,references,synthesis,journal,projects,_archives,_raw,.obsidian}
  • .obsidian/
    — Obsidian's own config. Creates vault recognition.
  • projects/
    — Per-project knowledge (populated during ingest).
  • _archives/
    — Stores wiki snapshots for rebuild/restore operations.
  • _raw/
    — Staging area for unprocessed drafts. Drop rough notes here;
    wiki-ingest
    will promote them to proper wiki pages and delete the originals.
bash
mkdir -p "$OBSIDIAN_VAULT_PATH"/{concepts,entities,skills,references,synthesis,journal,projects,_archives,_raw,.obsidian}
  • .obsidian/
    — Obsidian自身的配置目录,用于标识vault身份
  • projects/
    — 项目维度的知识内容(在ingest过程中自动填充)
  • _archives/
    — 存储wiki快照,用于重建/恢复操作
  • _raw/
    — 未处理草稿的暂存区。把粗略的笔记放在这里,
    wiki-ingest
    会将它们转化为规范的wiki页面并删除原始草稿

Step 3: Create Special Files

步骤3:创建特殊文件

index.md

index.md

markdown
---
title: Wiki Index
---
markdown
---
title: Wiki Index
---

Wiki Index

Wiki Index

This index is automatically maintained. Last updated: TIMESTAMP
本索引会自动维护。最后更新时间:TIMESTAMP

Concepts

概念

No pages yet. Use
wiki-ingest
to add your first source.
暂无页面。使用
wiki-ingest
添加你的第一个源内容。

Entities

实体

Skills

技能

References

参考资料

Synthesis

综合内容

Journal

日志

undefined
undefined

log.md

log.md

markdown
---
title: Wiki Log
---
markdown
---
title: Wiki Log
---

Wiki Log

Wiki Log

  • [TIMESTAMP] INIT vault_path="OBSIDIAN_VAULT_PATH" categories=concepts,entities,skills,references,synthesis,journal
undefined
  • [TIMESTAMP] INIT vault_path="OBSIDIAN_VAULT_PATH" categories=concepts,entities,skills,references,synthesis,journal
undefined

Step 4: Create .obsidian Configuration

步骤4:创建.obsidian配置

Create minimal Obsidian config for a good out-of-box experience:
创建最简Obsidian配置,开箱即可获得良好使用体验:

.obsidian/app.json

.obsidian/app.json

json
{
  "strictLineBreaks": false,
  "showFrontmatter": false,
  "defaultViewMode": "preview",
  "livePreview": true
}
json
{
  "strictLineBreaks": false,
  "showFrontmatter": false,
  "defaultViewMode": "preview",
  "livePreview": true
}

.obsidian/appearance.json

.obsidian/appearance.json

json
{
  "baseFontSize": 16
}
json
{
  "baseFontSize": 16
}

Step 5: Recommend Obsidian Plugins

步骤5:推荐Obsidian插件

Tell the user about these recommended community plugins (they install manually):
  1. Dataview — Query page metadata, create dynamic tables. Essential for a wiki.
  2. Graph Analysis — Enhanced graph view for exploring connections.
  3. Templater — If they want to create pages manually using templates.
  4. Obsidian Git — Auto-backup the vault to a git repo.
告知用户以下推荐的社区插件(需要用户手动安装):
  1. Dataview — 查询页面元数据,创建动态表格,是wiki的必备插件
  2. Graph Analysis — 增强的图谱视图,用于探索内容关联
  3. Templater — 适合需要使用模板手动创建页面的用户
  4. Obsidian Git — 自动将vault备份到git仓库

Step 6: Verify Setup

步骤6:验证设置

Run a quick sanity check:
  • Vault directory exists with:
    concepts/
    ,
    entities/
    ,
    skills/
    ,
    references/
    ,
    synthesis/
    ,
    journal/
    ,
    projects/
    ,
    _archives/
    ,
    _raw/
  • index.md
    exists at vault root
  • log.md
    exists at vault root
  • .env
    has
    OBSIDIAN_VAULT_PATH
    set
  • .obsidian/
    directory exists
  • Source directories (if configured) exist and are readable
Report the results and tell the user they can now:
  1. Open the vault in Obsidian (File → Open Vault → select the directory)
  2. Run
    wiki-status
    to see what's available to ingest
  3. Run
    wiki-ingest
    to add their first sources
  4. Run
    claude-history-ingest
    to mine their Claude conversations
  5. Run
    codex-history-ingest
    to mine their Codex sessions (if they use Codex)
  6. Run
    wiki-status
    again anytime to check the delta
执行快速可用性检查:
  • Vault目录存在,包含以下子目录:
    concepts/
    entities/
    skills/
    references/
    synthesis/
    journal/
    projects/
    _archives/
    _raw/
  • Vault根目录下存在
    index.md
  • Vault根目录下存在
    log.md
  • .env
    中已配置
    OBSIDIAN_VAULT_PATH
  • .obsidian/
    目录存在
  • 源目录(如果已配置)存在且可读
向用户报告检查结果,并告知用户现在可以进行以下操作:
  1. 在Obsidian中打开vault(文件 → 打开Vault → 选择对应目录)
  2. 运行
    wiki-status
    查看可导入的内容
  3. 运行
    wiki-ingest
    添加第一批源内容
  4. 运行
    claude-history-ingest
    提取Claude对话内容
  5. 运行
    codex-history-ingest
    提取Codex会话内容(如果使用Codex)
  6. 随时可以再次运行
    wiki-status
    查看增量变更