You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2dffb2d
Browse filesBrowse the repository at this point in the historyBrowse files
If the installed CLI entry point is not on PATH, use:
1057
+
1058
+
```bash
1059
+
python -m codewiki --version
1060
+
```
1061
+
1002
1062
> **For developers** (latest unreleased changes) — [uv](https://docs.astral.sh/uv/) is recommended to reproduce the dev environment exactly as locked by `uv.lock` (`tool.uv.default-groups = ["dev"]` includes dev tools):
> Existing clones are origin-validated only by default;`--update` runs `fetch origin` + `merge --ff-only @{upstream}` only forclean working trees. `--force` overwrites only modified CodeWiki-managed AGENTS/MCP/hook/skill content; it never deletes directories, resets Git, switches layout, commits, or pushes. Do not store tokensin clone URLs or registration config, and logs redact sensitive URL fields. setup/bootstrap never analyze code or generate Wiki automatically. `--lang zh|en` sets skill/MCP language and `--dry-run` previews only. The generated MCP interpreter is platform-specific (`python` on Windows, `python3` on macOS/Linux). The steps below are the manual equivalent.
1020
1080
1081
+
**CLI install and initialization**
1082
+
1083
+
After installation, complete first-time wiring from the command line:
1084
+
1085
+
```bash
1086
+
# Wire the current project as a single-repo workspace
1087
+
codewiki setup --mode single
1088
+
1089
+
# Target a specific project directory (useful for scripts or CI)
1090
+
codewiki setup --repo-path /path/to/project --mode single
1091
+
1092
+
# Initialize a multi-repo workspace and register/clone business repos
1093
+
codewiki setup --repo-path /path/to/workspace --mode multi \
1094
+
--repo https://github.com/org/repo-a.git \
1095
+
--repo https://github.com/org/repo-b.git
1096
+
1097
+
# Initialize a multi-repo workspace without registering business repos
1098
+
codewiki setup --repo-path /path/to/workspace --mode multi
1099
+
1100
+
# Preview without writing files, cloning, or initializing Git
1101
+
codewiki setup --repo-path /path/to/workspace --mode multi --dry-run
1102
+
```
1103
+
1104
+
If `codewiki` is not on PATH, replace `codewiki setup` with `python -m codewiki setup`.
1105
+
1106
+
- `--repo` is optional and repeatable. The first run can initialize the workspace without any repo, and repos can be registered later with `codewiki setup --repo <URL>` or `add_workspace_repo`.
1107
+
- `--layout` is optional. New multi-repo workspaces default to `centralized`; existing unconfigured multi-repo workspaces default to `colocated`; once a layout is saved, it cannot be switched in place.
1108
+
- setup only confirms workspace mode, wires hooks/session capture, merges `.mcp.json`, and refreshes skill snapshots. It does not analyze code or generate Wiki content.
Re-running `codewiki setup` is idempotent: it refreshes the `codewiki-*` skill snapshots, the CodeWiki-managed marked blocks in AGENTS.md (task-memory guidance block and the "CodeWiki LLM Wiki" usage block), and hook wiring, keeping them aligned with the installed package version. Manually modified managed content is blocked with a hint — pass `--force` to overwrite if you accept losing your edits. For multi-repo workspaces, AGENTS.md is refreshed by `init_workspace` during setup's multi flow.
0 commit comments