agent-wiki-cli 0.3.28__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. agent_wiki_cli-0.5.0/PKG-INFO +534 -0
  2. agent_wiki_cli-0.5.0/README.md +504 -0
  3. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/pyproject.toml +3 -1
  4. agent_wiki_cli-0.5.0/src/agent_wiki_cli.egg-info/PKG-INFO +534 -0
  5. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/agent_wiki_cli.egg-info/SOURCES.txt +28 -0
  6. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/agent_wiki_cli.egg-info/requires.txt +5 -0
  7. agent_wiki_cli-0.5.0/src/llm_wiki_cli/cli.py +461 -0
  8. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/bootstrap_cmd.py +65 -89
  9. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/ci_check_cmd.py +63 -0
  10. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/context_cmd.py +302 -34
  11. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/extract_cmd.py +345 -125
  12. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/generate_prompt_cmd.py +298 -0
  13. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/hook_cmd.py +31 -0
  14. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/install_cmd.py +43 -0
  15. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/lint_cmd.py +704 -0
  16. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/mcp_cmd.py +24 -0
  17. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/metrics_cmd.py +65 -0
  18. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/migrate_cmd.py +91 -12
  19. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/obsidian_cmd.py +71 -0
  20. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/plugins_cmd.py +58 -0
  21. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/prepare_extractors_cmd.py +66 -0
  22. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/review_cmd.py +266 -0
  23. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/sync_cmd.py +372 -66
  24. agent_wiki_cli-0.5.0/src/llm_wiki_cli/commands/team_cmd.py +107 -0
  25. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/trigger_cmd.py +55 -42
  26. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/upgrade_cmd.py +6 -1
  27. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/go_extractor.py +16 -12
  28. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/python_extractor.py +7 -6
  29. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/rust_extractor.py +16 -12
  30. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/ts_extractor.py +13 -60
  31. agent_wiki_cli-0.5.0/src/llm_wiki_cli/services/extractor_helpers.py +431 -0
  32. agent_wiki_cli-0.5.0/src/llm_wiki_cli/services/imports.py +117 -0
  33. agent_wiki_cli-0.5.0/src/llm_wiki_cli/services/inventory_cache.py +357 -0
  34. agent_wiki_cli-0.5.0/src/llm_wiki_cli/services/mcp_server.py +635 -0
  35. agent_wiki_cli-0.5.0/src/llm_wiki_cli/services/metrics.py +209 -0
  36. agent_wiki_cli-0.5.0/src/llm_wiki_cli/services/obsidian.py +591 -0
  37. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/services/packages.py +30 -6
  38. agent_wiki_cli-0.5.0/src/llm_wiki_cli/services/plugins.py +437 -0
  39. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/services/schema.py +138 -15
  40. agent_wiki_cli-0.5.0/src/llm_wiki_cli/services/source_snapshot.py +248 -0
  41. agent_wiki_cli-0.5.0/src/llm_wiki_cli/services/team.py +522 -0
  42. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_bootstrap.py +43 -0
  43. agent_wiki_cli-0.5.0/tests/test_ci_check.py +270 -0
  44. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_context.py +207 -0
  45. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_docker_extract.py +8 -0
  46. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_extract.py +352 -0
  47. agent_wiki_cli-0.5.0/tests/test_extractor_helpers.py +287 -0
  48. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_go_extract.py +18 -17
  49. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_hook.py +16 -1
  50. agent_wiki_cli-0.5.0/tests/test_imports.py +56 -0
  51. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_init.py +2 -1
  52. agent_wiki_cli-0.5.0/tests/test_inventory_cache.py +168 -0
  53. agent_wiki_cli-0.5.0/tests/test_lint.py +702 -0
  54. agent_wiki_cli-0.5.0/tests/test_mcp.py +224 -0
  55. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_migrate.py +76 -0
  56. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_multilanguage_wiki.py +30 -0
  57. agent_wiki_cli-0.5.0/tests/test_obsidian.py +224 -0
  58. agent_wiki_cli-0.5.0/tests/test_phase4_quality.py +180 -0
  59. agent_wiki_cli-0.5.0/tests/test_plugins.py +258 -0
  60. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_rust_extract.py +18 -23
  61. agent_wiki_cli-0.5.0/tests/test_schema.py +48 -0
  62. agent_wiki_cli-0.5.0/tests/test_source_snapshot.py +140 -0
  63. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_sync.py +479 -2
  64. agent_wiki_cli-0.5.0/tests/test_team.py +250 -0
  65. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_trigger.py +2 -2
  66. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_ts_extract.py +14 -4
  67. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_uninstall.py +17 -0
  68. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_upgrade.py +33 -1
  69. agent_wiki_cli-0.3.28/PKG-INFO +0 -425
  70. agent_wiki_cli-0.3.28/README.md +0 -397
  71. agent_wiki_cli-0.3.28/src/agent_wiki_cli.egg-info/PKG-INFO +0 -425
  72. agent_wiki_cli-0.3.28/src/llm_wiki_cli/cli.py +0 -231
  73. agent_wiki_cli-0.3.28/src/llm_wiki_cli/commands/generate_prompt_cmd.py +0 -89
  74. agent_wiki_cli-0.3.28/src/llm_wiki_cli/commands/lint_cmd.py +0 -294
  75. agent_wiki_cli-0.3.28/tests/test_lint.py +0 -195
  76. agent_wiki_cli-0.3.28/tests/test_schema.py +0 -21
  77. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/LICENSE +0 -0
  78. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/setup.cfg +0 -0
  79. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/agent_wiki_cli.egg-info/dependency_links.txt +0 -0
  80. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/agent_wiki_cli.egg-info/entry_points.txt +0 -0
  81. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/agent_wiki_cli.egg-info/top_level.txt +0 -0
  82. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/__init__.py +0 -0
  83. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/__init__.py +0 -0
  84. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/bump_cmd.py +0 -0
  85. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/init_cmd.py +0 -0
  86. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/release_cmd.py +0 -0
  87. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/status_cmd.py +0 -0
  88. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/commands/uninstall_cmd.py +0 -0
  89. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/config.py +0 -0
  90. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/__init__.py +0 -0
  91. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/common.py +0 -0
  92. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/go_scripts/go.mod +0 -0
  93. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/go_scripts/main.go +0 -0
  94. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/rust_scripts/Cargo.lock +0 -0
  95. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/rust_scripts/Cargo.toml +0 -0
  96. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/rust_scripts/src/main.rs +0 -0
  97. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/ts_scripts/extract.js +0 -0
  98. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/extractors/ts_scripts/package.json +0 -0
  99. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/services/__init__.py +0 -0
  100. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/services/circuit_breaker.py +0 -0
  101. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/services/io.py +0 -0
  102. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/services/lockfile.py +0 -0
  103. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/services/paths.py +0 -0
  104. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/services/secure_file.py +0 -0
  105. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/src/llm_wiki_cli/services/versioning.py +0 -0
  106. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_bump.py +0 -0
  107. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_circuit_breaker.py +0 -0
  108. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_config.py +0 -0
  109. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_docker_bootstrap.py +0 -0
  110. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_docker_lint.py +0 -0
  111. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_e2e.py +0 -0
  112. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_generate_prompt.py +0 -0
  113. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_io.py +0 -0
  114. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_lockfile.py +0 -0
  115. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_package_metadata.py +0 -0
  116. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_release.py +0 -0
  117. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_status.py +0 -0
  118. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.5.0}/tests/test_versioning.py +0 -0
@@ -0,0 +1,534 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-wiki-cli
3
+ Version: 0.5.0
4
+ Summary: CLI tool to maintain hybrid LLM Wikis for multi-language projects.
5
+ Author-email: Denis Sivagin <denissvgn@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/Denissvgn/python-wiki-llm
8
+ Project-URL: Repository, https://github.com/Denissvgn/python-wiki-llm
9
+ Project-URL: Issues, https://github.com/Denissvgn/python-wiki-llm/issues
10
+ Keywords: llm,wiki,documentation,ai,agents,code-context
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Topic :: Software Development :: Documentation
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: tomli>=2; python_version < "3.11"
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest>=7.0; extra == "dev"
23
+ Requires-Dist: pytest-cov>=4.0; extra == "dev"
24
+ Provides-Extra: typescript
25
+ Provides-Extra: go
26
+ Provides-Extra: rust
27
+ Provides-Extra: mcp
28
+ Requires-Dist: mcp<2,>=1.27; python_version >= "3.10" and extra == "mcp"
29
+ Dynamic: license-file
30
+
31
+ # LLM Wiki CLI
32
+
33
+ LLM Wiki CLI builds and maintains a repo-local architectural wiki for coding
34
+ agents. It scans source code into a compact structural inventory, generates
35
+ Markdown pages under a wiki directory, validates those pages against the live
36
+ codebase, and prepares or triggers wiki-sync prompts after commits.
37
+
38
+ The PyPI distribution is `agent-wiki-cli`. The installed console command remains
39
+ `llm-wiki`, and the Python import package remains `llm_wiki_cli`.
40
+
41
+ ## What It Creates
42
+
43
+ The default wiki lives at `docs/llm_wiki/` and contains:
44
+
45
+ - `index.md`: table of contents for generated pages.
46
+ - `log.md`: append-only architectural change log.
47
+ - `entities/`: class, struct, interface, and type pages.
48
+ - `modules/`: source-file pages.
49
+ - `workflows/`: detected or manually maintained cross-module flow pages.
50
+ - `infrastructure/`: Dockerfile and Compose pages.
51
+ - `.llm-wiki-manifest.json`: source hash manifest used by incremental sync and strict linting.
52
+
53
+ The package has no required Python runtime dependencies. Optional features use
54
+ external tools when they are available on `PATH`.
55
+
56
+ ## Supported Inputs
57
+
58
+ | Area | Implementation | Runtime requirement |
59
+ |---|---|---|
60
+ | Python | stdlib `ast` | Python 3.9+ |
61
+ | TypeScript / TSX | bundled Node script using `ts-morph` | prepared Node.js dependencies |
62
+ | Go | bundled Go extractor using `go/ast` | prepared helper binary |
63
+ | Rust | bundled Rust extractor using `syn` | prepared helper binary |
64
+ | Docker / Compose | built-in parsers | none |
65
+ | MCP server | official Python MCP SDK | `agent-wiki-cli[mcp]`, Python 3.10+ |
66
+
67
+ TypeScript, Go, and Rust extras are metadata-only; prepare their helper
68
+ dependencies explicitly with `llm-wiki prepare-extractors`. Lint, CI, and
69
+ extract never run `npm install`, `go build`, `go run`, `cargo build`, or
70
+ `cargo run` automatically.
71
+
72
+ ## Agent Support
73
+
74
+ | Agent | Schema file | Sync mode |
75
+ |---|---|---|
76
+ | `claude` | `CLAUDE.md` | headless CLI |
77
+ | `aider` | `.aider.conf.yml` | headless CLI |
78
+ | `opencode` | `.opencode/instructions.md` | headless CLI |
79
+ | `copilot` | `.github/copilot-instructions.md` | IDE prompt |
80
+ | `cursor` | `.cursorrules` | IDE prompt |
81
+ | `generic` | `AGENTS.md` | IDE prompt |
82
+
83
+ Headless sync delegates to the selected CLI agent. For Claude, this currently
84
+ uses `claude -p --dangerously-skip-permissions`, so enable automation only in an
85
+ environment where that is acceptable.
86
+
87
+ ## Installation
88
+
89
+ From PyPI:
90
+
91
+ ```bash
92
+ pip install agent-wiki-cli
93
+ ```
94
+
95
+ With MCP server support:
96
+
97
+ ```bash
98
+ pip install "agent-wiki-cli[mcp]"
99
+ ```
100
+
101
+ From source:
102
+
103
+ ```bash
104
+ git clone https://github.com/Denissvgn/python-wiki-llm.git
105
+ cd python-wiki-llm
106
+ pip install -e ".[dev]"
107
+ ```
108
+
109
+ The following extras are accepted for compatibility with documented workflows,
110
+ but they do not install the external TypeScript, Go, or Rust toolchains:
111
+
112
+ ```bash
113
+ pip install "agent-wiki-cli[typescript,go,rust]"
114
+ ```
115
+
116
+ Uninstall the Python package with:
117
+
118
+ ```bash
119
+ pip uninstall agent-wiki-cli
120
+ ```
121
+
122
+ ## Quick Start
123
+
124
+ Initialize the wiki structure and the agent instruction file:
125
+
126
+ ```bash
127
+ llm-wiki init --agent claude
128
+ ```
129
+
130
+ Generate the initial wiki from an existing codebase:
131
+
132
+ ```bash
133
+ llm-wiki bootstrap --src-dir . --wiki-dir docs/llm_wiki
134
+ ```
135
+
136
+ Validate the wiki:
137
+
138
+ ```bash
139
+ llm-wiki lint --wiki-dir docs/llm_wiki --src-dir .
140
+ ```
141
+
142
+ Install a post-commit hook:
143
+
144
+ ```bash
145
+ llm-wiki install-hook
146
+ ```
147
+
148
+ `init` writes the selected agent and quality-hint setting to
149
+ `.git/.llm-wiki-agent` when the project is a Git repo. Outside Git, it falls
150
+ back to `<wiki-dir>/.llm-wiki-agent`.
151
+
152
+ ## Automation
153
+
154
+ `llm-wiki install-hook` installs a `post-commit` hook. The hook mode depends on
155
+ the configured agent.
156
+
157
+ For CLI agents (`claude`, `aider`, `opencode`), the hook starts:
158
+
159
+ ```bash
160
+ llm-wiki trigger-agent --agent <agent>
161
+ ```
162
+
163
+ The trigger command:
164
+
165
+ - takes `git diff HEAD~1..HEAD`;
166
+ - skips empty diffs and oversized diffs unless `--force` is used;
167
+ - uses a lock file to prevent concurrent syncs;
168
+ - opens a circuit breaker after repeated failures;
169
+ - builds deep source inventory and call-graph context;
170
+ - writes `.git/llm-wiki-prompt.txt` with owner-only permissions where supported;
171
+ - invokes the selected agent with a prompt that asks it to update, lint, and commit wiki changes.
172
+
173
+ Useful trigger options:
174
+
175
+ ```bash
176
+ llm-wiki trigger-agent --agent claude --timeout 600 --max-diff-lines 2000
177
+ llm-wiki trigger-agent --agent claude --max-prompt-bytes 2000000
178
+ llm-wiki trigger-agent --agent claude --force
179
+ llm-wiki trigger-agent --reset-breaker
180
+ ```
181
+
182
+ For IDE agents (`copilot`, `cursor`, `generic`), the hook generates
183
+ `.git/llm-wiki-prompt.txt` with `llm-wiki generate-prompt` and prints a reminder
184
+ to paste that prompt into the IDE chat.
185
+
186
+ Optional strict pre-commit validation:
187
+
188
+ ```bash
189
+ llm-wiki install-hook --enable-validation
190
+ ```
191
+
192
+ Use `--force` when you intentionally want to replace an existing unrelated hook:
193
+
194
+ ```bash
195
+ llm-wiki install-hook --force
196
+ ```
197
+
198
+ ## Command Reference
199
+
200
+ ### `init`
201
+
202
+ Scaffold the wiki structure and agent constraint file.
203
+
204
+ ```bash
205
+ llm-wiki init --agent claude
206
+ llm-wiki init --agent copilot --wiki-dir .wiki
207
+ llm-wiki init --agent cursor --no-quality-hints
208
+ ```
209
+
210
+ Supported agents are `claude`, `aider`, `opencode`, `copilot`, `cursor`, and
211
+ `generic`.
212
+
213
+ ### `bootstrap`
214
+
215
+ Generate a full wiki for an existing project.
216
+
217
+ ```bash
218
+ llm-wiki bootstrap --src-dir . --wiki-dir docs/llm_wiki
219
+ llm-wiki bootstrap --overwrite
220
+ llm-wiki bootstrap --depth shallow
221
+ llm-wiki bootstrap --skip-workflows
222
+ ```
223
+
224
+ `bootstrap` writes entity, module, workflow, infrastructure, index, log, and
225
+ manifest files. `--depth full` is the default and includes docstrings, imports,
226
+ attributes, method signatures, and relationship data where extractors provide
227
+ it.
228
+
229
+ ### `sync`
230
+
231
+ Incrementally regenerate only pages whose source files changed since the last
232
+ manifest.
233
+
234
+ ```bash
235
+ llm-wiki sync --src-dir . --wiki-dir docs/llm_wiki
236
+ llm-wiki sync --jobs auto --cache-stats --src-dir . --wiki-dir docs/llm_wiki
237
+ ```
238
+
239
+ If an older wiki has `index.md` but no manifest, `sync` seeds
240
+ `.llm-wiki-manifest.json` without modifying pages. If neither a manifest nor an
241
+ existing wiki is present, run `bootstrap` first. Sync uses the same safe
242
+ persistent inventory cache as lint when a git directory is available. Use
243
+ `--no-cache`, `--rebuild-cache`, `--cache-dir PATH`, and `--cache-stats` to
244
+ control or inspect cache behavior. Use `--jobs N` or `--jobs auto` to opt into
245
+ parallel built-in language extraction. Sync repairs manifests with invalid
246
+ source hashes without touching pages, and stops unusually broad diffs unless
247
+ `--force` is used.
248
+
249
+ ### `extract`
250
+
251
+ Print source inventory as JSON. All registered extractors run; missing optional
252
+ prepared helpers are skipped when there are no matching source files.
253
+
254
+ ```bash
255
+ llm-wiki extract --src-dir .
256
+ llm-wiki extract --src-dir . --changed
257
+ llm-wiki extract --src-dir . --summary
258
+ llm-wiki extract --src-dir . --deep
259
+ llm-wiki extract --src-dir . --paths src/foo.py src/bar.ts
260
+ llm-wiki extract --src-dir . --package llm_wiki_cli
261
+ llm-wiki extract --src-dir . --include-empty
262
+ ```
263
+
264
+ ### `prepare-extractors`
265
+
266
+ Prepare TypeScript dependencies and cached Go/Rust helper binaries outside the
267
+ lint/extract hot path.
268
+
269
+ ```bash
270
+ llm-wiki prepare-extractors --src-dir .
271
+ llm-wiki prepare-extractors --language typescript --language go
272
+ llm-wiki prepare-extractors --cache-dir .cache/llm-wiki
273
+ ```
274
+
275
+ When `--language` is omitted, only helper languages detected in `--src-dir` are
276
+ prepared. Helper cache resolution follows `--cache-dir`, then
277
+ `LLM_WIKI_CACHE_DIR`, then `.git/llm-wiki-extractors/`. If Go is installed in a
278
+ nonstandard location or the `go` on `PATH` cannot run, set
279
+ `LLM_WIKI_GO=/path/to/go` before running `prepare-extractors`.
280
+
281
+ ### `lint` and `ci-check`
282
+
283
+ Validate wiki links, orphan pages, entities, modules, workflows,
284
+ infrastructure, plugin lint rules, and team policy.
285
+
286
+ ```bash
287
+ llm-wiki lint --wiki-dir docs/llm_wiki --src-dir .
288
+ llm-wiki lint --strict --wiki-dir docs/llm_wiki --src-dir .
289
+ llm-wiki lint --profile --wiki-dir docs/llm_wiki --src-dir .
290
+ llm-wiki lint --cache-stats --wiki-dir docs/llm_wiki --src-dir .
291
+ llm-wiki lint --jobs auto --wiki-dir docs/llm_wiki --src-dir .
292
+ ```
293
+
294
+ Strict mode also requires the core wiki structure and a fresh sync manifest.
295
+ `--profile` suppresses the human-readable lint text and prints one JSON object
296
+ to stdout containing the normal lint report, diagnostics, and phase timings.
297
+ The JSON contract is preserved for extractor failures as well; lint still exits
298
+ nonzero, but stdout remains machine-readable.
299
+ Lint uses a persistent deep-inventory cache by default when a git directory is
300
+ available, storing `.git/llm-wiki-inventory-cache.json`. Override the cache
301
+ directory with `LLM_WIKI_CACHE_DIR` or `--cache-dir PATH`; the CLI flag wins.
302
+ Use `--no-cache` to disable load/save, `--rebuild-cache` to ignore and rewrite
303
+ the cache, and `--cache-stats` to include cache diagnostics. Cache corruption or
304
+ invalid fingerprints fall back to a full extraction without reducing lint
305
+ coverage. With `--profile --cache-stats`, the JSON payload includes a top-level
306
+ `cache` object. Use `--jobs N` or `--jobs auto` to opt into parallel built-in
307
+ language extraction; the default is `--jobs 1`. Plugin extractors remain
308
+ sequential unless future plugin metadata explicitly marks them parallel-safe.
309
+
310
+ For CI:
311
+
312
+ ```bash
313
+ llm-wiki ci-check --src-dir . --wiki-dir docs/llm_wiki
314
+ llm-wiki ci-check --jobs auto --src-dir . --wiki-dir docs/llm_wiki
315
+ llm-wiki ci-check --format json --report .git/llm-wiki-ci-report.md
316
+ llm-wiki ci-check --format markdown
317
+ ```
318
+
319
+ `ci-check` always runs strict validation, writes a Markdown report, records a
320
+ local metrics event, uses the same safe inventory cache when available, and
321
+ exits nonzero on validation failure. `--report` is an output path, so explicit
322
+ absolute paths and relative artifact paths outside the project root are allowed.
323
+
324
+ ### `context`
325
+
326
+ Build a token-budgeted source snapshot for agents.
327
+
328
+ ```bash
329
+ llm-wiki context --budget 8000 --src-dir . --format json
330
+ llm-wiki context --budget 8000 --src-dir . --format markdown
331
+ llm-wiki context --budget 8000 --focus changed
332
+ llm-wiki context --budget 8000 --focus all
333
+ ```
334
+
335
+ `--focus changed` is the default. Changed files get full detail, one-hop import
336
+ neighbors get slim detail, and remaining files get names only.
337
+
338
+ External tools can use the `llm-wiki-context/v1` JSON request protocol:
339
+
340
+ ```bash
341
+ llm-wiki context --request request.json --src-dir .
342
+ cat request.json | llm-wiki context --request - --src-dir .
343
+ ```
344
+
345
+ Example request:
346
+
347
+ ```json
348
+ {
349
+ "protocol": "llm-wiki-context/v1",
350
+ "budget_tokens": 8000,
351
+ "focus": ["changed", "neighbors"],
352
+ "format": "json",
353
+ "filters": {
354
+ "language": "python"
355
+ }
356
+ }
357
+ ```
358
+
359
+ ### `generate-prompt`
360
+
361
+ Build a sync prompt for IDE agents or for manual review.
362
+
363
+ ```bash
364
+ llm-wiki generate-prompt
365
+ llm-wiki generate-prompt --print
366
+ llm-wiki generate-prompt --change-type feature
367
+ llm-wiki generate-prompt --template compact
368
+ ```
369
+
370
+ The generated prompt includes change-type guidance. Installed prompt templates
371
+ can override the default prompt body.
372
+
373
+ ### `mcp`
374
+
375
+ Run a local MCP server exposing read-only wiki tools and resources.
376
+
377
+ ```bash
378
+ llm-wiki mcp --wiki-dir docs/llm_wiki --src-dir .
379
+ llm-wiki mcp --transport http --host 127.0.0.1 --port 8765
380
+ ```
381
+
382
+ The MCP server exposes wiki search, entity/module fetches, context payloads,
383
+ lint summaries, and status information. HTTP mode is intended for local use and
384
+ defaults to loopback.
385
+
386
+ ### `install` and `plugins`
387
+
388
+ Install and manage local plugins.
389
+
390
+ ```bash
391
+ llm-wiki install ./vendor/my-plugin --yes
392
+ llm-wiki install my-catalog-plugin --dry-run
393
+ llm-wiki plugins list
394
+ llm-wiki plugins validate ./vendor/my-plugin
395
+ llm-wiki plugins remove my-plugin
396
+ ```
397
+
398
+ Plugin manifests can register extractors, prompt templates, lint rules, and
399
+ agent skill blocks. Plugin references are resolved from project-local paths or
400
+ `.llm-wiki/catalog.json`.
401
+
402
+ ### `team`
403
+
404
+ Manage shared team policy for prompt defaults, required plugin components, and
405
+ generated-wiki conflict handling.
406
+
407
+ ```bash
408
+ llm-wiki team init --wiki-dir docs/llm_wiki
409
+ llm-wiki team check --src-dir . --wiki-dir docs/llm_wiki
410
+ llm-wiki team resolve-conflicts --wiki-dir docs/llm_wiki
411
+ llm-wiki team resolve-conflicts --write --wiki-dir docs/llm_wiki
412
+ ```
413
+
414
+ `resolve-conflicts` only applies conservative resolutions for generated pages.
415
+ Manual workflow conflicts are left for humans to resolve.
416
+
417
+ ### `obsidian`
418
+
419
+ Export and validate an Obsidian-friendly mirror of the canonical wiki.
420
+
421
+ ```bash
422
+ llm-wiki obsidian export --wiki-dir docs/llm_wiki --vault-dir ~/Vaults/project
423
+ llm-wiki obsidian check --wiki-dir docs/llm_wiki --vault-dir ~/Vaults/project
424
+ llm-wiki obsidian install-plugin --vault-dir ~/Vaults/project
425
+ ```
426
+
427
+ The mirror adds frontmatter, wikilinks, related links, and sidecar human notes.
428
+ The canonical source of truth remains `docs/llm_wiki/`.
429
+
430
+ ### `metrics`
431
+
432
+ Show local quality and automation metrics.
433
+
434
+ ```bash
435
+ llm-wiki metrics --last 30d
436
+ llm-wiki metrics --format json
437
+ ```
438
+
439
+ Metrics are stored locally under `.git/llm-wiki-metrics.jsonl` when available.
440
+
441
+ ### `review`
442
+
443
+ Run a static wiki-aware review of proposed code changes.
444
+
445
+ ```bash
446
+ llm-wiki review --base main --head HEAD
447
+ llm-wiki review --patch change.patch --format json
448
+ ```
449
+
450
+ The review command compares code changes with wiki coverage and reports stale or
451
+ missing documentation risks.
452
+
453
+ ### `upgrade`
454
+
455
+ Refresh framework-managed artifacts in place.
456
+
457
+ ```bash
458
+ llm-wiki upgrade
459
+ llm-wiki upgrade --agent copilot
460
+ llm-wiki upgrade --force
461
+ llm-wiki upgrade --no-quality-hints
462
+ ```
463
+
464
+ `upgrade` refreshes agent instruction blocks, wiki directories, hooks, plugin
465
+ skill blocks, and persisted local config.
466
+
467
+ ### `migrate`
468
+
469
+ Reconcile older wiki layouts with current canonical names.
470
+
471
+ ```bash
472
+ llm-wiki migrate --dry-run
473
+ llm-wiki migrate --chunk-size 50 --plan-chunks
474
+ llm-wiki migrate --chunk-size 50 --chunk 1
475
+ ```
476
+
477
+ ### `status`, `release`, `bump`, and `uninstall`
478
+
479
+ ```bash
480
+ llm-wiki status
481
+ llm-wiki release --stage
482
+ llm-wiki bump --patch --stage
483
+ llm-wiki uninstall --dry-run
484
+ llm-wiki uninstall --remove-wiki
485
+ ```
486
+
487
+ `uninstall` removes project integration artifacts. It does not uninstall the
488
+ CLI itself. To remove the Python package, run `pip uninstall agent-wiki-cli`.
489
+
490
+ ## Security Model
491
+
492
+ LLM Wiki is a local automation tool. It can generate prompt files containing
493
+ diffs, source structure, and architectural context. Prompt files are written
494
+ inside `.git/` by default and use owner-only permissions where the platform
495
+ supports that mode.
496
+
497
+ Headless CLI agents can edit files and run commands according to their own
498
+ permission model. Review generated wiki diffs before trusting unattended
499
+ automation in a shared repository.
500
+
501
+ The repository includes community health files:
502
+
503
+ - `CODE_OF_CONDUCT.md`
504
+ - `SECURITY.md`
505
+ - GitHub issue templates
506
+
507
+ ## Development
508
+
509
+ Run tests from the repository root:
510
+
511
+ ```bash
512
+ pip install -e ".[dev]"
513
+ python -m pytest
514
+ ```
515
+
516
+ Run the MCP tests with the optional dependency installed:
517
+
518
+ ```bash
519
+ pip install -e ".[dev,mcp]"
520
+ python -m pytest tests/test_mcp.py
521
+ ```
522
+
523
+ Before release, check metadata and docs:
524
+
525
+ ```bash
526
+ python -m pytest tests/test_package_metadata.py
527
+ python -m build
528
+ ```
529
+
530
+ ## Contribution Policy
531
+
532
+ This project does not maintain a formal contribution process. You are welcome to
533
+ freely fork it, adapt it to your workflow, and publish your own changes under
534
+ the license terms.