@knightcodeai/cli-win32-x64 0.4.1 → 0.5.0

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 (48) hide show
  1. package/bin/CHANGELOG.md +178 -0
  2. package/bin/README.md +36 -0
  3. package/bin/docs/compaction.md +416 -0
  4. package/bin/docs/containerization.md +111 -0
  5. package/bin/docs/custom-provider.md +777 -0
  6. package/bin/docs/development.md +71 -0
  7. package/bin/docs/docs.json +156 -0
  8. package/bin/docs/environment-variables.md +97 -0
  9. package/bin/docs/extensions.md +3020 -0
  10. package/bin/docs/images/doom-extension.png +0 -0
  11. package/bin/docs/images/interactive-mode.png +0 -0
  12. package/bin/docs/images/tree-view.png +0 -0
  13. package/bin/docs/index.md +84 -0
  14. package/bin/docs/json.md +98 -0
  15. package/bin/docs/keybindings.md +236 -0
  16. package/bin/docs/llama-cpp.md +101 -0
  17. package/bin/docs/models.md +571 -0
  18. package/bin/docs/packages.md +228 -0
  19. package/bin/docs/prompt-templates.md +96 -0
  20. package/bin/docs/providers.md +317 -0
  21. package/bin/docs/quickstart.md +167 -0
  22. package/bin/docs/rpc.md +1618 -0
  23. package/bin/docs/sdk.md +1219 -0
  24. package/bin/docs/security.md +59 -0
  25. package/bin/docs/session-format.md +438 -0
  26. package/bin/docs/sessions.md +145 -0
  27. package/bin/docs/settings.md +368 -0
  28. package/bin/docs/shell-aliases.md +13 -0
  29. package/bin/docs/skills.md +231 -0
  30. package/bin/docs/terminal-setup.md +177 -0
  31. package/bin/docs/termux.md +127 -0
  32. package/bin/docs/themes.md +320 -0
  33. package/bin/docs/tmux.md +63 -0
  34. package/bin/docs/tui.md +942 -0
  35. package/bin/docs/usage.md +307 -0
  36. package/bin/docs/windows.md +39 -0
  37. package/bin/export-html/template.css +1066 -0
  38. package/bin/export-html/template.html +55 -0
  39. package/bin/export-html/template.js +1864 -0
  40. package/bin/export-html/vendor/highlight.min.js +1213 -0
  41. package/bin/export-html/vendor/marked.min.js +78 -0
  42. package/bin/knightcode.exe +0 -0
  43. package/bin/package.json +76 -0
  44. package/bin/photon_rs_bg.wasm +0 -0
  45. package/bin/theme/dark.json +90 -0
  46. package/bin/theme/light.json +89 -0
  47. package/bin/theme/theme-schema.json +352 -0
  48. package/package.json +7 -1
@@ -0,0 +1,167 @@
1
+ # Quickstart
2
+
3
+ This page gets you from install to a useful first knightcode session.
4
+
5
+ ## Install
6
+
7
+ KnightCode is distributed as an npm package:
8
+
9
+ ```bash
10
+ npm install -g --ignore-scripts @knightcodeai/cli
11
+ ```
12
+
13
+ `--ignore-scripts` disables dependency lifecycle scripts during install. KnightCode does not require install scripts for normal npm installs.
14
+
15
+ ### Uninstall
16
+
17
+ Use the package manager that installed knightcode. The curl installer uses npm globally, so curl and npm installs are removed with npm:
18
+
19
+ ```bash
20
+ # curl installer or npm install -g
21
+ npm uninstall -g @knightcodeai/cli
22
+
23
+ # pnpm
24
+ pnpm remove -g @knightcodeai/cli
25
+
26
+ # Yarn
27
+ yarn global remove @knightcodeai/cli
28
+
29
+ # Bun
30
+ bun uninstall -g @knightcodeai/cli
31
+ ```
32
+
33
+ Uninstalling knightcode leaves settings, credentials, sessions, and installed knightcode packages in `~/.knightcode/agent/`.
34
+
35
+ Then start knightcode in the project directory you want it to work on:
36
+
37
+ ```bash
38
+ cd /path/to/project
39
+ knightcode
40
+ ```
41
+
42
+ ## Authenticate
43
+
44
+ KnightCode can use subscription providers through `/login`, or API-key providers through environment variables or the auth file.
45
+
46
+ ### Option 1: subscription login
47
+
48
+ Start knightcode and run:
49
+
50
+ ```text
51
+ /login
52
+ ```
53
+
54
+ Then select a provider. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), and GitHub Copilot.
55
+
56
+ ### Option 2: API key
57
+
58
+ Set an API key before launching knightcode:
59
+
60
+ ```bash
61
+ export ANTHROPIC_API_KEY=sk-ant-...
62
+ knightcode
63
+ ```
64
+
65
+ You can also run `/login` and select an API-key provider to store the key in `~/.knightcode/agent/auth.json`.
66
+
67
+ See [Providers](providers.md) for all supported providers, environment variables, and cloud-provider setup.
68
+
69
+ ## First session
70
+
71
+ Once knightcode starts, type a request and press Enter:
72
+
73
+ ```text
74
+ Summarize this repository and tell me how to run its checks.
75
+ ```
76
+
77
+ By default, knightcode gives the model four tools:
78
+
79
+ - `read` - read files
80
+ - `write` - create or overwrite files
81
+ - `edit` - patch files
82
+ - `bash` - run shell commands
83
+
84
+ Additional built-in read-only tools (`grep`, `find`, `ls`) are available through tool options. KnightCode runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
85
+
86
+ ## Give knightcode project instructions
87
+
88
+ KnightCode loads context files at startup. Add an `AGENTS.md` file to tell it how to work in a project:
89
+
90
+ ```markdown
91
+ # Project Instructions
92
+
93
+ - Run `npm run check` after code changes.
94
+ - Do not run production migrations locally.
95
+ - Keep responses concise.
96
+ ```
97
+
98
+ KnightCode loads:
99
+
100
+ - `~/.knightcode/agent/AGENTS.md` for global instructions
101
+ - `AGENTS.md` or `CLAUDE.md` from parent directories and the current directory
102
+
103
+ If a directory contains `AGENTS.override.md`, KnightCode loads it instead of `AGENTS.md` or `CLAUDE.md` from that directory.
104
+
105
+ Restart knightcode, or run `/reload`, after changing context files.
106
+
107
+ ## Common things to try
108
+
109
+ ### Reference files
110
+
111
+ Type `@` in the editor to fuzzy-search files, or pass files on the command line:
112
+
113
+ ```bash
114
+ knightcode @README.md "Summarize this"
115
+ knightcode @src/app.ts @src/app.test.ts "Review these together"
116
+ ```
117
+
118
+ Images or text can be pasted with Ctrl+V (Alt+V on Windows); images can also be dragged into supported terminals.
119
+
120
+ ### Run shell commands
121
+
122
+ In interactive mode:
123
+
124
+ ```text
125
+ !npm run lint
126
+ ```
127
+
128
+ The command output is sent to the model. Use `!!command` to run a command without adding its output to the model context.
129
+
130
+ ### Switch models
131
+
132
+ Use `/model` or Ctrl+L to choose a model for the current session. Press Ctrl+S in the model picker to save the highlighted model as the startup default. Use `/thinking` to choose a thinking level for the current session, or Ctrl+S in that picker to save the startup default thinking level. Use Shift+Tab to cycle thinking level. Use Ctrl+P / Shift+Ctrl+P to cycle through scoped models.
133
+
134
+ ### Continue later
135
+
136
+ Sessions are saved automatically:
137
+
138
+ ```bash
139
+ knightcode -c # Continue most recent session
140
+ knightcode -r # Browse previous sessions
141
+ knightcode --name "my task" # Set session display name at startup
142
+ knightcode --session <path|id> # Open a specific session
143
+ ```
144
+
145
+ Inside knightcode, use `/resume`, `/new`, `/tree`, `/fork`, and `/clone` to manage sessions.
146
+
147
+ ### Non-interactive mode
148
+
149
+ For one-shot prompts:
150
+
151
+ ```bash
152
+ knightcode -p "Summarize this codebase"
153
+ cat README.md | knightcode -p "Summarize this text"
154
+ knightcode -p @screenshot.png "What's in this image?"
155
+ ```
156
+
157
+ Use `--mode json` for JSON event output or `--mode rpc` for process integration.
158
+
159
+ ## Next steps
160
+
161
+ - [Using KnightCode](usage.md) - interactive mode, slash commands, sessions, context files, and CLI reference.
162
+ - [Providers](providers.md) - authentication and model setup.
163
+ - [Settings](settings.md) - global and project configuration.
164
+ - [Keybindings](keybindings.md) - shortcuts and customization.
165
+ - [KnightCode Packages](packages.md) - install shared extensions, skills, prompts, and themes.
166
+
167
+ Platform notes: [Windows](windows.md), [Termux](termux.md), [tmux](tmux.md), [Terminal setup](terminal-setup.md), [Shell aliases](shell-aliases.md).