agent-wiki-cli 0.3.28__tar.gz → 0.3.41__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 (106) hide show
  1. agent_wiki_cli-0.3.41/PKG-INFO +489 -0
  2. agent_wiki_cli-0.3.41/README.md +459 -0
  3. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/pyproject.toml +3 -1
  4. agent_wiki_cli-0.3.41/src/agent_wiki_cli.egg-info/PKG-INFO +489 -0
  5. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/agent_wiki_cli.egg-info/SOURCES.txt +19 -0
  6. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/agent_wiki_cli.egg-info/requires.txt +5 -0
  7. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/cli.py +177 -3
  8. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/bootstrap_cmd.py +29 -81
  9. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/ci_check_cmd.py +54 -0
  10. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/context_cmd.py +302 -34
  11. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/extract_cmd.py +62 -41
  12. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/generate_prompt_cmd.py +298 -0
  13. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/hook_cmd.py +31 -0
  14. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/install_cmd.py +43 -0
  15. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/lint_cmd.py +549 -0
  16. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/mcp_cmd.py +24 -0
  17. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/metrics_cmd.py +65 -0
  18. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/migrate_cmd.py +83 -10
  19. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/obsidian_cmd.py +71 -0
  20. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/plugins_cmd.py +58 -0
  21. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/review_cmd.py +266 -0
  22. agent_wiki_cli-0.3.41/src/llm_wiki_cli/commands/team_cmd.py +107 -0
  23. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/trigger_cmd.py +55 -42
  24. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/upgrade_cmd.py +6 -1
  25. agent_wiki_cli-0.3.41/src/llm_wiki_cli/services/imports.py +77 -0
  26. agent_wiki_cli-0.3.41/src/llm_wiki_cli/services/mcp_server.py +635 -0
  27. agent_wiki_cli-0.3.41/src/llm_wiki_cli/services/metrics.py +205 -0
  28. agent_wiki_cli-0.3.41/src/llm_wiki_cli/services/obsidian.py +591 -0
  29. agent_wiki_cli-0.3.41/src/llm_wiki_cli/services/plugins.py +437 -0
  30. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/services/schema.py +94 -1
  31. agent_wiki_cli-0.3.41/src/llm_wiki_cli/services/team.py +512 -0
  32. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_bootstrap.py +31 -0
  33. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_context.py +207 -0
  34. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_extract.py +28 -0
  35. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_hook.py +16 -1
  36. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_init.py +2 -1
  37. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_lint.py +26 -0
  38. agent_wiki_cli-0.3.41/tests/test_mcp.py +224 -0
  39. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_migrate.py +76 -0
  40. agent_wiki_cli-0.3.41/tests/test_obsidian.py +224 -0
  41. agent_wiki_cli-0.3.41/tests/test_phase4_quality.py +164 -0
  42. agent_wiki_cli-0.3.41/tests/test_plugins.py +258 -0
  43. agent_wiki_cli-0.3.41/tests/test_team.py +250 -0
  44. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_trigger.py +2 -2
  45. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_uninstall.py +17 -0
  46. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_upgrade.py +33 -1
  47. agent_wiki_cli-0.3.28/PKG-INFO +0 -425
  48. agent_wiki_cli-0.3.28/README.md +0 -397
  49. agent_wiki_cli-0.3.28/src/agent_wiki_cli.egg-info/PKG-INFO +0 -425
  50. agent_wiki_cli-0.3.28/src/llm_wiki_cli/commands/generate_prompt_cmd.py +0 -89
  51. agent_wiki_cli-0.3.28/src/llm_wiki_cli/commands/lint_cmd.py +0 -294
  52. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/LICENSE +0 -0
  53. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/setup.cfg +0 -0
  54. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/agent_wiki_cli.egg-info/dependency_links.txt +0 -0
  55. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/agent_wiki_cli.egg-info/entry_points.txt +0 -0
  56. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/agent_wiki_cli.egg-info/top_level.txt +0 -0
  57. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/__init__.py +0 -0
  58. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/__init__.py +0 -0
  59. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/bump_cmd.py +0 -0
  60. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/init_cmd.py +0 -0
  61. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/release_cmd.py +0 -0
  62. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/status_cmd.py +0 -0
  63. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/sync_cmd.py +0 -0
  64. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/commands/uninstall_cmd.py +0 -0
  65. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/config.py +0 -0
  66. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/__init__.py +0 -0
  67. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/common.py +0 -0
  68. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/go_extractor.py +0 -0
  69. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/go_scripts/go.mod +0 -0
  70. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/go_scripts/main.go +0 -0
  71. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/python_extractor.py +0 -0
  72. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/rust_extractor.py +0 -0
  73. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/rust_scripts/Cargo.lock +0 -0
  74. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/rust_scripts/Cargo.toml +0 -0
  75. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/rust_scripts/src/main.rs +0 -0
  76. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/ts_extractor.py +0 -0
  77. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/ts_scripts/extract.js +0 -0
  78. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/extractors/ts_scripts/package.json +0 -0
  79. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/services/__init__.py +0 -0
  80. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/services/circuit_breaker.py +0 -0
  81. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/services/io.py +0 -0
  82. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/services/lockfile.py +0 -0
  83. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/services/packages.py +0 -0
  84. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/services/paths.py +0 -0
  85. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/services/secure_file.py +0 -0
  86. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/src/llm_wiki_cli/services/versioning.py +0 -0
  87. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_bump.py +0 -0
  88. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_circuit_breaker.py +0 -0
  89. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_config.py +0 -0
  90. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_docker_bootstrap.py +0 -0
  91. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_docker_extract.py +0 -0
  92. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_docker_lint.py +0 -0
  93. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_e2e.py +0 -0
  94. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_generate_prompt.py +0 -0
  95. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_go_extract.py +0 -0
  96. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_io.py +0 -0
  97. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_lockfile.py +0 -0
  98. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_multilanguage_wiki.py +0 -0
  99. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_package_metadata.py +0 -0
  100. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_release.py +0 -0
  101. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_rust_extract.py +0 -0
  102. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_schema.py +0 -0
  103. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_status.py +0 -0
  104. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_sync.py +0 -0
  105. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_ts_extract.py +0 -0
  106. {agent_wiki_cli-0.3.28 → agent_wiki_cli-0.3.41}/tests/test_versioning.py +0 -0
@@ -0,0 +1,489 @@
1
+ Metadata-Version: 2.4
2
+ Name: agent-wiki-cli
3
+ Version: 0.3.41
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` | Node.js and npm |
62
+ | Go | bundled Go extractor using `go/ast` | Go toolchain |
63
+ | Rust | bundled Rust extractor using `syn` | Cargo / Rust toolchain |
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; the actual toolchains must be
68
+ installed separately. The TypeScript extractor runs `npm install` in its bundled
69
+ extractor directory on first use if `node_modules` is missing.
70
+
71
+ ## Agent Support
72
+
73
+ | Agent | Schema file | Sync mode |
74
+ |---|---|---|
75
+ | `claude` | `CLAUDE.md` | headless CLI |
76
+ | `aider` | `.aider.conf.yml` | headless CLI |
77
+ | `opencode` | `.opencode/instructions.md` | headless CLI |
78
+ | `copilot` | `.github/copilot-instructions.md` | IDE prompt |
79
+ | `cursor` | `.cursorrules` | IDE prompt |
80
+ | `generic` | `AGENTS.md` | IDE prompt |
81
+
82
+ Headless sync delegates to the selected CLI agent. For Claude, this currently
83
+ uses `claude -p --dangerously-skip-permissions`, so enable automation only in an
84
+ environment where that is acceptable.
85
+
86
+ ## Installation
87
+
88
+ From PyPI:
89
+
90
+ ```bash
91
+ pip install agent-wiki-cli
92
+ ```
93
+
94
+ With MCP server support:
95
+
96
+ ```bash
97
+ pip install "agent-wiki-cli[mcp]"
98
+ ```
99
+
100
+ From source:
101
+
102
+ ```bash
103
+ git clone https://github.com/Denissvgn/python-wiki-llm.git
104
+ cd python-wiki-llm
105
+ pip install -e ".[dev]"
106
+ ```
107
+
108
+ The following extras are accepted for compatibility with documented workflows,
109
+ but they do not install the external TypeScript, Go, or Rust toolchains:
110
+
111
+ ```bash
112
+ pip install "agent-wiki-cli[typescript,go,rust]"
113
+ ```
114
+
115
+ Uninstall the Python package with:
116
+
117
+ ```bash
118
+ pip uninstall agent-wiki-cli
119
+ ```
120
+
121
+ ## Quick Start
122
+
123
+ Initialize the wiki structure and the agent instruction file:
124
+
125
+ ```bash
126
+ llm-wiki init --agent claude
127
+ ```
128
+
129
+ Generate the initial wiki from an existing codebase:
130
+
131
+ ```bash
132
+ llm-wiki bootstrap --src-dir . --wiki-dir docs/llm_wiki
133
+ ```
134
+
135
+ Validate the wiki:
136
+
137
+ ```bash
138
+ llm-wiki lint --wiki-dir docs/llm_wiki --src-dir .
139
+ ```
140
+
141
+ Install a post-commit hook:
142
+
143
+ ```bash
144
+ llm-wiki install-hook
145
+ ```
146
+
147
+ `init` writes the selected agent and quality-hint setting to
148
+ `.git/.llm-wiki-agent` when the project is a Git repo. Outside Git, it falls
149
+ back to `<wiki-dir>/.llm-wiki-agent`.
150
+
151
+ ## Automation
152
+
153
+ `llm-wiki install-hook` installs a `post-commit` hook. The hook mode depends on
154
+ the configured agent.
155
+
156
+ For CLI agents (`claude`, `aider`, `opencode`), the hook starts:
157
+
158
+ ```bash
159
+ llm-wiki trigger-agent --agent <agent>
160
+ ```
161
+
162
+ The trigger command:
163
+
164
+ - takes `git diff HEAD~1..HEAD`;
165
+ - skips empty diffs and oversized diffs unless `--force` is used;
166
+ - uses a lock file to prevent concurrent syncs;
167
+ - opens a circuit breaker after repeated failures;
168
+ - builds deep source inventory and call-graph context;
169
+ - writes `.git/llm-wiki-prompt.txt` with owner-only permissions where supported;
170
+ - invokes the selected agent with a prompt that asks it to update, lint, and commit wiki changes.
171
+
172
+ Useful trigger options:
173
+
174
+ ```bash
175
+ llm-wiki trigger-agent --agent claude --timeout 600 --max-diff-lines 2000
176
+ llm-wiki trigger-agent --agent claude --max-prompt-bytes 2000000
177
+ llm-wiki trigger-agent --agent claude --force
178
+ llm-wiki trigger-agent --reset-breaker
179
+ ```
180
+
181
+ For IDE agents (`copilot`, `cursor`, `generic`), the hook generates
182
+ `.git/llm-wiki-prompt.txt` with `llm-wiki generate-prompt` and prints a reminder
183
+ to paste that prompt into the IDE chat.
184
+
185
+ Optional strict pre-commit validation:
186
+
187
+ ```bash
188
+ llm-wiki install-hook --enable-validation
189
+ ```
190
+
191
+ Use `--force` when you intentionally want to replace an existing unrelated hook:
192
+
193
+ ```bash
194
+ llm-wiki install-hook --force
195
+ ```
196
+
197
+ ## Command Reference
198
+
199
+ ### `init`
200
+
201
+ Scaffold the wiki structure and agent constraint file.
202
+
203
+ ```bash
204
+ llm-wiki init --agent claude
205
+ llm-wiki init --agent copilot --wiki-dir .wiki
206
+ llm-wiki init --agent cursor --no-quality-hints
207
+ ```
208
+
209
+ Supported agents are `claude`, `aider`, `opencode`, `copilot`, `cursor`, and
210
+ `generic`.
211
+
212
+ ### `bootstrap`
213
+
214
+ Generate a full wiki for an existing project.
215
+
216
+ ```bash
217
+ llm-wiki bootstrap --src-dir . --wiki-dir docs/llm_wiki
218
+ llm-wiki bootstrap --overwrite
219
+ llm-wiki bootstrap --depth shallow
220
+ llm-wiki bootstrap --skip-workflows
221
+ ```
222
+
223
+ `bootstrap` writes entity, module, workflow, infrastructure, index, log, and
224
+ manifest files. `--depth full` is the default and includes docstrings, imports,
225
+ attributes, method signatures, and relationship data where extractors provide
226
+ it.
227
+
228
+ ### `sync`
229
+
230
+ Incrementally regenerate only pages whose source files changed since the last
231
+ manifest.
232
+
233
+ ```bash
234
+ llm-wiki sync --src-dir . --wiki-dir docs/llm_wiki
235
+ ```
236
+
237
+ If an older wiki has `index.md` but no manifest, `sync` seeds
238
+ `.llm-wiki-manifest.json` without modifying pages. If neither a manifest nor an
239
+ existing wiki is present, run `bootstrap` first.
240
+
241
+ ### `extract`
242
+
243
+ Print source inventory as JSON. All registered extractors run; missing optional
244
+ toolchains are skipped when there are no matching source files.
245
+
246
+ ```bash
247
+ llm-wiki extract --src-dir .
248
+ llm-wiki extract --src-dir . --changed
249
+ llm-wiki extract --src-dir . --summary
250
+ llm-wiki extract --src-dir . --deep
251
+ llm-wiki extract --src-dir . --paths src/foo.py src/bar.ts
252
+ llm-wiki extract --src-dir . --package llm_wiki_cli
253
+ llm-wiki extract --src-dir . --include-empty
254
+ ```
255
+
256
+ ### `lint` and `ci-check`
257
+
258
+ Validate wiki links, orphan pages, entities, modules, workflows,
259
+ infrastructure, plugin lint rules, and team policy.
260
+
261
+ ```bash
262
+ llm-wiki lint --wiki-dir docs/llm_wiki --src-dir .
263
+ llm-wiki lint --strict --wiki-dir docs/llm_wiki --src-dir .
264
+ ```
265
+
266
+ Strict mode also requires the core wiki structure and a fresh sync manifest.
267
+
268
+ For CI:
269
+
270
+ ```bash
271
+ llm-wiki ci-check --src-dir . --wiki-dir docs/llm_wiki
272
+ llm-wiki ci-check --format json --report .git/llm-wiki-ci-report.md
273
+ llm-wiki ci-check --format markdown
274
+ ```
275
+
276
+ `ci-check` always runs strict validation, writes a Markdown report, records a
277
+ local metrics event, and exits nonzero on validation failure.
278
+
279
+ ### `context`
280
+
281
+ Build a token-budgeted source snapshot for agents.
282
+
283
+ ```bash
284
+ llm-wiki context --budget 8000 --src-dir . --format json
285
+ llm-wiki context --budget 8000 --src-dir . --format markdown
286
+ llm-wiki context --budget 8000 --focus changed
287
+ llm-wiki context --budget 8000 --focus all
288
+ ```
289
+
290
+ `--focus changed` is the default. Changed files get full detail, one-hop import
291
+ neighbors get slim detail, and remaining files get names only.
292
+
293
+ External tools can use the `llm-wiki-context/v1` JSON request protocol:
294
+
295
+ ```bash
296
+ llm-wiki context --request request.json --src-dir .
297
+ cat request.json | llm-wiki context --request - --src-dir .
298
+ ```
299
+
300
+ Example request:
301
+
302
+ ```json
303
+ {
304
+ "protocol": "llm-wiki-context/v1",
305
+ "budget_tokens": 8000,
306
+ "focus": ["changed", "neighbors"],
307
+ "format": "json",
308
+ "filters": {
309
+ "language": "python"
310
+ }
311
+ }
312
+ ```
313
+
314
+ ### `generate-prompt`
315
+
316
+ Build a sync prompt for IDE agents or for manual review.
317
+
318
+ ```bash
319
+ llm-wiki generate-prompt
320
+ llm-wiki generate-prompt --print
321
+ llm-wiki generate-prompt --change-type feature
322
+ llm-wiki generate-prompt --template compact
323
+ ```
324
+
325
+ The generated prompt includes change-type guidance. Installed prompt templates
326
+ can override the default prompt body.
327
+
328
+ ### `mcp`
329
+
330
+ Run a local MCP server exposing read-only wiki tools and resources.
331
+
332
+ ```bash
333
+ llm-wiki mcp --wiki-dir docs/llm_wiki --src-dir .
334
+ llm-wiki mcp --transport http --host 127.0.0.1 --port 8765
335
+ ```
336
+
337
+ The MCP server exposes wiki search, entity/module fetches, context payloads,
338
+ lint summaries, and status information. HTTP mode is intended for local use and
339
+ defaults to loopback.
340
+
341
+ ### `install` and `plugins`
342
+
343
+ Install and manage local plugins.
344
+
345
+ ```bash
346
+ llm-wiki install ./vendor/my-plugin --yes
347
+ llm-wiki install my-catalog-plugin --dry-run
348
+ llm-wiki plugins list
349
+ llm-wiki plugins validate ./vendor/my-plugin
350
+ llm-wiki plugins remove my-plugin
351
+ ```
352
+
353
+ Plugin manifests can register extractors, prompt templates, lint rules, and
354
+ agent skill blocks. Plugin references are resolved from project-local paths or
355
+ `.llm-wiki/catalog.json`.
356
+
357
+ ### `team`
358
+
359
+ Manage shared team policy for prompt defaults, required plugin components, and
360
+ generated-wiki conflict handling.
361
+
362
+ ```bash
363
+ llm-wiki team init --wiki-dir docs/llm_wiki
364
+ llm-wiki team check --src-dir . --wiki-dir docs/llm_wiki
365
+ llm-wiki team resolve-conflicts --wiki-dir docs/llm_wiki
366
+ llm-wiki team resolve-conflicts --write --wiki-dir docs/llm_wiki
367
+ ```
368
+
369
+ `resolve-conflicts` only applies conservative resolutions for generated pages.
370
+ Manual workflow conflicts are left for humans to resolve.
371
+
372
+ ### `obsidian`
373
+
374
+ Export and validate an Obsidian-friendly mirror of the canonical wiki.
375
+
376
+ ```bash
377
+ llm-wiki obsidian export --wiki-dir docs/llm_wiki --vault-dir ~/Vaults/project
378
+ llm-wiki obsidian check --wiki-dir docs/llm_wiki --vault-dir ~/Vaults/project
379
+ llm-wiki obsidian install-plugin --vault-dir ~/Vaults/project
380
+ ```
381
+
382
+ The mirror adds frontmatter, wikilinks, related links, and sidecar human notes.
383
+ The canonical source of truth remains `docs/llm_wiki/`.
384
+
385
+ ### `metrics`
386
+
387
+ Show local quality and automation metrics.
388
+
389
+ ```bash
390
+ llm-wiki metrics --last 30d
391
+ llm-wiki metrics --format json
392
+ ```
393
+
394
+ Metrics are stored locally under `.git/llm-wiki-metrics.jsonl` when available.
395
+
396
+ ### `review`
397
+
398
+ Run a static wiki-aware review of proposed code changes.
399
+
400
+ ```bash
401
+ llm-wiki review --base main --head HEAD
402
+ llm-wiki review --patch change.patch --format json
403
+ ```
404
+
405
+ The review command compares code changes with wiki coverage and reports stale or
406
+ missing documentation risks.
407
+
408
+ ### `upgrade`
409
+
410
+ Refresh framework-managed artifacts in place.
411
+
412
+ ```bash
413
+ llm-wiki upgrade
414
+ llm-wiki upgrade --agent copilot
415
+ llm-wiki upgrade --force
416
+ llm-wiki upgrade --no-quality-hints
417
+ ```
418
+
419
+ `upgrade` refreshes agent instruction blocks, wiki directories, hooks, plugin
420
+ skill blocks, and persisted local config.
421
+
422
+ ### `migrate`
423
+
424
+ Reconcile older wiki layouts with current canonical names.
425
+
426
+ ```bash
427
+ llm-wiki migrate --dry-run
428
+ llm-wiki migrate --chunk-size 50 --plan-chunks
429
+ llm-wiki migrate --chunk-size 50 --chunk 1
430
+ ```
431
+
432
+ ### `status`, `release`, `bump`, and `uninstall`
433
+
434
+ ```bash
435
+ llm-wiki status
436
+ llm-wiki release --stage
437
+ llm-wiki bump --patch --stage
438
+ llm-wiki uninstall --dry-run
439
+ llm-wiki uninstall --remove-wiki
440
+ ```
441
+
442
+ `uninstall` removes project integration artifacts. It does not uninstall the
443
+ CLI itself. To remove the Python package, run `pip uninstall agent-wiki-cli`.
444
+
445
+ ## Security Model
446
+
447
+ LLM Wiki is a local automation tool. It can generate prompt files containing
448
+ diffs, source structure, and architectural context. Prompt files are written
449
+ inside `.git/` by default and use owner-only permissions where the platform
450
+ supports that mode.
451
+
452
+ Headless CLI agents can edit files and run commands according to their own
453
+ permission model. Review generated wiki diffs before trusting unattended
454
+ automation in a shared repository.
455
+
456
+ The repository includes community health files:
457
+
458
+ - `CODE_OF_CONDUCT.md`
459
+ - `SECURITY.md`
460
+ - GitHub issue templates
461
+
462
+ ## Development
463
+
464
+ Run tests from the repository root:
465
+
466
+ ```bash
467
+ pip install -e ".[dev]"
468
+ python -m pytest
469
+ ```
470
+
471
+ Run the MCP tests with the optional dependency installed:
472
+
473
+ ```bash
474
+ pip install -e ".[dev,mcp]"
475
+ python -m pytest tests/test_mcp.py
476
+ ```
477
+
478
+ Before release, check metadata and docs:
479
+
480
+ ```bash
481
+ python -m pytest tests/test_package_metadata.py
482
+ python -m build
483
+ ```
484
+
485
+ ## Contribution Policy
486
+
487
+ This project does not maintain a formal contribution process. You are welcome to
488
+ freely fork it, adapt it to your workflow, and publish your own changes under
489
+ the license terms.