agent-wiki-cli 0.3.28__py3-none-any.whl
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.
- agent_wiki_cli-0.3.28.dist-info/METADATA +425 -0
- agent_wiki_cli-0.3.28.dist-info/RECORD +47 -0
- agent_wiki_cli-0.3.28.dist-info/WHEEL +5 -0
- agent_wiki_cli-0.3.28.dist-info/entry_points.txt +2 -0
- agent_wiki_cli-0.3.28.dist-info/licenses/LICENSE +21 -0
- agent_wiki_cli-0.3.28.dist-info/top_level.txt +1 -0
- llm_wiki_cli/__init__.py +7 -0
- llm_wiki_cli/cli.py +231 -0
- llm_wiki_cli/commands/__init__.py +1 -0
- llm_wiki_cli/commands/bootstrap_cmd.py +1072 -0
- llm_wiki_cli/commands/bump_cmd.py +55 -0
- llm_wiki_cli/commands/context_cmd.py +427 -0
- llm_wiki_cli/commands/extract_cmd.py +745 -0
- llm_wiki_cli/commands/generate_prompt_cmd.py +89 -0
- llm_wiki_cli/commands/hook_cmd.py +161 -0
- llm_wiki_cli/commands/init_cmd.py +92 -0
- llm_wiki_cli/commands/lint_cmd.py +294 -0
- llm_wiki_cli/commands/migrate_cmd.py +892 -0
- llm_wiki_cli/commands/release_cmd.py +163 -0
- llm_wiki_cli/commands/status_cmd.py +70 -0
- llm_wiki_cli/commands/sync_cmd.py +521 -0
- llm_wiki_cli/commands/trigger_cmd.py +205 -0
- llm_wiki_cli/commands/uninstall_cmd.py +221 -0
- llm_wiki_cli/commands/upgrade_cmd.py +196 -0
- llm_wiki_cli/config.py +318 -0
- llm_wiki_cli/extractors/__init__.py +46 -0
- llm_wiki_cli/extractors/common.py +90 -0
- llm_wiki_cli/extractors/go_extractor.py +143 -0
- llm_wiki_cli/extractors/go_scripts/go.mod +3 -0
- llm_wiki_cli/extractors/go_scripts/main.go +668 -0
- llm_wiki_cli/extractors/python_extractor.py +346 -0
- llm_wiki_cli/extractors/rust_extractor.py +143 -0
- llm_wiki_cli/extractors/rust_scripts/Cargo.lock +110 -0
- llm_wiki_cli/extractors/rust_scripts/Cargo.toml +11 -0
- llm_wiki_cli/extractors/rust_scripts/src/main.rs +803 -0
- llm_wiki_cli/extractors/ts_extractor.py +206 -0
- llm_wiki_cli/extractors/ts_scripts/extract.js +485 -0
- llm_wiki_cli/extractors/ts_scripts/package.json +10 -0
- llm_wiki_cli/services/__init__.py +0 -0
- llm_wiki_cli/services/circuit_breaker.py +79 -0
- llm_wiki_cli/services/io.py +47 -0
- llm_wiki_cli/services/lockfile.py +60 -0
- llm_wiki_cli/services/packages.py +173 -0
- llm_wiki_cli/services/paths.py +31 -0
- llm_wiki_cli/services/schema.py +214 -0
- llm_wiki_cli/services/secure_file.py +22 -0
- llm_wiki_cli/services/versioning.py +193 -0
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-wiki-cli
|
|
3
|
+
Version: 0.3.28
|
|
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
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# LLM Wiki CLI
|
|
30
|
+
|
|
31
|
+
## About
|
|
32
|
+
|
|
33
|
+
LLM Wiki CLI helps coding agents keep project documentation accurate automatically. It builds and maintains a structured wiki from your source code, validates consistency with lint checks, and supports automated or prompt-driven sync workflows after each commit.
|
|
34
|
+
|
|
35
|
+
It is designed for teams using AI-assisted development who want less context drift, better architectural memory, and a repo-level documentation process that scales across Python, TypeScript, Go, Rust, and Docker/Compose infrastructure.
|
|
36
|
+
|
|
37
|
+
A companion CLI designed to help Native LLM Coding Agents (like Claude Code, OpenCode, Cursor, Copilot, or Aider) autonomously maintain a persistent architectural memory ("Wiki") of your projects.
|
|
38
|
+
|
|
39
|
+
By providing constant, up-to-date documentation via a local wiki, your LLM agents will stop rediscovering project boundaries from scratch upon every interaction. Instead, the agent learns to consult the `docs/llm_wiki` first, and updates it gracefully whenever a commit alters the software architecture.
|
|
40
|
+
|
|
41
|
+
Supports **Python, TypeScript, Go, and Rust** projects. Infrastructure documentation (Docker/Compose) included.
|
|
42
|
+
|
|
43
|
+
> Inspired by Andrej Karpathy's post on [LLM-native development workflows](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f).
|
|
44
|
+
|
|
45
|
+
> **Warning:** This tool grants **full unsupervised permissions** to background agents (e.g. `--dangerously-skip-permissions` for Claude Code). The post-commit hook runs headlessly with no human-in-the-loop confirmation. Use with caution — review your agent's capabilities and ensure you trust the execution environment before enabling automation.
|
|
46
|
+
|
|
47
|
+
## How it Works
|
|
48
|
+
|
|
49
|
+
This tool bridges the context gap using a **Hybrid Approach**:
|
|
50
|
+
1. **Multi-Language Extraction**: The CLI uses language-specific AST processors (Python `ast`, TypeScript `ts-morph`, Go stdlib `ast`, Rust `syn`) to rapidly map classes, functions, types, imports, and relationships without forcing the LLM to waste context tokens loading megabytes of raw text.
|
|
51
|
+
2. **Strict Schema Constraints**: The tool scaffolds specific prompt constraints (e.g., `CLAUDE.md` or `.github/copilot-instructions.md`) dictating that your agent *must* act as the overarching librarian for `docs/llm_wiki/`.
|
|
52
|
+
3. **Post-Commit Wiki Sync**: A local `.git/hooks/post-commit` script is installed. The sync strategy depends on the agent type:
|
|
53
|
+
- **CLI agents** (`claude`, `aider`, `opencode`): every commit spawns a fully detached background process that captures the `git diff`, merges it with the structural AST, and invokes the agent headlessly to update the wiki automatically.
|
|
54
|
+
- **IDE agents** (`copilot`, `cursor`, `generic`): every commit generates a ready-to-paste sync prompt at `.git/llm-wiki-prompt.txt`. You paste it into your IDE chat to trigger the update.
|
|
55
|
+
|
|
56
|
+
## Agent Support
|
|
57
|
+
|
|
58
|
+
| Agent | Schema file | Auto-sync mode |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| `claude` | `CLAUDE.md` | Headless background process |
|
|
61
|
+
| `aider` | `.aider.conf.yml` | Headless background process |
|
|
62
|
+
| `opencode` | `.opencode/instructions.md` | Headless background process |
|
|
63
|
+
| `copilot` | `.github/copilot-instructions.md` | IDE prompt (paste into chat) |
|
|
64
|
+
| `cursor` | `.cursorrules` | IDE prompt (paste into chat) |
|
|
65
|
+
| `generic` | `.agents.md` | IDE prompt (paste into chat) |
|
|
66
|
+
|
|
67
|
+
## Multi-Language Support
|
|
68
|
+
|
|
69
|
+
The tool supports multiple programming languages via a pluggable extractor architecture:
|
|
70
|
+
|
|
71
|
+
| Language | Extractor | Requirements | Installation |
|
|
72
|
+
|----------|-----------|--------------|--------------|
|
|
73
|
+
| **Python** | AST (stdlib) | Python 3.9+ | Included |
|
|
74
|
+
| **TypeScript/TSX** | ts-morph (Node.js) | Node.js, npm | Included; installs bundled npm deps on first use |
|
|
75
|
+
| **Go** | stdlib `ast` | Go toolchain on PATH | Included; auto-detects from PATH |
|
|
76
|
+
| **Rust** | syn + cargo | Rust toolchain on PATH | Included; builds bundled extractor on first use |
|
|
77
|
+
|
|
78
|
+
All extractors share the same output format and are automatically invoked by `bootstrap`, `extract`, `lint`, and `sync` commands.
|
|
79
|
+
|
|
80
|
+
Each language provides:
|
|
81
|
+
- **Classes/Types** → Entity wiki pages with attributes, methods, relationships
|
|
82
|
+
- **Functions/Methods** → Function tables in module pages
|
|
83
|
+
- **Imports** → Cross-module relationship tracking
|
|
84
|
+
- **Docstrings/Comments** → Included in entity documentation
|
|
85
|
+
|
|
86
|
+
## Installation (with Multi-Language Support)
|
|
87
|
+
|
|
88
|
+
Install the CLI:
|
|
89
|
+
```bash
|
|
90
|
+
pip install agent-wiki-cli
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The package defines optional extras for language groups, but they do not install
|
|
94
|
+
additional Python dependencies. Non-Python extractors depend on runtime
|
|
95
|
+
toolchains instead:
|
|
96
|
+
- TypeScript/TSX: `node` and `npm`; bundled npm dependencies install on first use.
|
|
97
|
+
- Go: `go`; the bundled extractor runs via the Go toolchain.
|
|
98
|
+
- Rust: `cargo`; the bundled extractor builds on first use using the packaged lockfile.
|
|
99
|
+
|
|
100
|
+
Or from source:
|
|
101
|
+
```bash
|
|
102
|
+
git clone https://github.com/Denissvgn/python-wiki-llm.git
|
|
103
|
+
cd python-wiki-llm
|
|
104
|
+
pip install -e .
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Setup & Initialization
|
|
108
|
+
|
|
109
|
+
Bootstrap the wiki and agent constraint schema inside the root of your project:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
llm-wiki init --agent claude
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Supported agents: `claude`, `aider`, `opencode`, `copilot`, `cursor`, `generic`.
|
|
116
|
+
|
|
117
|
+
**What this does**:
|
|
118
|
+
- Creates `docs/llm_wiki/index.md` (table of contents).
|
|
119
|
+
- Creates `docs/llm_wiki/log.md` (append-only chronological ledger).
|
|
120
|
+
- Scaffolds `entities/`, `modules/`, `workflows/`, and `infrastructure/` directories.
|
|
121
|
+
- Writes the agent-specific instruction file (e.g. `CLAUDE.md`, `.github/copilot-instructions.md`) so the agent knows the rules of the system.
|
|
122
|
+
- Saves the chosen agent to `.git/.llm-wiki-agent` (local-only, not committed) so subsequent commands (like `install-hook`) pick it up automatically.
|
|
123
|
+
|
|
124
|
+
> If you pass a CLI agent (`claude`, `aider`, `opencode`) that is not installed on your `PATH`, `init` will warn you but still create all files.
|
|
125
|
+
|
|
126
|
+
Use `--wiki-dir` to change the default wiki location:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
llm-wiki init --agent copilot --wiki-dir .wiki
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Disable quality hints (agent constraints for surgical changes and careful editing):
|
|
133
|
+
```bash
|
|
134
|
+
llm-wiki init --agent copilot --no-quality-hints
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Bootstrap an Existing Codebase
|
|
138
|
+
|
|
139
|
+
Generate a comprehensive wiki from an existing project in one command:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
llm-wiki bootstrap --src-dir . --wiki-dir docs/llm_wiki
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**What this does**:
|
|
146
|
+
- Scans all project files via **multi-language AST extraction** (Python, TypeScript, Go, Rust).
|
|
147
|
+
- For each language:
|
|
148
|
+
- Python: deep extraction (docstrings, attributes with types/defaults, method signatures, decorators, imports).
|
|
149
|
+
- TypeScript/Go/Rust: classes, interfaces, types, functions, methods, imports.
|
|
150
|
+
- Creates **entity pages** (`entities/<ClassName>.md`) with full attribute tables, method signatures, and cross-module relationship links.
|
|
151
|
+
- Creates **module pages** (`modules/<filename>.md`) with import tables, class summaries, and function signatures with decorators.
|
|
152
|
+
- Discovers and documents **Docker/Compose files** as `infrastructure/<name>.md` with build stages, ports, environment variables, volumes, services, and cross-references to source code.
|
|
153
|
+
- Rebuilds `index.md` and appends a summary to `log.md`.
|
|
154
|
+
- Creates `<wiki-dir>/.llm-wiki-manifest.json` for incremental syncs (see `llm-wiki sync` below).
|
|
155
|
+
- Cross-references imports to build `used_by` / `imported_by` relationship graphs between entities.
|
|
156
|
+
|
|
157
|
+
**Flags**:
|
|
158
|
+
- `--overwrite` — Regenerate existing pages instead of skipping them.
|
|
159
|
+
- `--depth shallow|full` — `full` (default) extracts everything; `shallow` produces name-only stubs.
|
|
160
|
+
- `--skip-workflows` — Skip automatic workflow page generation from the call graph.
|
|
161
|
+
|
|
162
|
+
**Multi-language support:**
|
|
163
|
+
- **Python**: Always available (stdlib `ast`)
|
|
164
|
+
- **TypeScript/TSX** (`.ts`, `.tsx`): Requires Node.js and npm on PATH; bundled npm dependencies install on first use
|
|
165
|
+
- **Go** (`.go`): Requires Go on PATH
|
|
166
|
+
- **Rust** (`.rs`): Requires Cargo on PATH; compiles on first use
|
|
167
|
+
|
|
168
|
+
## Automation Setup (Highly Recommended)
|
|
169
|
+
|
|
170
|
+
Install the post-commit hook to keep the wiki in sync automatically:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
llm-wiki install-hook
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The agent is read automatically from `.git/.llm-wiki-agent` (written by `init` as a local-only, non-committed file). You can override it:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
llm-wiki install-hook --agent aider
|
|
180
|
+
llm-wiki install-hook --wiki-dir .wiki # custom wiki dir
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### CLI Agents (Claude, Aider, OpenCode)
|
|
184
|
+
|
|
185
|
+
The post-commit hook spawns `llm-wiki trigger-agent` as a detached background process via `nohup`:
|
|
186
|
+
|
|
187
|
+
1. Calculates `git diff HEAD~1..HEAD`.
|
|
188
|
+
2. Extracts current multi-language AST context.
|
|
189
|
+
3. Writes a temporary command payload to `.git/llm-wiki-prompt.txt`.
|
|
190
|
+
4. Spawns the CLI agent (e.g., `claude -p --dangerously-skip-permissions`) and pipes the prompt in.
|
|
191
|
+
5. The agent updates the configured wiki markdown files and commits the result.
|
|
192
|
+
|
|
193
|
+
The prompt file includes the last commit diff and AST context. It is written with owner-only permissions where the platform supports it, but you should still treat it as sensitive if commits may contain secrets.
|
|
194
|
+
|
|
195
|
+
Inspect the background log at any time:
|
|
196
|
+
```bash
|
|
197
|
+
cat .git/llm-wiki-sync.log
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### IDE Agents (Copilot, Cursor, Generic)
|
|
201
|
+
|
|
202
|
+
Because IDE agents run inside the editor and have no headless CLI interface, the post-commit hook generates a sync prompt instead:
|
|
203
|
+
|
|
204
|
+
1. Writes a ready-to-paste prompt to `.git/llm-wiki-prompt.txt`.
|
|
205
|
+
2. The prompt tells the IDE agent how to inspect the last diff, extract changed-file AST context, and run lint.
|
|
206
|
+
3. Prints a reminder in the terminal.
|
|
207
|
+
|
|
208
|
+
After every commit you'll see:
|
|
209
|
+
```text
|
|
210
|
+
+--------------------------------------------------------------+
|
|
211
|
+
| LLM Wiki: paste the sync prompt into your IDE agent chat. |
|
|
212
|
+
| File: .git/llm-wiki-prompt.txt |
|
|
213
|
+
+--------------------------------------------------------------+
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Paste the file contents into your agent chat to trigger the wiki update.
|
|
217
|
+
|
|
218
|
+
You can also generate the prompt manually at any time (without committing):
|
|
219
|
+
```bash
|
|
220
|
+
llm-wiki generate-prompt
|
|
221
|
+
llm-wiki generate-prompt --print # print to stdout
|
|
222
|
+
llm-wiki generate-prompt --wiki-dir .wiki # custom wiki dir
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Manual Version Bumping
|
|
226
|
+
|
|
227
|
+
You can bump the project version manually at any time:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
llm-wiki bump --patch # 0.1.5 -> 0.1.6
|
|
231
|
+
llm-wiki bump --minor # 0.1.6 -> 0.2.0
|
|
232
|
+
llm-wiki bump --patch --stage # bump + git add (for hook use)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Supported version files: `pyproject.toml`, `setup.cfg`, `package.json`, `VERSION`.
|
|
236
|
+
|
|
237
|
+
## Manual Commands
|
|
238
|
+
|
|
239
|
+
You or your agent can manually invoke any part of the pipeline:
|
|
240
|
+
|
|
241
|
+
### 1. Structural Extraction
|
|
242
|
+
|
|
243
|
+
Extracts the project topology into a token-friendly JSON representation (all languages):
|
|
244
|
+
```bash
|
|
245
|
+
llm-wiki extract --src-dir .
|
|
246
|
+
llm-wiki extract --src-dir . --changed # only files changed in last commit
|
|
247
|
+
llm-wiki extract --src-dir . --summary # compact output (names only)
|
|
248
|
+
llm-wiki extract --src-dir . --paths src/foo.py src/bar.py # specific files
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Flags**:
|
|
252
|
+
- `--changed` — Extract only files modified since the last commit (for large projects)
|
|
253
|
+
- `--summary` — Compact format with class/function names only (no signatures, docstrings)
|
|
254
|
+
- `--paths FILE...` — Extract specific files for drill-down detail
|
|
255
|
+
- `--deep` — Deep mode (extract nested relationships)
|
|
256
|
+
- `--package NAME` — Only include files belonging to a discovered package
|
|
257
|
+
- `--include-empty` — Include Python files even if they have no extractable components
|
|
258
|
+
|
|
259
|
+
### 2. Linting the Wiki
|
|
260
|
+
|
|
261
|
+
Validates wiki consistency — checks for broken links, orphan pages, and cross-references all entity/module/infrastructure pages against the live AST to detect undocumented classes, stale pages, and missing modules:
|
|
262
|
+
```bash
|
|
263
|
+
llm-wiki lint --wiki-dir docs/llm_wiki --src-dir .
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Returns exit code `1` on any issues, making it CI-compatible.
|
|
267
|
+
|
|
268
|
+
### 3. Incremental Sync (Fast Updates)
|
|
269
|
+
|
|
270
|
+
Update the wiki incrementally — only regenerates pages for files that changed since bootstrap/last sync:
|
|
271
|
+
```bash
|
|
272
|
+
llm-wiki sync --src-dir . --wiki-dir docs/llm_wiki
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
This is much faster than `bootstrap` for large projects. It:
|
|
276
|
+
- Uses `docs/llm_wiki/.llm-wiki-manifest.json` to track source file hashes
|
|
277
|
+
- Regenerates entity and module pages only for changed/new files
|
|
278
|
+
- Marks deleted files with a deprecation header in their wiki pages
|
|
279
|
+
- Rebuilds the index automatically
|
|
280
|
+
- Falls back gracefully for pre-manifest wikis (seeds baseline on first run)
|
|
281
|
+
|
|
282
|
+
### 4. Context Budgeting (Large Projects)
|
|
283
|
+
|
|
284
|
+
Build a token-budgeted snapshot of the codebase for feeding to agents when the full extract is too large:
|
|
285
|
+
```bash
|
|
286
|
+
llm-wiki context --budget 8000 --src-dir . --format markdown
|
|
287
|
+
llm-wiki context --budget 8000 --src-dir . --format json
|
|
288
|
+
llm-wiki context --budget 8000 --focus changed # prioritise changed files
|
|
289
|
+
llm-wiki context --budget 8000 --focus all # treat all files equally
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
The token budget is an estimated maximum for the returned context payload.
|
|
293
|
+
When full detail does not fit, files are downgraded to slimmer summaries; files
|
|
294
|
+
that still do not fit are listed as omitted.
|
|
295
|
+
|
|
296
|
+
**Flags**:
|
|
297
|
+
- `--budget TOKENS` (required) — Estimated maximum token count for the context payload
|
|
298
|
+
- `--format markdown|json` — Output format (default: json)
|
|
299
|
+
- `--focus changed|all` — Priority classification (changed files get full detail; default: changed)
|
|
300
|
+
|
|
301
|
+
### 5. Legacy Wiki Migration
|
|
302
|
+
|
|
303
|
+
Reconcile pages generated by older llm-wiki versions with the current
|
|
304
|
+
collision-aware naming rules without deleting prior content:
|
|
305
|
+
```bash
|
|
306
|
+
llm-wiki migrate --src-dir . --wiki-dir docs/llm_wiki
|
|
307
|
+
llm-wiki migrate --dry-run # preview without writing
|
|
308
|
+
llm-wiki migrate --chunk-size 200 --plan-chunks # inspect chunk plan
|
|
309
|
+
llm-wiki migrate --chunk-size 200 # apply next pending chunk
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
This regenerates active canonical pages, preserves previous page content under
|
|
313
|
+
`## Legacy Notes`, archives old pages under `docs/llm_wiki/legacy/`, rebuilds
|
|
314
|
+
`index.md`, refreshes the sync manifest, and rewrites known active links.
|
|
315
|
+
Archived `legacy/` pages are ignored by `lint`, and migrate adds the archive
|
|
316
|
+
directory to `.gitignore` so migration snapshots do not flood the repository.
|
|
317
|
+
|
|
318
|
+
For large wikis, use `--chunk-size` to keep each working-tree change small.
|
|
319
|
+
Run the same chunked command repeatedly, reviewing or committing between runs.
|
|
320
|
+
The final chunk refreshes `index.md`, active links, and `.llm-wiki-manifest.json`.
|
|
321
|
+
|
|
322
|
+
### 6. Generate Sync Prompt (IDE agents)
|
|
323
|
+
|
|
324
|
+
Builds an IDE sync prompt and writes it to a file for pasting into your IDE agent chat:
|
|
325
|
+
```bash
|
|
326
|
+
llm-wiki generate-prompt
|
|
327
|
+
llm-wiki generate-prompt --print # print to stdout instead
|
|
328
|
+
llm-wiki generate-prompt --output my.txt # custom output path
|
|
329
|
+
llm-wiki generate-prompt --src-dir . --wiki-dir docs/llm_wiki
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### 7. Upgrade Framework
|
|
333
|
+
|
|
334
|
+
Refresh all framework-managed artifacts in one command (idempotent, non-destructive):
|
|
335
|
+
```bash
|
|
336
|
+
llm-wiki upgrade
|
|
337
|
+
llm-wiki upgrade --agent copilot # switch agents
|
|
338
|
+
llm-wiki upgrade --wiki-dir .wiki # custom wiki dir
|
|
339
|
+
llm-wiki upgrade --no-quality-hints # disable quality hints
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
This updates:
|
|
343
|
+
- Agent constraint blocks in schema files
|
|
344
|
+
- Wiki directory structure (adds missing directories)
|
|
345
|
+
- Git hooks (if previously installed)
|
|
346
|
+
|
|
347
|
+
### 8. Release Changelog
|
|
348
|
+
|
|
349
|
+
Stamp the current project version into the `[Unreleased]` section of the changelog. Empty `[Unreleased]` sections are left unchanged.
|
|
350
|
+
```bash
|
|
351
|
+
llm-wiki release
|
|
352
|
+
llm-wiki release --changelog CHANGELOG.md
|
|
353
|
+
llm-wiki release --stage
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### 9. Project Status
|
|
357
|
+
|
|
358
|
+
Display the current wiki setup and integration status:
|
|
359
|
+
```bash
|
|
360
|
+
llm-wiki status
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
Shows: wiki directory, configured agent, installed hooks, circuit breaker state, page counts.
|
|
364
|
+
|
|
365
|
+
### 10. Version Bump
|
|
366
|
+
|
|
367
|
+
Manually bump the project version:
|
|
368
|
+
```bash
|
|
369
|
+
llm-wiki bump --patch # increment patch
|
|
370
|
+
llm-wiki bump --minor # increment minor, reset patch
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
## Wiki File Naming Conventions
|
|
374
|
+
|
|
375
|
+
The wiki uses collision-aware naming to ensure every page has a unique filename:
|
|
376
|
+
|
|
377
|
+
| Page Type | Pattern | Examples |
|
|
378
|
+
|-----------|---------|----------|
|
|
379
|
+
| **Entity** | `entities/<ClassName>.md` | `User.md`, `parser_Parser.md` (when collision) |
|
|
380
|
+
| **Module** | `modules/<file_stem>.md` | `cli.md`, `pkg_a_cli.md` (when collision) |
|
|
381
|
+
| **Workflow** | `workflows/<name>.md` | `user_auth_flow.md` |
|
|
382
|
+
| **Infrastructure** | `infrastructure/<path_transformed>.md` | `Dockerfile.md`, `test_project_Dockerfile.md`, `docker-compose_yml.md` |
|
|
383
|
+
|
|
384
|
+
**Collision-aware naming:**
|
|
385
|
+
- When multiple classes share the same name across different files, the module page name is prepended (e.g., `pkg_a_cli_Parser.md` vs `pkg_b_cli_Parser.md`)
|
|
386
|
+
- When multiple files share the same stem in different directories, parent directory components are progressively added (e.g., `pkg_a_cli.md` vs `pkg_b_cli.md`)
|
|
387
|
+
- These rules are automatically enforced by `bootstrap`, `sync`, and validated by `lint`
|
|
388
|
+
|
|
389
|
+
## Forking and Security
|
|
390
|
+
|
|
391
|
+
This project does not maintain a formal contribution process. The source is
|
|
392
|
+
published under the MIT License, so you may freely fork it, adapt it, and run
|
|
393
|
+
your own version under the license terms.
|
|
394
|
+
|
|
395
|
+
Public issues are still useful for reproducible bugs and project discussion.
|
|
396
|
+
Participants are expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
397
|
+
in project spaces.
|
|
398
|
+
|
|
399
|
+
Do not report security vulnerabilities in public issues. Follow
|
|
400
|
+
[SECURITY.md](SECURITY.md), especially for issues involving headless agent
|
|
401
|
+
execution, generated prompt files, path handling, or extractor subprocesses.
|
|
402
|
+
|
|
403
|
+
## Uninstalling from a Project
|
|
404
|
+
|
|
405
|
+
Remove LLM Wiki integration artifacts (hooks, agent constraint blocks, local runtime artifacts) while **preserving the wiki documentation**:
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
llm-wiki uninstall
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
To also delete the wiki documentation directory:
|
|
412
|
+
```bash
|
|
413
|
+
llm-wiki uninstall --remove-wiki
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
Preview what would be removed first:
|
|
417
|
+
```bash
|
|
418
|
+
llm-wiki uninstall --dry-run
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Safety guarantees:**
|
|
422
|
+
- **Wiki docs**: kept by default. Pass `--remove-wiki` to opt-in to deletion.
|
|
423
|
+
- **Agent schema files** (e.g. `CLAUDE.md`): only the `# --- LLM Wiki Maintainer Constraints ---` block is stripped. Any user-written content outside that block is preserved. The file is only deleted if it contained nothing else.
|
|
424
|
+
- **Git hooks**: only removed if they contain the `LLM Wiki` signature. Custom user hooks are never touched.
|
|
425
|
+
- The CLI itself is not uninstalled — run `pip uninstall agent-wiki-cli` separately if needed.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
agent_wiki_cli-0.3.28.dist-info/licenses/LICENSE,sha256=FdvlcqfD5hFLtp5dLa-YNjXqJWhbhb6VYhO1Xdh8DnQ,1070
|
|
2
|
+
llm_wiki_cli/__init__.py,sha256=5Xg9LU2O-YdJ2CtdWnmywkS67k9t7nyjCkTIrSmSu4U,234
|
|
3
|
+
llm_wiki_cli/cli.py,sha256=zOA90-vqjaOC3XvSlFumQ8yG5kS20jX9LYyD3dlR14Q,13385
|
|
4
|
+
llm_wiki_cli/config.py,sha256=QncEhsimmYPtMXSC_so5x6wU8u9Ukmtk9YFSbjOwu3s,9841
|
|
5
|
+
llm_wiki_cli/commands/__init__.py,sha256=--ErvF13fh2rnbFzC9m7GXg4Tq2z7NLFTNzvgb1NkRQ,126
|
|
6
|
+
llm_wiki_cli/commands/bootstrap_cmd.py,sha256=ot4W3SVPkPJMoZKY3Y61DvSKsEIkx-ztL9lV2fLQ320,39744
|
|
7
|
+
llm_wiki_cli/commands/bump_cmd.py,sha256=oNbWzIM1S621Z3gsAfeU-b4sw6mwtgy-zGuvPsWj34w,1702
|
|
8
|
+
llm_wiki_cli/commands/context_cmd.py,sha256=SptGEVILQV7ztGBfetyQGwO_JrKwofRQkoMaiNI2ebM,14714
|
|
9
|
+
llm_wiki_cli/commands/extract_cmd.py,sha256=rntB0p2afcBHgBTCCffQgl8LVUVY8zPoRwh02jaKmmE,28249
|
|
10
|
+
llm_wiki_cli/commands/generate_prompt_cmd.py,sha256=0PzHwiJxYmhjC1NntWZaUaNsCyG_yMenSjU3xHAP79k,2898
|
|
11
|
+
llm_wiki_cli/commands/hook_cmd.py,sha256=F7z8pMwsUcU0LJePlAysfkPGncd5S-UDDYMV0tW6Mrk,5607
|
|
12
|
+
llm_wiki_cli/commands/init_cmd.py,sha256=1U7Rb6xaAP5y6ozd2JO5_1G6wamkhbsxAsJwauB3Iko,3409
|
|
13
|
+
llm_wiki_cli/commands/lint_cmd.py,sha256=CH93JR5X652f8iL_h1rV3mbJrGmH_5CMRg4XH7GQcl4,11101
|
|
14
|
+
llm_wiki_cli/commands/migrate_cmd.py,sha256=mRTA9vbFwH6tqcnAebUzDDI40u37l6tzzek42slvKsI,30337
|
|
15
|
+
llm_wiki_cli/commands/release_cmd.py,sha256=T5_y7AaWNGKTJkYAUmEIfxzwFq2m9f0j6y1dVs1ukxk,5533
|
|
16
|
+
llm_wiki_cli/commands/status_cmd.py,sha256=ERhj-zQuJ880JMsmFAsOJreUoIOFtoQosUb_mzNg7Zc,2767
|
|
17
|
+
llm_wiki_cli/commands/sync_cmd.py,sha256=LcB4VmNUZ4iFHGUC0dQ9jqt7twNGfBkgCqjNFwuD-LY,21071
|
|
18
|
+
llm_wiki_cli/commands/trigger_cmd.py,sha256=_ifm3iJIzyXrso-ESLfMPNZNMqgxo-JvuuWJlzM2zyY,6949
|
|
19
|
+
llm_wiki_cli/commands/uninstall_cmd.py,sha256=DmoF9HUjc8PSWg2ArINXmm3KSqEenZny5QonHBqmfAo,6760
|
|
20
|
+
llm_wiki_cli/commands/upgrade_cmd.py,sha256=RbIwwCVa6Kdb3beBZ8tbgO_XQGgvjvdfKcOjg7miw8w,6766
|
|
21
|
+
llm_wiki_cli/extractors/__init__.py,sha256=YzF15u-KX6w1oi2cdnj4iBZHFrj4y5DyFY3T7dKPypQ,1538
|
|
22
|
+
llm_wiki_cli/extractors/common.py,sha256=_z3K0EgHWMUyIGQxZUd4fYPUNaByVhObweSZYxaG-Ao,3041
|
|
23
|
+
llm_wiki_cli/extractors/go_extractor.py,sha256=_uMfydP-fPv5dTtYu8DYmUEfQwSPS5sJIIVSrTy4MAc,4477
|
|
24
|
+
llm_wiki_cli/extractors/python_extractor.py,sha256=LljH2Am2fTEsZ0mGUAnUGCU0-TDMZEUmp3gjMeqZ0OI,12466
|
|
25
|
+
llm_wiki_cli/extractors/rust_extractor.py,sha256=TRrYMIn3KH_zeDn8zE8sWk6k12MkdtWAGglKwL4CN58,4546
|
|
26
|
+
llm_wiki_cli/extractors/ts_extractor.py,sha256=23eRx8EmY_eSnoLJjI4tKQPlPj-r16kIVHP4vjzBGH0,6706
|
|
27
|
+
llm_wiki_cli/extractors/go_scripts/go.mod,sha256=O6aNl71-5mulj3rosb6D6GxLvQ5CZs48iIN6aqaU5H0,38
|
|
28
|
+
llm_wiki_cli/extractors/go_scripts/main.go,sha256=IFjG6kis38KHcgFBweIfiYDK104woaM5kBuyiTT8vis,19036
|
|
29
|
+
llm_wiki_cli/extractors/rust_scripts/Cargo.lock,sha256=Bj6qC7jMRviQvD8j8i5cSvQu2dJs6XJ9N9q9ObrzOyo,2716
|
|
30
|
+
llm_wiki_cli/extractors/rust_scripts/Cargo.toml,sha256=J4yLS9NNZ-jTb7DXPVWrQjzQAYF4pGwPKuV_BAxudVk,296
|
|
31
|
+
llm_wiki_cli/extractors/rust_scripts/src/main.rs,sha256=O5ec_TNd89rcfH1XJCdSfn_zhKvMtalJtPovwzwhlPE,28184
|
|
32
|
+
llm_wiki_cli/extractors/ts_scripts/extract.js,sha256=kqT1tZ-4tPovbrmptIuIvpD09umHRnwWp1DhKR8H7o4,16161
|
|
33
|
+
llm_wiki_cli/extractors/ts_scripts/package.json,sha256=8SD8r50EbeUlI7_WM5ysVubx5F30uZp2RXI5F6BNGzU,218
|
|
34
|
+
llm_wiki_cli/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
+
llm_wiki_cli/services/circuit_breaker.py,sha256=kZPZwdjIaz9JWvYAScy_p7fSaDrdNRAn0CVcxF-Aegc,2258
|
|
36
|
+
llm_wiki_cli/services/io.py,sha256=mdeYyqWUp5WC2lotaRw6v3ZpCrxJHBf8PNDPBGL9jnk,1515
|
|
37
|
+
llm_wiki_cli/services/lockfile.py,sha256=N_anKWDyTIVPFSddNhMHGK0CbjjRe6FuIKnekUR85Pk,1879
|
|
38
|
+
llm_wiki_cli/services/packages.py,sha256=2SnXlF0iqQV-iKW2iycOwWu4O8qrRFbxIwb_RMVuxJQ,5757
|
|
39
|
+
llm_wiki_cli/services/paths.py,sha256=BCvwAYta3mPsgZnGoPvAS-LXANMNAiuzAofwuv374s4,1025
|
|
40
|
+
llm_wiki_cli/services/schema.py,sha256=g2gRcbrJTMK6GZxJiqQWEMH6s8woxK881y3ISVtfY6A,10267
|
|
41
|
+
llm_wiki_cli/services/secure_file.py,sha256=QBDgaFmv-sKJhGLgOMVmr4QR8XAwD_GA09Tc1mlBUqE,702
|
|
42
|
+
llm_wiki_cli/services/versioning.py,sha256=1F9XtDYz9Z2tMOMMIDc5Jo0AA01pqOfc7cLhBwwdml0,6843
|
|
43
|
+
agent_wiki_cli-0.3.28.dist-info/METADATA,sha256=M2w2IP0XAR8N2HCZoLTV5fCpV2xLqnDrc7YjF0A3Zuk,19359
|
|
44
|
+
agent_wiki_cli-0.3.28.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
45
|
+
agent_wiki_cli-0.3.28.dist-info/entry_points.txt,sha256=MZiisGI1emH0V179Z5LUR8FkXQrCye0FQhYqKP_gRUU,51
|
|
46
|
+
agent_wiki_cli-0.3.28.dist-info/top_level.txt,sha256=dhJcln7wkOJ_NbUl2pHdv11hw1mSZ0ORej6ppb9cUvo,13
|
|
47
|
+
agent_wiki_cli-0.3.28.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Denis Sivagin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
llm_wiki_cli
|