@knightcodeai/cli 0.17.4 → 0.18.1

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 (281) hide show
  1. package/CHANGELOG.md +1303 -0
  2. package/README.md +2 -2
  3. package/dist/bundle/chunks/anthropic-messages-A2IH2IY3.js +6 -0
  4. package/dist/bundle/chunks/anthropic.js +101 -0
  5. package/dist/bundle/chunks/azure-openai-responses-XZILQZOG.js +2 -0
  6. package/dist/bundle/chunks/bedrock-converse-stream.js +89 -0
  7. package/dist/bundle/chunks/chunk-253N4337.js +7 -0
  8. package/dist/bundle/chunks/chunk-2QIKI63P.js +108 -0
  9. package/dist/bundle/chunks/chunk-3LX7U45C.js +130 -0
  10. package/dist/bundle/chunks/chunk-4CRI7BMY.js +2 -0
  11. package/dist/bundle/chunks/chunk-57BPR4HF.js +2 -0
  12. package/dist/bundle/chunks/chunk-A5LJINMT.js +2 -0
  13. package/dist/bundle/chunks/chunk-AANBXVWQ.js +2 -0
  14. package/dist/bundle/chunks/chunk-AHB7JV5B.js +2 -0
  15. package/dist/bundle/chunks/chunk-B2FT7RH5.js +2 -0
  16. package/dist/bundle/chunks/chunk-BPNRVFVQ.js +2 -0
  17. package/dist/bundle/chunks/chunk-BRKUE2MD.js +2 -0
  18. package/dist/bundle/chunks/chunk-BXZL5C3N.js +58 -0
  19. package/dist/bundle/chunks/chunk-DGACKL4S.js +30 -0
  20. package/dist/bundle/chunks/chunk-DKOURXGU.js +2 -0
  21. package/dist/bundle/chunks/chunk-DVFCXHT4.js +2 -0
  22. package/dist/bundle/chunks/chunk-ETOMYYZC.js +2 -0
  23. package/dist/bundle/chunks/chunk-FA32X2UJ.js +7 -0
  24. package/dist/bundle/chunks/chunk-FHM6KUY3.js +44 -0
  25. package/dist/bundle/chunks/chunk-FO7CEQB3.js +11 -0
  26. package/dist/bundle/chunks/chunk-FXS5MU6B.js +2 -0
  27. package/dist/bundle/chunks/chunk-HHWP56PR.js +2 -0
  28. package/dist/bundle/chunks/chunk-HSL72VZI.js +2 -0
  29. package/dist/bundle/chunks/chunk-HUQB436V.js +2 -0
  30. package/dist/bundle/chunks/chunk-HWXGL4YB.js +2 -0
  31. package/dist/bundle/chunks/chunk-KQKUEQJA.js +6 -0
  32. package/dist/bundle/chunks/chunk-LROWZ6UF.js +1333 -0
  33. package/dist/bundle/chunks/chunk-MOALMQWH.js +9 -0
  34. package/dist/bundle/chunks/chunk-MXIWLMNT.js +8 -0
  35. package/dist/bundle/chunks/chunk-N6VDWLND.js +2 -0
  36. package/dist/bundle/chunks/chunk-NCIBB66G.js +2 -0
  37. package/dist/bundle/chunks/chunk-NDQ5OW6U.js +2 -0
  38. package/dist/bundle/chunks/chunk-O6JSP6YG.js +6 -0
  39. package/dist/bundle/chunks/chunk-OFST7FDG.js +2 -0
  40. package/dist/bundle/chunks/chunk-SPAUY3RD.js +12 -0
  41. package/dist/bundle/chunks/chunk-UZWP3NHW.js +2 -0
  42. package/dist/bundle/chunks/chunk-V5ANFNKF.js +11 -0
  43. package/dist/bundle/chunks/chunk-VJJ6J35N.js +20 -0
  44. package/dist/bundle/chunks/chunk-ZW7FVRHT.js +31 -0
  45. package/dist/bundle/chunks/cli-DFJTSQI6.js +51 -0
  46. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-6E2UM7IG.js +2 -0
  47. package/dist/bundle/chunks/codemode-worker.js +478 -0
  48. package/dist/bundle/chunks/dist-DKI7Q6GY.js +13 -0
  49. package/dist/bundle/chunks/easter-egg-3d-7O2AHLAQ.js +2 -0
  50. package/dist/bundle/chunks/execute-4CLOTQIS.js +499 -0
  51. package/dist/bundle/chunks/github-copilot.js +2 -0
  52. package/dist/bundle/chunks/google-generative-ai-CSWR3ORZ.js +2 -0
  53. package/dist/bundle/chunks/google-vertex-QIDRFOFB.js +2 -0
  54. package/dist/bundle/chunks/image-resize-worker.js +2 -0
  55. package/dist/bundle/chunks/jiti-loader-BXVX3Y2R.js +21 -0
  56. package/dist/bundle/chunks/jiti-static-loader-NNBCFAO5.js +2 -0
  57. package/dist/bundle/chunks/kimi-coding.js +2 -0
  58. package/dist/bundle/chunks/knightcode-messages-3GNOTMSI.js +8 -0
  59. package/dist/bundle/chunks/lib-IHWMWJDR.js +9 -0
  60. package/dist/bundle/chunks/llama-cpp-classify-HRPRKOZA.js +22 -0
  61. package/dist/bundle/chunks/meta.js +2 -0
  62. package/dist/bundle/chunks/mistral-conversations-46TK5OBA.js +5 -0
  63. package/dist/bundle/chunks/multipart-parser-VTTMF2EO.js +3 -0
  64. package/dist/bundle/chunks/node-7S3GFMOZ.js +16 -0
  65. package/dist/bundle/chunks/node-MAEICQNS.js +2 -0
  66. package/dist/bundle/chunks/openai-chatgpt.js +101 -0
  67. package/dist/bundle/chunks/openai-codex-responses-IT7VEKUU.js +10 -0
  68. package/dist/bundle/chunks/openai-codex.js +101 -0
  69. package/dist/bundle/chunks/openai-completions-LOKIW33V.js +7 -0
  70. package/dist/bundle/chunks/openai-decisions-4F3LWHMG.js +5 -0
  71. package/dist/bundle/chunks/openai-responses-OK36GJXP.js +3 -0
  72. package/dist/bundle/chunks/openrouter-images-ZI7LLZ4Y.js +2 -0
  73. package/dist/bundle/chunks/openrouter.js +101 -0
  74. package/dist/bundle/chunks/radius.js +101 -0
  75. package/dist/bundle/chunks/runtime-IN7ZPKFY.js +2 -0
  76. package/dist/bundle/chunks/src-ETRMT73D.js +4 -0
  77. package/dist/bundle/chunks/typesafe-system-one-J2CJBWEH.js +2 -0
  78. package/dist/bundle/chunks/virtual-modules-7VXI3TVN.js +2 -0
  79. package/dist/bundle/chunks/xai.js +2 -0
  80. package/dist/bundle/cli-runtime.js +3 -0
  81. package/dist/bundle/cli.js +16 -0
  82. package/dist/bundle/native/darwin/prebuilds/darwin-arm64/darwin-platform.node +0 -0
  83. package/dist/bundle/native/darwin/prebuilds/darwin-x64/darwin-platform.node +0 -0
  84. package/dist/bundle/native/linux/prebuilds/linux-arm64/linux-platform-x11.node +0 -0
  85. package/dist/bundle/native/linux/prebuilds/linux-x64/linux-platform-x11.node +0 -0
  86. package/dist/bundle/native/win32/prebuilds/win32-arm64/win32-platform.node +0 -0
  87. package/dist/bundle/native/win32/prebuilds/win32-x64/win32-platform.node +0 -0
  88. package/dist/core/export-html/template.css +1015 -0
  89. package/dist/core/export-html/template.html +55 -0
  90. package/dist/core/export-html/template.js +1929 -0
  91. package/dist/core/export-html/vendor/highlight.min.js +1213 -0
  92. package/dist/core/export-html/vendor/marked.min.js +78 -0
  93. package/dist/modes/interactive/theme/dark.json +74 -0
  94. package/dist/modes/interactive/theme/light.json +74 -0
  95. package/dist/modes/interactive/theme/system-theme.ts +579 -0
  96. package/dist/modes/interactive/theme/theme-controller.ts +253 -0
  97. package/dist/modes/interactive/theme/theme-schema.ts +145 -0
  98. package/dist/modes/interactive/theme/theme-tokens.ts +145 -0
  99. package/dist/modes/interactive/theme/theme.ts +1076 -0
  100. package/docs/app-server.md +479 -0
  101. package/docs/app-server.schema.json +8128 -0
  102. package/docs/cli-integration.md +106 -0
  103. package/docs/cli.md +393 -0
  104. package/docs/codemode.md +230 -0
  105. package/docs/compaction.md +463 -0
  106. package/docs/configuration.md +48 -0
  107. package/docs/containerization.md +143 -0
  108. package/docs/custom-provider.md +225 -0
  109. package/docs/desktop.md +73 -0
  110. package/docs/docs.json +236 -0
  111. package/docs/environment-variables.md +138 -0
  112. package/docs/extensions.md +420 -0
  113. package/docs/how-knightcode-works.md +49 -0
  114. package/docs/images/doom-extension.png +0 -0
  115. package/docs/images/interactive-mode.png +0 -0
  116. package/docs/images/tree-view.png +0 -0
  117. package/docs/index.md +39 -0
  118. package/docs/json.md +226 -0
  119. package/docs/keybindings.md +197 -0
  120. package/docs/llama-cpp.md +121 -0
  121. package/docs/mcp.md +272 -0
  122. package/docs/message-types.md +279 -0
  123. package/docs/models-configuration.md +187 -0
  124. package/docs/models.md +221 -0
  125. package/docs/nvidia-rtx-llama-cpp.md +96 -0
  126. package/docs/packages.md +129 -0
  127. package/docs/plan-mode.md +121 -0
  128. package/docs/prompt-templates.md +59 -0
  129. package/docs/providers.md +282 -0
  130. package/docs/quickstart.md +128 -0
  131. package/docs/remote.md +87 -0
  132. package/docs/rpc-commands.md +860 -0
  133. package/docs/rpc-extension-ui.md +214 -0
  134. package/docs/rpc.md +193 -0
  135. package/docs/sdk.md +197 -0
  136. package/docs/security.md +99 -0
  137. package/docs/session-format.md +358 -0
  138. package/docs/sessions.md +135 -0
  139. package/docs/settings.md +220 -0
  140. package/docs/shell-aliases.md +93 -0
  141. package/docs/skills.md +93 -0
  142. package/docs/slash-commands.md +78 -0
  143. package/docs/terminal-setup.md +242 -0
  144. package/docs/termux.md +117 -0
  145. package/docs/themes.md +140 -0
  146. package/docs/tmux.md +55 -0
  147. package/docs/tui.md +195 -0
  148. package/docs/usage.md +167 -0
  149. package/docs/virtual-models.md +114 -0
  150. package/docs/windows.md +67 -0
  151. package/examples/README.md +36 -0
  152. package/examples/extensions/README.md +214 -0
  153. package/examples/extensions/auto-commit-on-exit.ts +55 -0
  154. package/examples/extensions/bash-spawn-hook.ts +30 -0
  155. package/examples/extensions/bookmark.ts +50 -0
  156. package/examples/extensions/border-status-editor.ts +151 -0
  157. package/examples/extensions/built-in-tool-renderer.ts +225 -0
  158. package/examples/extensions/claude-rules.ts +89 -0
  159. package/examples/extensions/commands.ts +72 -0
  160. package/examples/extensions/confirm-destructive.ts +60 -0
  161. package/examples/extensions/custom-compaction.ts +118 -0
  162. package/examples/extensions/custom-footer.ts +66 -0
  163. package/examples/extensions/custom-header.ts +73 -0
  164. package/examples/extensions/custom-provider-anthropic/index.ts +617 -0
  165. package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
  166. package/examples/extensions/custom-provider-anthropic/package.json +19 -0
  167. package/examples/extensions/custom-provider-gitlab-duo/index.ts +399 -0
  168. package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
  169. package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
  170. package/examples/extensions/debug-provider.ts +90 -0
  171. package/examples/extensions/dirty-repo-guard.ts +56 -0
  172. package/examples/extensions/doom-overlay/README.md +46 -0
  173. package/examples/extensions/doom-overlay/doom/build.sh +152 -0
  174. package/examples/extensions/doom-overlay/doom/doomgeneric_knightcode.c +72 -0
  175. package/examples/extensions/doom-overlay/doom-component.ts +132 -0
  176. package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
  177. package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
  178. package/examples/extensions/doom-overlay/index.ts +74 -0
  179. package/examples/extensions/doom-overlay/wad-finder.ts +55 -0
  180. package/examples/extensions/dynamic-resources/SKILL.md +8 -0
  181. package/examples/extensions/dynamic-resources/dynamic.json +75 -0
  182. package/examples/extensions/dynamic-resources/dynamic.md +5 -0
  183. package/examples/extensions/dynamic-resources/index.ts +15 -0
  184. package/examples/extensions/dynamic-tools.ts +74 -0
  185. package/examples/extensions/entry-renderer.ts +41 -0
  186. package/examples/extensions/event-bus.ts +43 -0
  187. package/examples/extensions/file-trigger.ts +41 -0
  188. package/examples/extensions/git-checkpoint.ts +53 -0
  189. package/examples/extensions/git-merge-and-resolve.ts +115 -0
  190. package/examples/extensions/github-issue-autocomplete.ts +185 -0
  191. package/examples/extensions/gondolin/index.ts +531 -0
  192. package/examples/extensions/gondolin/package-lock.json +185 -0
  193. package/examples/extensions/gondolin/package.json +19 -0
  194. package/examples/extensions/handoff.ts +190 -0
  195. package/examples/extensions/hello.ts +26 -0
  196. package/examples/extensions/hidden-thinking-label.ts +53 -0
  197. package/examples/extensions/inline-bash.ts +94 -0
  198. package/examples/extensions/input-transform-streaming.ts +39 -0
  199. package/examples/extensions/input-transform.ts +43 -0
  200. package/examples/extensions/interactive-shell.ts +196 -0
  201. package/examples/extensions/jev-router.ts +113 -0
  202. package/examples/extensions/mac-system-theme.ts +47 -0
  203. package/examples/extensions/message-renderer.ts +59 -0
  204. package/examples/extensions/minimal-mode.ts +353 -0
  205. package/examples/extensions/modal-editor.ts +85 -0
  206. package/examples/extensions/model-status.ts +31 -0
  207. package/examples/extensions/notify.ts +57 -0
  208. package/examples/extensions/overlay-qa-tests.ts +1450 -0
  209. package/examples/extensions/overlay-test.ts +153 -0
  210. package/examples/extensions/permission-gate.ts +34 -0
  211. package/examples/extensions/pirate.ts +47 -0
  212. package/examples/extensions/plan-mode/README.md +66 -0
  213. package/examples/extensions/plan-mode/index.ts +387 -0
  214. package/examples/extensions/plan-mode/utils.ts +168 -0
  215. package/examples/extensions/preset.ts +436 -0
  216. package/examples/extensions/project-trust.ts +64 -0
  217. package/examples/extensions/prompt-customizer.ts +49 -0
  218. package/examples/extensions/protected-paths.ts +30 -0
  219. package/examples/extensions/provider-payload.ts +18 -0
  220. package/examples/extensions/qna.ts +118 -0
  221. package/examples/extensions/question.ts +278 -0
  222. package/examples/extensions/questionnaire.ts +440 -0
  223. package/examples/extensions/rainbow-editor.ts +88 -0
  224. package/examples/extensions/reload-runtime.ts +37 -0
  225. package/examples/extensions/rpc-demo.ts +118 -0
  226. package/examples/extensions/sandbox/index.ts +321 -0
  227. package/examples/extensions/sandbox/package-lock.json +92 -0
  228. package/examples/extensions/sandbox/package.json +19 -0
  229. package/examples/extensions/send-user-message.ts +97 -0
  230. package/examples/extensions/session-name.ts +27 -0
  231. package/examples/extensions/shutdown-command.ts +63 -0
  232. package/examples/extensions/snake.ts +343 -0
  233. package/examples/extensions/space-invaders.ts +560 -0
  234. package/examples/extensions/ssh.ts +220 -0
  235. package/examples/extensions/status-line.ts +32 -0
  236. package/examples/extensions/structured-output.ts +65 -0
  237. package/examples/extensions/subagent/README.md +177 -0
  238. package/examples/extensions/subagent/agents/planner.md +37 -0
  239. package/examples/extensions/subagent/agents/reviewer.md +35 -0
  240. package/examples/extensions/subagent/agents/scout.md +50 -0
  241. package/examples/extensions/subagent/agents/worker.md +24 -0
  242. package/examples/extensions/subagent/agents.ts +157 -0
  243. package/examples/extensions/subagent/index.ts +1010 -0
  244. package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
  245. package/examples/extensions/subagent/prompts/implement.md +10 -0
  246. package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
  247. package/examples/extensions/summarize.ts +199 -0
  248. package/examples/extensions/system-prompt-header.ts +17 -0
  249. package/examples/extensions/tic-tac-toe.ts +1004 -0
  250. package/examples/extensions/timed-confirm.ts +70 -0
  251. package/examples/extensions/titlebar-spinner.ts +58 -0
  252. package/examples/extensions/todo.ts +294 -0
  253. package/examples/extensions/tool-override.ts +144 -0
  254. package/examples/extensions/tools.ts +146 -0
  255. package/examples/extensions/trigger-compact.ts +50 -0
  256. package/examples/extensions/truncated-tool.ts +195 -0
  257. package/examples/extensions/widget-placement.ts +9 -0
  258. package/examples/extensions/with-deps/index.ts +32 -0
  259. package/examples/extensions/with-deps/package-lock.json +31 -0
  260. package/examples/extensions/with-deps/package.json +22 -0
  261. package/examples/extensions/working-indicator.ts +121 -0
  262. package/examples/extensions/working-message-test.ts +25 -0
  263. package/examples/rpc-client.ts +35 -0
  264. package/examples/rpc-extension-ui.ts +661 -0
  265. package/examples/sdk/01-minimal.ts +26 -0
  266. package/examples/sdk/02-custom-model.ts +49 -0
  267. package/examples/sdk/03-custom-prompt.ts +70 -0
  268. package/examples/sdk/04-skills.ts +55 -0
  269. package/examples/sdk/05-tools.ts +48 -0
  270. package/examples/sdk/06-extensions.ts +94 -0
  271. package/examples/sdk/07-context-files.ts +42 -0
  272. package/examples/sdk/08-prompt-templates.ts +51 -0
  273. package/examples/sdk/09-api-keys-and-oauth.ts +34 -0
  274. package/examples/sdk/10-settings.ts +53 -0
  275. package/examples/sdk/11-sessions.ts +52 -0
  276. package/examples/sdk/12-full-control.ts +74 -0
  277. package/examples/sdk/13-session-runtime.ts +67 -0
  278. package/examples/sdk/14-codemode-mcp.ts +61 -0
  279. package/examples/sdk/README.md +141 -0
  280. package/package.json +15 -15
  281. package/bin/knightcode +0 -62
@@ -0,0 +1,220 @@
1
+ # Settings Reference
2
+
3
+ This reference lists user-configurable settings, their types, defaults, and purposes. Project settings override agent-directory settings. Resource lists are combined. See [Configuration](configuration.md) for file locations and trust behavior.
4
+
5
+ Add `"$schema": "https://knightcode.dev/schemas/settings.schema.json"` to `settings.json` for editor validation and completion.
6
+
7
+ ## Model and thinking
8
+
9
+ <a id="model-cycling"></a>
10
+
11
+ | Setting | Type | Default | Description |
12
+ |---|---|---|---|
13
+ | `defaultProvider` | string | Automatic | Startup AI provider. Saved by `Ctrl+S` in `/model`. |
14
+ | `defaultModel` | string | Automatic | Startup model ID. Saved by `Ctrl+S` in `/model`. |
15
+ | `defaultThinkingLevel` | `"off" \| "minimal" \| "low" \| "medium" \| "high" \| "xhigh" \| "max"` | `"medium"` | Startup thinking level. |
16
+ | `modelThinkingLevels` | object | None | Per-model startup thinking levels keyed by exact `provider/modelId`. |
17
+ | `thinkingBudgets` | object | Built-in budgets | Token budgets for `minimal`, `low`, `medium`, and `high` thinking levels. |
18
+ | `enabledModels` | `string[]` | All available models | Model patterns used for startup selection and model cycling. Uses the same format as `--models`. |
19
+ | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in the transcript. |
20
+ | `showCacheMissNotices` | boolean | `false` | Show notices for significant cache misses, successful cache warming, compaction usage, and provider recovery. |
21
+ | `cacheWarming` | `"off" \| "streaming" \| "idle"` | `"streaming"` | Keep eligible provider prompt caches warm during active runs or, with `"idle"`, between runs. Global setting only. |
22
+
23
+ Cache warming runs only when the model declares a cache lifetime and KnightCode estimates at least $0.05 in avoided cache-miss cost. Refresh usage counts toward session totals but does not enter model context. `/session` shows the next decision; extensions can override it with `cache_warming_decision`. See [Prompt Cache Lifetimes](models.md#prompt-cache-lifetimes).
24
+
25
+ See [Choose a Model](models.md) for model selection and thinking controls.
26
+
27
+ ## Interaction
28
+
29
+ | Setting | Type | Default | Description |
30
+ |---|---|---|---|
31
+ | `steeringMode` | `"all" \| "one-at-a-time"` | `"one-at-a-time"` | How queued steering messages are delivered. |
32
+ | `followUpMode` | `"all" \| "one-at-a-time"` | `"one-at-a-time"` | How queued follow-up messages are delivered. |
33
+ | `externalEditor` | string | `$VISUAL`, `$EDITOR`, then platform default | Command opened by the external-editor keybinding. |
34
+ | `doubleEscapeAction` | `"tree" \| "fork" \| "none"` | `"tree"` | Action for double Escape with an empty editor. `/undo` is the quick way to a user message. |
35
+ | `treeFilterMode` | `"default" \| "no-tools" \| "user-only" \| "labeled-only" \| "all"` | `"default"` | Initial filter used by `/tree`. |
36
+ | `defaultProjectTrust` | `"ask" \| "always" \| "never"` | `"ask"` | Fallback project-trust behavior. **Can only be set in agent-directory settings.** |
37
+
38
+ ## Tools
39
+
40
+ | Setting | Type | Default | Description |
41
+ |---|---|---|---|
42
+ | `defaultTools` | `string[]` | `read`, `bash`, `edit`, `write` | Tools enabled at startup. Plain names replace the defaults; `+name` adds a tool and `-name` removes one. An empty array disables all built-in tools but not extension or SDK tools. |
43
+ | `codemode.mode` | `"on"` \| `"only"` | `"on"` | How the `codemode` tool presents tools while it is active. `on`: declared tools get a note on calling them from scripts appended to their description, and `codemode` lists only tools that are not declared. `only`: `codemode` lists every tool scripts can call, and active built-in and extension tools are hidden from the model, so it reaches them through `codemode`. |
44
+ | `codemode.inlineBudget` | number | `3000` | Estimated tokens (characters / 4) the `codemode` tool's description may spend on tool declarations. Tools that do not fit are left out and found with `searchTools()`. `0` lists only namespaces. |
45
+
46
+ Available built-in tools are `read`, `bash`, `powershell`, `edit`, `write`, `grep`, `find`, and `ls`. `defaultTools` can also name `codemode` and `tool_search`, which built-in extensions register inactive, and other extension tools registered inactive.
47
+
48
+ A list of only `+name` and `-name` entries changes the inherited selection instead of replacing it. For example, this enables `codemode` next to the default tools:
49
+
50
+ ```json
51
+ {
52
+ "defaultTools": ["+codemode"]
53
+ }
54
+ ```
55
+
56
+ This replaces `bash` with `powershell` and enables `grep`: `["-bash", "+powershell", "+grep"]`. Project settings apply on top of user settings: a project list with only `+name` and `-name` entries changes the user's selection, and a project list with a plain name replaces it. In one list, plain names form the selection, and `+name` and `-name` then apply in order.
57
+
58
+ `/reload` enables tools newly added to `defaultTools`. It does not disable tools removed from it or re-enable unchanged tools you turned off. `--tools` with plain names, `--no-tools`, and `--no-builtin-tools` override `defaultTools`, also on reload.
59
+
60
+ CLI tool options override this setting for one invocation. `--tools` with only `+name` and `-name` entries changes the resolved `defaultTools` selection instead, for example `knightcode --tools +codemode`. On `/reload`, these entries apply to the reloaded setting too, so a tool removed with `-name` stays removed. See [Command Line](cli.md#tools).
61
+
62
+ The [web tools](usage.md#web-tools) `webfetch` and `websearch` and the [question tool](usage.md#questions) `ask_user` are not part of the default `defaultTools`. `/tools` turns them on for the current session, which writes nothing to disk, or on or off by default, which is saved in `~/.knightcode/agent/tools.json` together with the `websearch` provider and Brave key. Naming one in `defaultTools` also turns it on, unless `/tools` has it off.
63
+
64
+ ## Sessions and context
65
+
66
+ | Setting | Type | Default | Description |
67
+ |---|---|---|---|
68
+ | `sessionDir` | string | Agent session directory | Session storage directory. Relative paths resolve from the working directory. `KNIGHTCODE_CODING_AGENT_SESSION_DIR` and `--session-dir` override this setting. |
69
+ | `sessionShareDestination` | `"auto" \| "gist" \| "radius"` | `"auto"` | Destination used by `/share`. `auto` uses Radius when authenticated and otherwise creates a GitHub gist. `gist` always uses a gist. `radius` requires Radius authentication and never falls back to a gist. |
70
+
71
+ ### Compaction
72
+
73
+ | Setting | Type | Default | Description |
74
+ |---|---|---|---|
75
+ | `compaction.enabled` | boolean | `true` | Enable automatic compaction. |
76
+ | `compaction.reserveTokens` | number | `16384` | Free context tokens below which automatic compaction starts. |
77
+ | `compaction.keepRecentTokens` | number | `20000` | Recent tokens retained without summarization. |
78
+ | `compaction.modelOverrides` | object | None | Per-model token settings keyed by exact `provider/modelId`. |
79
+
80
+ <a id="per-model-compaction-overrides"></a>
81
+
82
+ Compaction token values must be non-negative safe integers. Each value resolves independently from the matching model override, then the ordinary compaction setting, then the built-in default. Project and user objects merge before model lookup.
83
+
84
+ See [Compaction Reference](compaction.md) for trigger, summarization, and validation behavior.
85
+
86
+ ### Branch summaries
87
+
88
+ | Setting | Type | Default | Description |
89
+ |---|---|---|---|
90
+ | `branchSummary.reserveTokens` | number | `16384` | Tokens reserved when summarizing branch history. |
91
+ | `branchSummary.skipPrompt` | boolean | `false` | Skip the branch-summary prompt and default to no summary. |
92
+
93
+ ## Terminal and display
94
+
95
+ | Setting | Type | Default | Description |
96
+ |---|---|---|---|
97
+ | `theme` | string | `"system"` | Built-in or custom theme name. `system` derives colors from the terminal theme. |
98
+ | `quietStartup` | boolean \| `"header"` | `false` | `true` hides the startup header and loaded-resource listing. `"header"` keeps the header (version and key hints) but hides the model scope line and loaded-resource listing. |
99
+ | `tuiMode` | `"regular" \| "fullscreen"` | `"fullscreen"` | Interactive terminal UI mode. Fullscreen captures the mouse and owns text selection, so dragging copies to the clipboard; regular leaves selection and copying to the terminal emulator (see [Text selection and copy](terminal-setup.md#text-selection-and-copy)). |
100
+ | `fullscreenExitOutput` | `"transcript" \| "resume-hint"` | `"transcript"` | Output printed when fullscreen mode exits. |
101
+ | `fullscreenScrollbar` | `"auto" \| "always" \| "hidden"` | `"auto"` | Fullscreen transcript scrollbar behavior. |
102
+ | `fullscreenCopyOnSelect` | boolean | `true` | Copy selected text automatically in fullscreen mode. When disabled, selections stay highlighted and `Ctrl+X` copies the active selection. Has no effect in regular mode. |
103
+ | `fullscreenWheelScrollLines` | `"auto"` \| number | `"auto"` | Lines per mouse-wheel event in fullscreen mode, from 1 to 100. `"auto"` moves one line per event in local macOS terminals, which already accelerate wheel and trackpad input; elsewhere, and over SSH, it speeds up fast wheel spins to at most 6 lines per event. Alt+wheel moves five times as far. |
104
+ | `editorPaddingX` | number | `0` | Horizontal editor padding from 0 to 3 cells. |
105
+ | `outputPad` | `0 \| 1` | `1` | Horizontal transcript padding for messages, tool output, `!` command output, and summary blocks. |
106
+ | `autocompleteMaxVisible` | number | `5` | Visible autocomplete entries, from 3 to 20. |
107
+ | `showHardwareCursor` | boolean | `false` | Use the terminal cursor instead of KnightCode's drawn cursor. KnightCode still positions it for input methods. |
108
+ | `terminal.showImages` | boolean | `true` | Display inline images when supported. |
109
+ | `terminal.imageWidthCells` | number | `60` | Preferred inline image width in terminal cells. |
110
+ | `terminal.clearOnShrink` | boolean | `false` | Clear empty rows when rendered content shrinks. |
111
+ | `terminal.showTerminalProgress` | boolean | `false` | Show OSC 9;4 progress in the terminal tab. |
112
+ | `terminal.hyperlinks` | `boolean \| "auto"` | `"auto"` | Override OSC 8 hyperlink detection. |
113
+ | `terminal.images` | `"kitty" \| "iterm2" \| "auto" \| false` | `"auto"` | Override inline-image protocol detection. |
114
+ | `terminal.trueColor` | `boolean \| "auto"` | `"auto"` | Override true-color detection. |
115
+ | `images.autoResize` | boolean | `true` | Resize images to at most 2000 by 2000 pixels before sending them to a model. |
116
+ | `images.blockImages` | boolean | `false` | Prevent images from being sent to models. |
117
+ | `markdown.codeBlockIndent` | string | `" "` | Prefix used to indent rendered code blocks. |
118
+ | `markdown.mermaid` | `"off" \| "final" \| "streaming"` | `"streaming"` | Mermaid rendering mode. |
119
+
120
+ See [Themes](themes.md) and [Terminal Setup](terminal-setup.md) for format and platform details.
121
+
122
+ ## Network and retries
123
+
124
+ | Setting | Type | Default | Description |
125
+ |---|---|---|---|
126
+ | `transport` | `"auto" \| "sse" \| "websocket" \| "websocket-cached"` | `"auto"` | Preferred transport for AI providers that support multiple transports. |
127
+ | `httpProxy` | string | None | Proxy URL applied as `HTTP_PROXY` and `HTTPS_PROXY` for KnightCode-managed HTTP clients. **Can only be set in agent-directory settings.** |
128
+ | `httpIdleTimeoutMs` | number | `300000` | HTTP header and body idle timeout in milliseconds. Set to `0` to disable. |
129
+ | `websocketConnectTimeoutMs` | number | `15000` | WebSocket connection timeout in milliseconds. Set to `0` to disable. |
130
+ | `retry.enabled` | boolean | `true` | Enable automatic agent-level retry for transient failures. |
131
+ | `retry.maxRetries` | number | `3` | Maximum agent-level retry attempts. |
132
+ | `retry.baseDelayMs` | number | `2000` | Initial exponential-backoff delay in milliseconds. |
133
+ | `retry.maxAgentDelayMs` | number | `60000` | Maximum agent-level retry delay in milliseconds. |
134
+ | `retry.provider.timeoutMs` | number | `httpIdleTimeoutMs` | Provider request timeout in milliseconds. |
135
+ | `retry.provider.maxRetries` | number | `0` | Provider-level retry attempts. |
136
+ | `retry.provider.maxRetryDelayMs` | number | `60000` | Maximum server-requested delay in milliseconds. Set to `0` to disable the limit. |
137
+
138
+ Keep `retry.provider.maxRetries` at `0` unless provider-level retries are required. Provider retries can delay KnightCode from handling quota and usage-limit errors itself.
139
+
140
+ ## Shell
141
+
142
+ | Setting | Type | Default | Description |
143
+ |---|---|---|---|
144
+ | `shellPath` | string | Platform default | Custom shell executable path. Supports a leading `~`. |
145
+ | `shellCommandPrefix` | string | None | Prefix prepended to every shell command. |
146
+ | `npmCommand` | `string[]` | `npm` | Command and arguments used for npm package lookup and installation. |
147
+
148
+ See [Shell aliases](shell-aliases.md) for shell setup and [KnightCode Packages](packages.md) for package-manager behavior.
149
+
150
+ ## Resources
151
+
152
+ Resource paths in user settings resolve from the agent directory. Paths in project settings resolve from the project `.knightcode` directory. Absolute paths and `~` are supported.
153
+
154
+ | Setting | Type | Default | Description |
155
+ |---|---|---|---|
156
+ | `packages` | array | `[]` | npm, git, or local KnightCode package sources. See [KnightCode Packages](packages.md). |
157
+ | `extensions` | `string[]` | `[]` | Extension files or directories. |
158
+ | `skills` | `string[]` | `[]` | Skill files or directories. |
159
+ | `prompts` | `string[]` | `[]` | Prompt-template files or directories. |
160
+ | `themes` | `string[]` | `[]` | Theme files or directories. |
161
+ | `enableSkillCommands` | boolean | `true` | Register skills as `/skill:name` commands. |
162
+
163
+ Resource arrays support glob exclusions with `!pattern`, exact inclusion with `+path`, and exact exclusion with `-path`. KnightCode loads resources listed in both user-level and project settings.
164
+
165
+ The built-in extensions are named `builtin:mcp`, `builtin:llama.cpp`, `builtin:codemode`, and `builtin:tool-search` in `extensions`. They load by default; `-builtin:mcp` disables one. A `+builtin:<name>` or `-builtin:<name>` entry in project settings overrides the user setting. `knightcode config` lists them under Built-in. `--no-extensions` disables them too, and `-e builtin:<name>` loads one explicitly.
166
+
167
+ ## Updates, telemetry, and warnings
168
+
169
+ | Setting | Type | Default | Description |
170
+ |---|---|---|---|
171
+ | `autoUpdate` | boolean | `true` | Download KnightCode CLI updates automatically while retaining update notices when `false`. **Can only be set in agent-directory settings.** `KNIGHTCODE_DISABLE_AUTO_UPDATE=1` overrides this setting. See [Disable automatic updates](#disable-automatic-updates). |
172
+ | `collapseChangelog` | boolean | `false` | After an update, show a one-line notice instead of the top three changes. |
173
+ | `enableInstallTelemetry` | boolean | `true` | Enable anonymous install/update reporting and selected provider attribution headers. Does not control update checks. |
174
+ | `enableAnalytics` | boolean | `false` | Opt in to analytics data sharing. Currently used only by the experimental first-run setup. |
175
+ | `warnings.anthropicExtraUsage` | boolean | `true` | Warn when Anthropic subscription authentication may use paid extra usage. |
176
+
177
+ ### Disable automatic updates
178
+
179
+ Automatic updates are **on by default**. Open `/settings`, search for
180
+ **Automatic updates**, and change it from `true` to `false`. KnightCode saves the
181
+ preference in your user-level `settings.json`; no restart or `/reload` is needed.
182
+ It applies to subsequent update checks and does not cancel a download already
183
+ running. Change it back to `true` in `/settings` to re-enable automatic updates.
184
+
185
+ Alternatively, add `"autoUpdate": false` to your user-level `settings.json`:
186
+
187
+ - **Windows:** `%USERPROFILE%\.knightcode\agent\settings.json`
188
+ - **macOS / Linux:** `~/.knightcode/agent/settings.json`
189
+
190
+ ```json
191
+ {
192
+ "autoUpdate": false
193
+ }
194
+ ```
195
+
196
+ Create the file if it does not exist; otherwise add this property to the existing
197
+ JSON object, keeping your other settings. If `KNIGHTCODE_CODING_AGENT_DIR` overrides
198
+ the agent directory, use `settings.json` in that directory instead. Project-local
199
+ `.knightcode/settings.json` cannot override this preference.
200
+
201
+ KnightCode still checks for new versions and shows update notices, but does not
202
+ download or install updates automatically. Run `knightcode update` whenever you
203
+ want to update manually. Set `autoUpdate` to `true`, or remove it, to restore
204
+ automatic updates.
205
+
206
+ After manually editing the file, restart KnightCode or run `/reload`. The new preference
207
+ applies to subsequent update checks; it does not cancel a download already running.
208
+
209
+ Environment variables are optional alternatives, set in the shell or operating
210
+ system environment **before launching KnightCode**, not inside `settings.json`:
211
+
212
+ - `KNIGHTCODE_DISABLE_AUTO_UPDATE=1` disables automatic downloads even when
213
+ `autoUpdate` is `true`. Unset the variable to let the setting control downloads
214
+ again. The updater treats any non-empty value as disabling, including `0`.
215
+ - `KNIGHTCODE_SKIP_VERSION_CHECK=1` disables both automatic checks and downloads.
216
+
217
+ Neither variable blocks explicit `knightcode update`. Offline, print, JSON, and
218
+ RPC sessions never start background updates. See [Command Line](cli.md#update-knightcode-or-packages)
219
+ for update behavior and [Environment Variables](environment-variables.md#update-controls)
220
+ for shell examples.
@@ -0,0 +1,93 @@
1
+ # Configure shell commands
2
+
3
+ KnightCode starts a separate non-interactive shell process for each Bash command. Non-interactive Bash does not expand aliases by default and usually does not load the same startup files as an interactive terminal.
4
+
5
+ Use `shellPath` to choose the Bash executable and `shellCommandPrefix` to run setup before each command.
6
+
7
+ ## Understand which shell KnightCode uses
8
+
9
+ | Command source | Shell |
10
+ |---|---|
11
+ | Model calls the built-in `bash` tool | KnightCode's resolved Bash executable |
12
+ | You enter `!command` or `!!command` | The same resolved Bash executable |
13
+ | Model calls the optional `powershell` tool | PowerShell 7 (`pwsh.exe`) or Windows PowerShell |
14
+ | An extension provides or replaces a shell tool | The operations implemented by that extension |
15
+
16
+ KnightCode normally invokes Bash with `bash -c`. On Unix systems, it uses `/bin/bash`, then `bash` on `PATH`, and finally `sh` when Bash is unavailable. Native Windows first checks the configured path, then Git Bash, then `bash.exe` on `PATH`.
17
+
18
+ ## Choose a Bash executable
19
+
20
+ Set `shellPath` in `~/.knightcode/agent/settings.json` when KnightCode should use a specific executable:
21
+
22
+ ```json
23
+ {
24
+ "shellPath": "~/.local/bin/bash"
25
+ }
26
+ ```
27
+
28
+ On Windows, use forward slashes or escape backslashes:
29
+
30
+ ```json
31
+ {
32
+ "shellPath": "C:\\cygwin64\\bin\\bash.exe"
33
+ }
34
+ ```
35
+
36
+ Run `/reload` after changing the setting. See [Run KnightCode on Windows](windows.md) for the native Windows defaults.
37
+
38
+ ## Run setup before every Bash command
39
+
40
+ Set `shellCommandPrefix` to prepend shell setup to both the built-in `bash` tool and user-entered `!` or `!!` commands:
41
+
42
+ ```json
43
+ {
44
+ "shellCommandPrefix": "export CI=1"
45
+ }
46
+ ```
47
+
48
+ KnightCode joins the prefix and requested command with a newline. The prefix runs again for every command, so keep it fast and free of interactive prompts.
49
+
50
+ ## Enable Bash aliases
51
+
52
+ Store aliases needed by KnightCode in a Bash-compatible file instead of parsing an entire interactive shell configuration.
53
+
54
+ Create `~/.bash_aliases`:
55
+
56
+ ```bash
57
+ alias ll='ls -la'
58
+ alias gs='git status --short'
59
+ ```
60
+
61
+ Then configure KnightCode to enable alias expansion and load the file:
62
+
63
+ ```json
64
+ {
65
+ "shellCommandPrefix": "shopt -s expand_aliases\nsource ~/.bash_aliases"
66
+ }
67
+ ```
68
+
69
+ Run `/reload`, then verify the alias through KnightCode:
70
+
71
+ ```text
72
+ !ll
73
+ ```
74
+
75
+ The command should produce the same listing as `ls -la`.
76
+
77
+ Aliases must use Bash-compatible syntax. Do not source an arbitrary `.zshrc` into Bash because zsh options, functions, and plugins may not parse or behave correctly there.
78
+
79
+ ## Troubleshooting
80
+
81
+ ### The prefix works for `!` but not for an extension tool
82
+
83
+ `shellCommandPrefix` configures KnightCode's built-in Bash execution. An extension that replaces the `bash` tool or provides its own shell operations controls its own setup. Check that extension's documentation.
84
+
85
+ ### `shopt` is not found
86
+
87
+ KnightCode has fallen back to `sh` or `shellPath` points to a non-Bash shell. Install Bash or set `shellPath` to a Bash executable before using Bash-specific setup such as `shopt`.
88
+
89
+ ### A setup command waits for input
90
+
91
+ Remove interactive commands from `shellCommandPrefix`. The prefix runs in a non-interactive process before every Bash command.
92
+
93
+ For the complete setting definitions, see [Shell settings](settings.md#shell).
package/docs/skills.md ADDED
@@ -0,0 +1,93 @@
1
+ # Skills
2
+
3
+ Skills give KnightCode specialized instructions and supporting files for a particular kind of work. KnightCode advertises each available skill by name and description, then loads its full instructions only when the task calls for them.
4
+
5
+ Use a skill when a workflow needs more context than a prompt template but does not need a new executable integration point. Skills can bundle scripts, references, and assets alongside their instructions.
6
+
7
+ KnightCode implements the [Agent Skills specification](https://agentskills.io/specification). Most invalid fields produce warnings rather than stopping startup.
8
+
9
+ ## Create a skill
10
+
11
+ A skill is a directory containing `SKILL.md`:
12
+
13
+ ```text
14
+ pdf-tools/
15
+ ├── SKILL.md
16
+ ├── scripts/
17
+ │ └── extract.sh
18
+ ├── references/
19
+ │ └── formats.md
20
+ └── assets/
21
+ └── template.json
22
+ ```
23
+
24
+ Start `SKILL.md` with frontmatter followed by direct instructions:
25
+
26
+ ```markdown
27
+ ---
28
+ name: pdf-tools
29
+ description: Extract text and tables from PDF files. Use when reading, converting, or inspecting PDFs.
30
+ ---
31
+
32
+ # PDF tools
33
+
34
+ Read `references/formats.md` before converting a document. Run scripts relative to this skill directory.
35
+ ```
36
+
37
+ The description determines when the model considers loading the skill. State both what the skill does and when it applies. Avoid descriptions such as “Helps with PDFs,” which do not provide enough routing information.
38
+
39
+ Use relative paths from the skill directory when referring to bundled files. KnightCode tells the model where the skill lives so it can resolve those paths.
40
+
41
+ ## Understand how skills load
42
+
43
+ At startup, KnightCode scans configured skill locations and adds each skill’s name, description, and path to the system prompt. It does not add the full instructions.
44
+
45
+ When a task matches, the model reads `SKILL.md` and follows its instructions. This keeps detailed guidance out of context until it is needed. A model might fail to load a relevant skill, so use `/skill:name` when you need to force it.
46
+
47
+ Arguments after `/skill:name` are appended to the loaded instructions as a user request:
48
+
49
+ ```text
50
+ /skill:pdf-tools extract report.pdf
51
+ ```
52
+
53
+ Set `disable-model-invocation: true` in frontmatter when a skill should be available only through its explicit command. The `enableSkillCommands` [setting](settings.md) controls whether skill commands appear in interactive command discovery; manually entered `/skill:name` commands still work.
54
+
55
+ <a id="choose-where-it-loads"></a>
56
+
57
+ ## Add it to KnightCode
58
+
59
+ Place the skill in your user or project skills directory. Directories containing `SKILL.md` are discovered recursively.
60
+
61
+ KnightCode also supports the Agent Skills locations `~/.agents/skills/` and `.agents/skills/`. Project `.agents/skills/` directories are discovered from the working directory through its ancestors, stopping at the repository root when one exists.
62
+
63
+ KnightCode accepts some standalone Markdown skills, but a directory containing `SKILL.md` is the portable form and should be preferred. See [Settings](settings.md#resources) and [KnightCode Packages](packages.md) for additional locations.
64
+
65
+ Project skills can instruct the model to run scripts or modify files. Review unfamiliar skills and their supporting files before granting project trust.
66
+
67
+ ## Write portable frontmatter
68
+
69
+ The Agent Skills specification defines these fields:
70
+
71
+ | Field | Purpose |
72
+ |---|---|
73
+ | `name` | Command and display name |
74
+ | `description` | Routing description shown to the model |
75
+ | `license` | License name or bundled license file |
76
+ | `compatibility` | Environment requirements |
77
+ | `metadata` | Additional key-value metadata |
78
+ | `allowed-tools` | Experimental pre-approved tool list |
79
+ | `disable-model-invocation` | Hide the skill from automatic model selection |
80
+
81
+ Names use lowercase letters, numbers, and hyphens, with no leading, trailing, or consecutive hyphens. They can contain at most 64 characters; descriptions can contain at most 1024.
82
+
83
+ KnightCode neither requires nor warns when the declared name differs from the parent directory. Other Agent Skills implementations may enforce that requirement, so matching names remain the portable choice.
84
+
85
+ Malformed `SKILL.md` files and declared skills without descriptions are not loaded. Name collisions keep the first discovered skill and produce a warning.
86
+
87
+ ## Validate and share a skill
88
+
89
+ Run KnightCode from a location where the skill is discoverable, then inspect the startup diagnostics and `/skill:name` command. Run `/reload` after editing a skill during an active session.
90
+
91
+ Use a [KnightCode package](packages.md) to distribute one or more skills through npm or git. Keep environment setup inside the skill and declare any required runtime dependencies in the package.
92
+
93
+ For examples, see the [Anthropic skills collection](https://github.com/anthropics/skills).
@@ -0,0 +1,78 @@
1
+ # Slash commands
2
+
3
+ Type `/` in KnightCode's terminal editor to search the commands available in the current session. This page lists the built-in commands in the current KnightCode release.
4
+
5
+ Extensions, prompt templates, and skills can add commands. The command menu in KnightCode is therefore the exact reference for the resources loaded in your session.
6
+
7
+ ## Models and settings
8
+
9
+ | Command | Description |
10
+ |---|---|
11
+ | `/settings` | Open settings |
12
+ | `/model [provider/model]` | Select a model |
13
+ | `/thinking [level]` | Set the thinking level |
14
+ | `/scoped-models` | Configure the models used by interactive cycling |
15
+ | `/login [provider]` | Add provider authentication |
16
+ | `/logout` | Remove provider authentication |
17
+ | `/usage` | Show remaining subscription allowance and reset times for Claude, Codex and Grok sign-ins; see [Subscription usage](providers.md#check-subscription-usage) |
18
+ | `/tools` | Turn `webfetch`, `websearch`, [`ask_user`](usage.md#questions), the [scratchpad](usage.md#scratchpad), and the [classifier gate](usage.md#classifier-gate) off, on for this session, or on by default; pick the search provider, its key, and the gate's model |
19
+ | `/llama` | Manage models on the configured llama.cpp router |
20
+
21
+ ## Sessions and context
22
+
23
+ | Command | Description |
24
+ |---|---|
25
+ | `/new` | Start a new session |
26
+ | `/resume` | Switch to another saved session |
27
+ | `/name [name]` | Set the session display name, or show the current name when omitted |
28
+ | `/session` | Show current session information and statistics |
29
+ | `/tree` | Navigate the session tree |
30
+ | `/fork` | Create a new session from an earlier user message |
31
+ | `/clone` | Duplicate the current session at its current position |
32
+ | `/undo` | Go back to an earlier user message; optionally restore the files edited after it |
33
+ | `/compact [instructions]` | Compact the current context, optionally with custom instructions |
34
+ | `/import <path>` | Import and resume a JSONL session |
35
+
36
+ ## Planning
37
+
38
+ | Command | Description |
39
+ |---|---|
40
+ | `/plan [task]` | Enter enforced planning, send a planning task, or review an existing draft |
41
+ | `/plan off` | Exit planning and retain the draft |
42
+ | `/plan approve [N [note]]` | Explicitly approve and implement the latest revision, or revision N, with an optional note |
43
+ | `/plan approve fresh [N [note]]` | Implement in a fresh session |
44
+
45
+ Commands require an idle session with no pending input. Without a draft,
46
+ `/plan` reports “No plan submitted yet; send a task to continue planning.” and
47
+ opens no dialog. See [Plan mode](plan-mode.md) for tool restrictions, headless
48
+ output, and restoration.
49
+
50
+ ## Export and share
51
+
52
+ | Command | Description |
53
+ |---|---|
54
+ | `/copy` | Copy the last assistant message |
55
+ | `/export [path]` | Export the session as HTML or JSONL |
56
+ | `/share` | Upload the session and return a viewer link |
57
+ | `/remote` | Publish this session to a live web link; see [Remote sessions](remote.md) |
58
+ | `/bug [description]` | Prepare a private bug report for the KnightCode developers |
59
+
60
+ Review a session before exporting or sharing it. Sessions can contain prompts, tool arguments, command output, file contents, and credentials exposed during the conversation.
61
+
62
+ ## Runtime and project
63
+
64
+ | Command | Description |
65
+ |---|---|
66
+ | `/trust` | Save a project trust decision for future KnightCode processes |
67
+ | `/reload` | Reload keybindings, extensions, skills, templates, themes, and context files |
68
+ | `/hotkeys` | Show active keyboard shortcuts |
69
+ | `/changelog` | Show changelog entries |
70
+ | `/quit` | Quit KnightCode |
71
+
72
+ ## Commands added by resources
73
+
74
+ - Extensions can register commands with their own arguments and completion behavior.
75
+ - Each prompt template is available under its template name.
76
+ - Skills are available as `/skill:name` when skill commands are enabled.
77
+
78
+ Use `/reload` after adding or changing a discovered command resource. See [Extensions](extensions.md), [Prompt Templates](prompt-templates.md), and [Skills](skills.md) for their loading and naming rules.