Làm một lần (~5 phút), sau đó dùng được cho mọi dự án
Cần xem source đầy đủ? Mở trên GitHub
Trước khi bắt đầu, bạn cần 3 thứ sau:
claude --version trong terminal hoặc thấy icon Claude trong VS Code/JetBrains)git --version)scripts/validate.py + trace tools)Nếu KHÔNG có Bash trên Windows → xem phần Khi gặp lỗi thường gặp phần "Windows native (không Bash)".
Bạn chỉ cần 1 lệnh để tải + giải nén + cài tự động từ bản phát hành mới nhất trên GitHub.
curl -fsSL https://github.com/philngt/contextd/releases/latest/download/install.sh | shiwr https://github.com/philngt/contextd/releases/latest/download/install.ps1 -UseBasicParsing | iexCác URL này luôn trỏ tới installer mới nhất đã publish.
Hoặc tải zip thủ công nếu cần, rồi chạy installer như cũ.
Link này hoạt động khi bạn mở file trên máy hoặc host thư mục có chứa release/.
Giải nén vào thư mục tuỳ ý — vd ~/wiki trên Linux/macOS hoặc D:\tool\wiki-template trên Windows.
mkdir -p ~/wiki && unzip contextd-latest.zip -d ~/wiki
# Zip chứa folder gốc 'wiki-template' → unzip sẽ tạo ~/wiki/wiki-template/
cd ~/wiki/wiki-template
# PowerShell
Expand-Archive -Path contextd-latest.zip -DestinationPath D:\tool
# Tạo D:\tool\wiki-template\
cd D:\tool\wiki-template
# Hoặc Git Bash
unzip contextd-latest.zip -d /d/tool
Hoặc click chuột phải file zip → "Extract All..." trong File Explorer.
Giống Step 2 cách Git clone — file scripts/install-to-claude.sh đã có trong zip:
bash scripts/install-to-claude.sh
Verify giống cách Git: cat ~/.claude/wiki-global.json phải thấy "wiki_root" đúng path bạn vừa extract.
Giống Step 3 bên dưới — gõ /contextd-setup trong codebase.
git pull. Khuyên dùng dùng cách Git clone nếu bạn sẽ update thường xuyên.
bash scripts/package-release.sh. Output ghi vào release/wiki-template-{version}.zip + release/contextd-latest.zip. Auto-exclude .git/, evidence raw, workspaces khác wiki/, runs/cache/log files. Xem scripts/package-release.sh --help.
Nếu bạn có Git và muốn cập nhật dễ hơn về sau, dùng cách này.
Chọn 1 thư mục gốc tuỳ ý — vd ~/wiki trên Linux/macOS hoặc D:\tool\wiki-template trên Windows.
git clone https://github.com/philngt/contextd ~/contextd
cd ~/contextd
git clone https://github.com/philngt/contextd /d/tool/contextd
cd /d/tool/contextd
Trong Git Bash, Windows path D:\tool\ viết là /d/tool/ (forward slash).
Repo này KHÔNG cần build, KHÔNG cần install dependency — chỉ là markdown + bash scripts.
Chạy 1 lệnh sau (có thể chạy lại nhiều lần, vẫn an toàn):
bash scripts/install-to-claude.sh
Lệnh này sẽ tự làm 3 việc:
~/.claude/commands/ và ~/.claude/agents/ — Claude Code tự đọc folder này~/.claude/wiki-global.json với wiki_root trỏ về repo bạn vừa clonegit pull để cập nhật slash mớiKiểm tra cấu hình đã đúng đường dẫn:
cat ~/.claude/wiki-global.json
# PowerShell
type $env:USERPROFILE\.claude\wiki-global.json
# Hoặc Git Bash
cat ~/.claude/wiki-global.json
Phải thấy field "wiki_root" với absolute path đúng repo bạn vừa clone. Vd:
{
"wiki_root": "/home/user/wiki",
"default_workspace": null,
"obsidian": { ... }
}
Mở Claude Code, gõ /contextd-setup → nếu slash command hiện ra trong autocomplete = OK.
Vào thư mục codebase bạn muốn dùng wiki, mở Claude Code (hoặc IDE extension) tại đó, gõ:
/contextd-setup
Hệ thống sẽ hướng dẫn bạn từng bước:
package.json / pom.xml / Cargo.toml / .../new-workspace {name}<codebase>/.claude/wiki.json với cấu hình hoàn chỉnh + packs override per-codebase/use-contextd, /find, /tool-design, ...).
Tiếp theo: mở index.html để chọn đường đi theo persona (PM / Engineer / Wiki Owner / Solo Builder).
Nếu bạn chưa có Git Bash hoặc WSL, làm thủ công 4 bước sau:
templates\wiki-global.json → %USERPROFILE%\.claude\wiki-global.json"wiki_root" thành absolute path tới repo. Nhớ dùng \\ thay cho \:
{
"wiki_root": "D:\\tool\\wiki-template",
...
}
.claude\commands\ và .claude\agents\ sang %USERPROFILE%\.claude\:
xcopy /E /I /Y .claude\commands %USERPROFILE%\.claude\commands xcopy /E /I /Y .claude\agents %USERPROFILE%\.claude\agents
type %USERPROFILE%\.claude\wiki-global.jsonKhuyên dùng: cài Git for Windows (free) để có Git Bash → installer chạy 1 lệnh đơn giản hơn nhiều.
~/.claude/commands/ có file .md không (vd contextd-setup.md)/exit rồi mở lại; IDE: reload window)bash scripts/install-to-claude.shwiki_root not found khi gõ slash~/.claude/wiki-global.json, confirm "wiki_root" là absolute path (KHÔNG dùng ~, KHÔNG dùng relative)CLAUDE.md, packs/, workspaces/)ls "$(jq -r .wiki_root ~/.claude/wiki-global.json)"/contextd-setup báo "workspace not found"/new-workspace {name} trước (vd /new-workspace acme-corp)/list-workspaceschmod +x scripts/install-to-claude.sh rồi chạy lạibash scripts/install-to-claude.sh (không cần executable bit)Sau mỗi git pull trên repo wiki-template, re-run installer để sync slash commands mới:
cd ~/wiki
git pull
bash scripts/install-to-claude.sh # idempotent — cập nhật tất cả
/tool-design mới ship)packs/Workspaces của bạn (workspaces/{your-ws}/) là dữ liệu — KHÔNG bị ảnh hưởng bởi update engine.
← Quay về Onboarding QUICKSTART.md (text) README.md GitHub Repository