@itradingai/aiwiki 0.2.21 → 0.2.22

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.
package/README.md CHANGED
@@ -1,291 +1,360 @@
1
- ![AIWiki 宣传图](https://raw.githubusercontent.com/iTradingAI/aiwiki/main/docs/assets/aiwiki-hero.png)
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/iTradingAI/aiwiki/main/docs/assets/aiwiki-hero.png" alt="AIWiki" width="100%" />
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="./README.zh-CN.md">Chinese</a> |
7
+ <a href="./docs/README.md">Docs</a> |
8
+ <a href="./docs/USAGE.md">Usage</a> |
9
+ <a href="./docs/FAQ.md">FAQ</a> |
10
+ <a href="https://www.npmjs.com/package/@itradingai/aiwiki">npm</a>
11
+ </p>
2
12
 
3
13
  # AIWiki
4
14
 
5
- AIWiki 是一个开源的 Agent-first 本地 LLM-wiki CLI。
15
+ [![npm version](https://img.shields.io/npm/v/@itradingai/aiwiki.svg)](https://www.npmjs.com/package/@itradingai/aiwiki)
16
+ [![Node.js >=20](https://img.shields.io/badge/node-%3E%3D20-339933.svg)](https://nodejs.org/)
17
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
18
 
7
- 你把文章链接、网页正文或本地文本交给宿主 Agent;宿主 Agent 负责读取和理解内容;AIWiki 负责把结果稳定写进本地 Markdown 知识库,并生成可追踪、可查询、可持续整理的 Wiki 条目。
19
+ **Save what your AI reads. Ask it later. Keep everything local.**
8
20
 
9
- 一句话说:AIWiki 不是网页抓取器,而是宿主 Agent 的本地 LLM-wiki 后端。
21
+ AIWiki is a local Markdown knowledge base for AI assistants.
10
22
 
11
- ## 它解决什么
23
+ Give your AI assistant a URL, article, file, or note. The assistant reads and understands it. AIWiki turns the result into structured, traceable, reusable Markdown knowledge files.
12
24
 
13
- - 链接和资料散在聊天记录里,后续很难复用。
14
- - AI 总结过一次内容,但没有沉淀成可查询的知识条目。
15
- - 想把资料卡、选题、大纲、Wiki 条目放进同一个本地知识库。
16
- - 想让 Agent 负责理解内容,让 CLI 负责稳定落盘和追踪。
25
+ Use it to build a local AI knowledge base that can be queried, checked, maintained, and reused later.
17
26
 
18
- ## 工作流
27
+ ## Quick Start
19
28
 
20
- ### Ingest:把资料写入本地 Wiki
29
+ Ask your AI assistant to install and configure AIWiki.
30
+
31
+ Choose a local folder for your knowledge base. Examples:
21
32
 
22
33
  ```text
23
- 用户给 URL / 正文 / 文件
24
- -> 宿主 Agent 读取内容并尽量生成 analysis / wiki_entry
25
- -> aiwiki ingest-agent --stdin
26
- -> AIWiki 写入 Raw / Source Card / Wiki Entry / Run Summary;有明确内容或请求时再写 Claim / Topic / Outline / Asset
34
+ Windows: D:\AIWiki
35
+ macOS/Linux: ~/AIWiki
36
+ Project test: ./aiwiki-test
27
37
  ```
28
38
 
29
- ### Query:从 Wiki 调度知识
39
+ Copy this prompt into Codex, Claude Code, QClaw, OpenClaw, or another local coding assistant:
30
40
 
31
- ```bash
32
- aiwiki context "AI Agent 出海机会"
33
- aiwiki query "AI Agent 出海机会"
34
- ```
41
+ ```text
42
+ Please install and configure AIWiki for me.
35
43
 
36
- `context` 返回 JSON,主要给宿主 Agent 用;`query` 使用同一套检索结果,输出给人看的摘要。第一版是本地关键词检索,不是向量检索。
44
+ First check that Node.js is installed and that node --version is >=20.
45
+ If Node.js is missing or older than 20, stop and tell me how to upgrade before running npm install.
37
46
 
38
- ### Lint:检查知识库结构
47
+ Use this knowledge base path:
39
48
 
40
- ```bash
41
- aiwiki lint
49
+ <replace-with-my-aiwiki-path>
50
+
51
+ Run these commands:
52
+
53
+ npm install -g @itradingai/aiwiki@latest
54
+ aiwiki setup --path "<replace-with-my-aiwiki-path>" --yes
55
+ aiwiki agent sync --yes
56
+ aiwiki agent sync --path "<replace-with-my-aiwiki-path>" --yes
57
+ aiwiki agent check --json
58
+ aiwiki agent check --path "<replace-with-my-aiwiki-path>" --json
59
+ aiwiki doctor --path "<replace-with-my-aiwiki-path>"
60
+ aiwiki status --path "<replace-with-my-aiwiki-path>"
61
+
62
+ Then tell me:
63
+
64
+ 1. whether AIWiki was installed successfully
65
+ 2. which assistant targets were synced
66
+ 3. whether workspace guidance was written
67
+ 4. whether I need to restart or reload my assistant
68
+ 5. what I should do next
42
69
  ```
43
70
 
44
- `lint` 会检查缺失链接、重复来源、fallback Wiki 条目、enriched 条目缺字段等问题,并写入 `dashboards/Lint Report.md`。
71
+ AIWiki has two integration layers:
72
+
73
+ - `aiwiki agent sync --yes` syncs AIWiki instructions into supported local assistant environments.
74
+ - `aiwiki agent sync --path "<workspace>" --yes` writes workspace-level guidance so assistants entering the knowledge base know to use AIWiki commands first.
75
+
76
+ After syncing, restart or reload your assistant if needed.
45
77
 
46
- ## 示例
78
+ ### Expected result
47
79
 
48
- 仓库内置了一个由当前 CLI 重新生成的样例:
80
+ After setup, your assistant should be able to confirm:
49
81
 
50
- - `examples/demo-run/`:输入材料、执行命令和关键 CLI 输出。
51
- - `examples/obsidian-vault-sample/`:可直接查看的样例知识库。
82
+ - `aiwiki` is installed and reports a version
83
+ - the knowledge base path exists and passes `aiwiki doctor`
84
+ - assistant integration is `installed`, `updated`, or `current`
85
+ - workspace guidance was written by `aiwiki agent sync --path`
86
+ - `aiwiki status` reports the workspace state and next action
52
87
 
53
- 样例展示了核心产物优先的约定:Raw、Source Card、Wiki Entry、Run Summary、Processing Summary 总是最先检查;Claim、Asset、Topic、Outline 只在 payload 有对应内容或明确请求时出现。
88
+ ## First Use
54
89
 
55
- ## 快速开始
90
+ ### 10-minute public trial path
56
91
 
57
- ### 第一步:安装 AIWiki CLI
92
+ Use this path when you are trying AIWiki for the first time:
58
93
 
59
- AI 帮你安装时,可以把下面这段交给当前 Agent,改成自己的知识库路径:
94
+ 1. Run the Quick Start prompt above with a temporary knowledge base path.
95
+ 2. Send one article, file, or note to your assistant and ask it to ingest the source into AIWiki.
96
+ 3. Ask one question about the ingested topic so the assistant calls `aiwiki context`.
97
+ 4. Run `aiwiki query "<topic>"` when you want a direct terminal view.
98
+ 5. Ask the assistant to check the workspace with `aiwiki lint --json` and `aiwiki doctor`.
99
+ 6. Share feedback with the short template in [`docs/TRIAL_FEEDBACK_TEMPLATE.md`](docs/TRIAL_FEEDBACK_TEMPLATE.md).
100
+
101
+ The point of the first trial is not to build a large archive. It is to confirm that one source can move from reading, to traceable Markdown files, to later reuse.
102
+
103
+ ### Ingest a source
104
+
105
+ Tell your assistant:
60
106
 
61
107
  ```text
62
- 请帮我安装并配置 AIWiki
63
- 安装命令:npm install -g @itradingai/aiwiki@latest
64
- 我的知识库路径:F:\knowledges
65
-
66
- 请检查 Node.js >=20,执行 aiwiki setup --path "我的知识库路径" --yes,
67
- 然后运行 aiwiki agent sync --yes、aiwiki agent check --json、
68
- aiwiki agent sync --path "我的知识库路径" --yes 和 aiwiki agent check --path "我的知识库路径" --json,
69
- 完成宿主 Agent 与知识库根指导对接。
70
- 最后执行 aiwiki doctor 和 aiwiki status,告诉我实际执行了哪些命令和还差什么手动步骤。
108
+ Ingest this into AIWiki:
109
+ <url>
71
110
  ```
72
111
 
73
- 手动安装:
112
+ Or:
74
113
 
75
- ```bash
76
- npx @itradingai/aiwiki@latest setup
77
- aiwiki agent sync --yes
78
- aiwiki agent check --json
114
+ ```text
115
+ Save this note into AIWiki:
116
+ <paste your note here>
79
117
  ```
80
118
 
81
- ### 第二步:接入宿主 Agent
119
+ The assistant reads the source and calls AIWiki to write the result into your local knowledge base.
82
120
 
83
- ```bash
84
- aiwiki agent sync --yes
85
- aiwiki agent check --json
86
- aiwiki agent sync --path "F:\knowledges" --yes
87
- aiwiki agent check --path "F:\knowledges" --json
121
+ ### Ask your knowledge base
122
+
123
+ Tell your assistant:
124
+
125
+ ```text
126
+ What does AIWiki know about <topic>?
88
127
  ```
89
128
 
90
- 也可以直接输出通用协议:
129
+ The assistant should call:
91
130
 
92
131
  ```bash
93
- aiwiki prompt agent
132
+ aiwiki context "<topic>"
94
133
  ```
95
134
 
96
- ### 第三步:第一次入库
97
-
98
- 对宿主 Agent 发送:
135
+ For direct terminal output, use:
99
136
 
100
- ```text
101
- 入库 https://example.com/article
137
+ ```bash
138
+ aiwiki query "<topic>"
102
139
  ```
103
140
 
104
- 宿主 Agent 读取正文后调用 `aiwiki ingest-agent --stdin`。用户不需要手动保存 payload,也不需要每次输入 `--path`。
105
-
106
- ### 第四步:从知识库提问
141
+ ### Check your workspace
107
142
 
108
- 对宿主 Agent 说:
143
+ Tell your assistant:
109
144
 
110
145
  ```text
111
- AIWiki 里帮我了解 xxx
146
+ Check and organize my AIWiki workspace.
112
147
  ```
113
148
 
114
- 宿主 Agent 应优先调用:
149
+ The assistant should call:
115
150
 
116
151
  ```bash
117
- aiwiki context "xxx"
152
+ aiwiki lint --json
118
153
  ```
119
154
 
120
- 人直接查询时可以运行:
155
+ When only safe fixes are reported and you allow cleanup, the assistant may run:
121
156
 
122
157
  ```bash
123
- aiwiki query "xxx"
158
+ aiwiki lint --fix-empty-dirs --json
159
+ aiwiki lint --json
124
160
  ```
125
161
 
126
- ## AIWiki 会生成什么
162
+ ## What AIWiki Creates
127
163
 
128
- 成功入库会生成:
164
+ A successful ingest creates a traceable knowledge package:
129
165
 
130
166
  ```text
131
- 02-raw/articles/
132
- 03-sources/article-cards/
133
- 05-wiki/source-knowledge/
134
- 09-runs/<run-id>/
167
+ 02-raw/articles/ Raw source record
168
+ 03-sources/article-cards/ Source card
169
+ 05-wiki/source-knowledge/ Reusable wiki entry
170
+ 09-runs/<run-id>/ Processing record
135
171
  ```
136
172
 
137
- 其中 `02-raw/articles/`、`03-sources/article-cards/`、`05-wiki/source-knowledge/` `09-runs/<run-id>/` 是核心产物。`04-claims/_suggestions/`、`06-assets/_suggestions/`、`07-topics/ready/`、`08-outputs/outlines/` 只在 payload 有对应内容或 `request.outputs` 明确请求时生成。
173
+ Optional files may also be created when the assistant provides enough structured content:
138
174
 
139
- ### Agent-Enriched Wiki Entry
175
+ ```text
176
+ 04-claims/_suggestions/ Claim candidates
177
+ 06-assets/_suggestions/ Reusable ideas or writing assets
178
+ 07-topics/ready/ Topic candidates
179
+ 08-outputs/outlines/ Draft outlines
180
+ ```
140
181
 
141
- 如果宿主 Agent payload 中提供了 `analysis` `wiki_entry`,AIWiki 会把这些总结、核心观点、知识点、概念、选题等内容写入 Wiki Entry。
182
+ The Wiki Entry is the main reusable knowledge surface. The raw record and source card preserve traceability, so you can always go back from a summary to the source.
142
183
 
143
- frontmatter 会标记:
184
+ A successful first run should leave you with:
144
185
 
145
- ```yaml
146
- generation_mode: "agent_enriched"
147
- quality: "enriched"
148
- generated_by: "host_agent"
149
- llm_enriched: true
150
- source_role: "input"
151
- represents_user_view: false
152
- ```
186
+ - a new folder under `09-runs/`
187
+ - `payload.json` and `processing-summary.md` inside that run folder
188
+ - a Source Card under `03-sources/article-cards/`
189
+ - a reusable Wiki Entry under `05-wiki/source-knowledge/`
190
+ - `aiwiki query "<topic>"` or `aiwiki context "<topic>"` returning a relevant match
191
+ - `aiwiki lint --json` returning structure feedback instead of requiring manual file inspection first
192
+
193
+ See:
153
194
 
154
- ### Deterministic Fallback Wiki Entry
195
+ - [`examples/demo-run/`](examples/demo-run/)
196
+ - [`examples/obsidian-vault-sample/`](examples/obsidian-vault-sample/)
155
197
 
156
- 如果宿主 Agent 只提供原文,AIWiki 仍会创建 Wiki Entry,但它只是可追溯脚手架,包含标题、来源、正文预览、反链和待补全区。
198
+ ## Why AIWiki
157
199
 
158
- frontmatter 会标记:
200
+ Most useful information dies in one of three places:
159
201
 
160
- ```yaml
161
- generation_mode: "deterministic_fallback"
162
- quality: "scaffold"
163
- generated_by: "aiwiki_cli"
164
- llm_enriched: false
165
- source_role: "input"
166
- represents_user_view: false
202
+ - bookmarks you never reopen
203
+ - chat summaries you cannot reuse
204
+ - notes that never become output
205
+
206
+ AIWiki helps your assistant turn reading into a durable local knowledge base.
207
+
208
+ Instead of saving links and losing context, you get Markdown files that your assistant can query, maintain, and reuse later.
209
+
210
+ ## Practical Scenarios
211
+
212
+ - **Save research while reading**: send an article to your assistant and let AIWiki create a source card, Wiki Entry, and processing record.
213
+ - **Prepare future writing**: turn useful ideas into reusable concepts, claims, topics, and outline material when the assistant provides enough structure.
214
+ - **Ask across your own archive**: ask what AIWiki knows about a topic and let the assistant retrieve local context before answering.
215
+
216
+ ## How It Works
217
+
218
+ ```text
219
+ User gives a URL, file, note, or text
220
+ -> AI assistant reads and understands it
221
+ -> AIWiki writes structured Markdown files
222
+ -> Assistant retrieves context later with aiwiki context
223
+ -> AIWiki lint checks structure and consistency
167
224
  ```
168
225
 
169
- AIWiki CLI 本身不调用 LLM,所以不会在没有 Agent 分析字段时承诺高质量提炼。
226
+ AIWiki separates responsibilities:
170
227
 
171
- ## 设计边界
228
+ - the assistant reads and understands sources
229
+ - AIWiki writes, links, queries, and checks the local knowledge base
230
+ - Markdown remains inspectable, editable, portable, and versionable
172
231
 
173
- AIWiki 做:
232
+ Technically, AIWiki is Agent-first: the host assistant reads and understands sources; AIWiki writes, links, queries, and checks the local Markdown knowledge base.
174
233
 
175
- - 接收宿主 Agent payload。
176
- - 写入本地 Markdown。
177
- - 生成 frontmatter、wikilink、处理记录。
178
- - 生成 Wiki Entry 容器。
179
- - 支持 `context`、`query`、`next` 和 `lint`。
234
+ ## Inspired By
180
235
 
181
- AIWiki 不做:
236
+ AIWiki is inspired by two useful ideas:
182
237
 
183
- - 通用网页抓取。
184
- - 微信公众号读取。
185
- - 伪造浏览器头。
186
- - 浏览器插件。
187
- - CLI 内置 LLM。
188
- - 自动高质量总结。
189
- - 默认人工审核流程。
190
- - 企业级 RBAC。
191
- - 多知识库。
192
- - 批量采集 / 定时采集 / RSS。
238
+ - **LLM Wiki**, popularized by Andrej Karpathy: compile sources into a persistent, maintainable wiki instead of rediscovering knowledge from raw documents every time.
239
+ - **Content workflow thinking**, seen in creator systems such as Dan Koe's: useful ideas should become reusable building blocks for topics, outlines, writing, and future work.
193
240
 
194
- ## Obsidian / Dataview
241
+ AIWiki does not simply copy either approach.
195
242
 
196
- AIWiki 生成的是标准 Markdown frontmatter,不强依赖 Obsidian。
243
+ It turns them into a practical assistant-driven workflow:
197
244
 
198
- Obsidian 是推荐查看界面;Dataview 只是可选 dashboard 增强。AIWiki 不会自动安装 Dataview,也不会修改 `.obsidian`。
245
+ ```text
246
+ source
247
+ -> source card
248
+ -> wiki entry
249
+ -> reusable assets
250
+ -> topics
251
+ -> outlines
252
+ -> future work
253
+ ```
199
254
 
200
- Review Queue 可以保留为回看入口,但不是 AIWiki 的主流程。
255
+ The goal is simple: make what your assistant reads useful again later.
201
256
 
202
- ## 常见问题
257
+ ## Agent Integration
203
258
 
204
- ### AIWiki 会自己抓网页吗?
259
+ AIWiki is built for assistant-driven workflows.
205
260
 
206
- 不会。网页读取由宿主 Agent 完成,AIWiki 负责把 Agent 已经读到的内容写入本地知识库。
261
+ Supported local assistant targets may include:
207
262
 
208
- ### 为什么会生成 05-wiki?
263
+ - Codex
264
+ - Claude Code
265
+ - QClaw
266
+ - OpenClaw
209
267
 
210
- 因为 AIWiki 的目标不是只保存资料,而是让资料进入可查询、可维护的 Wiki 知识层。
268
+ Your assistant should run:
211
269
 
212
- ### 05-wiki 是否代表我的观点?
270
+ ```bash
271
+ aiwiki agent sync --yes
272
+ aiwiki agent sync --path "<workspace>" --yes
273
+ aiwiki agent check --json
274
+ aiwiki agent check --path "<workspace>" --json
275
+ ```
213
276
 
214
- 不一定。外部资料生成的 Wiki 条目默认代表“外部资料的结构化整理”,不代表你的个人观点。
277
+ For unsupported hosts, ask AIWiki to print the generic assistant protocol:
215
278
 
216
- ### 什么内容才代表我的观点?
279
+ ```bash
280
+ aiwiki prompt agent
281
+ ```
217
282
 
218
- `source_role=output` 用于标记用户已发布文章、演讲稿、公众号文章等个人输出,并可配合 `represents_user_view: true`。外部资料默认是 `source_role: input`、`represents_user_view: false`。
283
+ `npm install` does not silently modify assistant configuration. Sync is explicit, idempotent, and backs up changed installed skill files before overwrite.
219
284
 
220
- ### Dataview 必须安装吗?
285
+ After syncing, restart or reload the assistant if needed.
221
286
 
222
- 不必须。没有 Dataview,也可以用普通 Markdown、Properties、Backlinks、Search 和 Graph View。
287
+ ## Obsidian and Dataview
223
288
 
224
- ### Review Queue 还需要吗?
289
+ AIWiki writes plain Markdown and frontmatter.
225
290
 
226
- 不是必需流程。它只适合低置信度、来源缺失、内容冲突、个人观点把关等回看场景。
291
+ Obsidian is optional but useful as a viewing surface. Dataview is an optional dashboard enhancement.
227
292
 
228
- ## 文档
293
+ AIWiki does not require Obsidian, does not auto-install Dataview, and does not edit `.obsidian`.
229
294
 
230
- - [docs/USAGE.md](docs/USAGE.md)
231
- - [docs/AGENT_HANDOFF.md](docs/AGENT_HANDOFF.md)
232
- - [docs/FAQ.md](docs/FAQ.md)
233
- - [docs/SHOWCASE.md](docs/SHOWCASE.md)
234
- - [docs/ROADMAP.md](docs/ROADMAP.md)
235
- - [docs/RELEASE.md](docs/RELEASE.md)
236
- - [CONTRIBUTING.md](CONTRIBUTING.md)
237
- - [SECURITY.md](SECURITY.md)
295
+ Review Queue is not the main workflow. AIWiki creates Wiki entries first, then uses lint and assistant workflows to keep the workspace clean.
238
296
 
239
- ## 本地开发
297
+ ## Boundaries
240
298
 
241
- ```bash
242
- npm install
243
- npm run build
244
- npm test
245
- npm link
246
- aiwiki setup --path "F:\knowledge_data\aiwiki-test" --yes
247
- aiwiki doctor
248
- aiwiki ingest-agent --payload tests/fixtures/agent_payload.url.valid.json --path "F:\knowledge_data\aiwiki-test"
249
- aiwiki context "AI Agent" --path "F:\knowledge_data\aiwiki-test"
250
- aiwiki query "AI Agent" --path "F:\knowledge_data\aiwiki-test"
251
- aiwiki next --path "F:\knowledge_data\aiwiki-test"
252
- aiwiki lint --path "F:\knowledge_data\aiwiki-test"
253
- ```
299
+ AIWiki is not:
254
300
 
255
- ## License
301
+ - a web crawler
302
+ - a WeChat reader
303
+ - a browser extension
304
+ - a built-in LLM
305
+ - a vector database
306
+ - a replacement for every RAG system
307
+ - an Obsidian plugin
308
+ - a default manual review queue
309
+ - a multi-knowledge-base manager
310
+ - an RSS or scheduled collection system
256
311
 
257
- MIT. See [LICENSE](LICENSE).
312
+ AIWiki receives content already read by your assistant and turns it into a local Markdown knowledge base.
258
313
 
259
- ## Query Filters
314
+ ## Community
260
315
 
261
- AIWiki retrieval is local Markdown/frontmatter search. It is intentionally lightweight: no vector search, no database, no external search, and no RAG-over-wiki.
316
+ AIWiki is developed by iTradingAI.
262
317
 
263
- ```bash
264
- aiwiki context "AI Agent" --type wiki_entries --source-role input --wiki-type source_knowledge --status active --limit 5
265
- aiwiki query "AI Agent" --type source_cards --status to-review --limit 3
266
- ```
318
+ For Chinese users, scan the QR codes below to join the WeChat group or follow the official account.
319
+
320
+ | WeChat Group | Official Account |
321
+ | --- | --- |
322
+ | ![Join WeChat group](https://raw.githubusercontent.com/iTradingAI/aiwiki/main/docs/assets/join-group.png) | ![WeChat official account](https://raw.githubusercontent.com/iTradingAI/aiwiki/main/docs/assets/wechat-official-account.png) |
267
323
 
268
- `context` returns Agent-readable JSON with `query_scope`, `result_quality`, `recommended_next_action`, `match_reasons`, `quality_signals`, and `related_refs`. `query` uses the same retrieval path and shows the match reasons and quality hints for humans.
324
+ ## Documentation
269
325
 
270
- ## Agent Skill Sync and Upgrade
326
+ - [Docs](docs/README.md)
327
+ - [Usage Guide](docs/USAGE.md)
328
+ - [Agent Handoff](docs/AGENT_HANDOFF.md)
329
+ - [FAQ](docs/FAQ.md)
330
+ - [Showcase](docs/SHOWCASE.md)
331
+ - [Trial Feedback Template](docs/TRIAL_FEEDBACK_TEMPLATE.md)
332
+ - [Roadmap](docs/ROADMAP.md)
333
+ - [Release Notes](docs/RELEASE.md)
271
334
 
272
- AIWiki is Agent-first: after installing or upgrading the npm package, sync the packaged AIWiki skill into the local Agent environment.
335
+ ## Development
273
336
 
274
- First install and later upgrades use the same safe command:
337
+ For local development:
275
338
 
276
339
  ```bash
277
- npm install -g @itradingai/aiwiki@latest
278
- aiwiki agent sync --yes
279
- aiwiki agent check
340
+ npm install
341
+ npm run build
342
+ npm test
343
+ npm link
280
344
  ```
281
345
 
282
- For one Agent:
346
+ Use a temporary workspace for local testing:
283
347
 
284
348
  ```bash
285
- aiwiki agent sync --agent codex --yes
286
- aiwiki agent sync --agent claude --yes
349
+ aiwiki setup --path "./aiwiki-test" --yes
350
+ aiwiki doctor --path "./aiwiki-test"
351
+ aiwiki status --path "./aiwiki-test"
352
+ aiwiki ingest-agent --payload tests/fixtures/agent_payload.url.valid.json --path "./aiwiki-test"
353
+ aiwiki context "AI Agent" --path "./aiwiki-test"
354
+ aiwiki query "AI Agent" --path "./aiwiki-test"
355
+ aiwiki lint --path "./aiwiki-test"
287
356
  ```
288
357
 
289
- `agent sync` is idempotent. Missing targets are installed, current targets are left unchanged, and changed old skill files are backed up before overwrite. Use `--dry-run` to preview and `--json` when an AI Agent needs stable machine-readable status.
358
+ ## License
290
359
 
291
- After sync, restart or reload the target Agent so it reads the new AIWiki skill. To roll back, copy the generated `.bak-<timestamp>` file back over the target skill file.
360
+ MIT. See [LICENSE](LICENSE).