@neocode-ai/web 1.1.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 (86) hide show
  1. package/README.md +54 -0
  2. package/astro.config.mjs +145 -0
  3. package/config.mjs +14 -0
  4. package/package.json +41 -0
  5. package/public/robots.txt +6 -0
  6. package/public/theme.json +183 -0
  7. package/src/assets/lander/check.svg +2 -0
  8. package/src/assets/lander/copy.svg +2 -0
  9. package/src/assets/lander/screenshot-github.png +0 -0
  10. package/src/assets/lander/screenshot-splash.png +0 -0
  11. package/src/assets/lander/screenshot-vscode.png +0 -0
  12. package/src/assets/lander/screenshot.png +0 -0
  13. package/src/assets/logo-dark.svg +20 -0
  14. package/src/assets/logo-light.svg +20 -0
  15. package/src/assets/logo-ornate-dark.svg +18 -0
  16. package/src/assets/logo-ornate-light.svg +18 -0
  17. package/src/assets/web/web-homepage-active-session.png +0 -0
  18. package/src/assets/web/web-homepage-new-session.png +0 -0
  19. package/src/assets/web/web-homepage-see-servers.png +0 -0
  20. package/src/components/Head.astro +50 -0
  21. package/src/components/Header.astro +128 -0
  22. package/src/components/Hero.astro +11 -0
  23. package/src/components/Lander.astro +713 -0
  24. package/src/components/Share.tsx +634 -0
  25. package/src/components/SiteTitle.astro +59 -0
  26. package/src/components/icons/custom.tsx +87 -0
  27. package/src/components/icons/index.tsx +4454 -0
  28. package/src/components/share/common.tsx +77 -0
  29. package/src/components/share/content-bash.module.css +85 -0
  30. package/src/components/share/content-bash.tsx +67 -0
  31. package/src/components/share/content-code.module.css +26 -0
  32. package/src/components/share/content-code.tsx +32 -0
  33. package/src/components/share/content-diff.module.css +153 -0
  34. package/src/components/share/content-diff.tsx +231 -0
  35. package/src/components/share/content-error.module.css +64 -0
  36. package/src/components/share/content-error.tsx +24 -0
  37. package/src/components/share/content-markdown.module.css +154 -0
  38. package/src/components/share/content-markdown.tsx +75 -0
  39. package/src/components/share/content-text.module.css +63 -0
  40. package/src/components/share/content-text.tsx +37 -0
  41. package/src/components/share/copy-button.module.css +30 -0
  42. package/src/components/share/copy-button.tsx +28 -0
  43. package/src/components/share/part.module.css +428 -0
  44. package/src/components/share/part.tsx +780 -0
  45. package/src/components/share.module.css +832 -0
  46. package/src/content/docs/1-0.mdx +67 -0
  47. package/src/content/docs/acp.mdx +156 -0
  48. package/src/content/docs/agents.mdx +720 -0
  49. package/src/content/docs/cli.mdx +597 -0
  50. package/src/content/docs/commands.mdx +323 -0
  51. package/src/content/docs/config.mdx +683 -0
  52. package/src/content/docs/custom-tools.mdx +170 -0
  53. package/src/content/docs/ecosystem.mdx +76 -0
  54. package/src/content/docs/enterprise.mdx +170 -0
  55. package/src/content/docs/formatters.mdx +130 -0
  56. package/src/content/docs/github.mdx +321 -0
  57. package/src/content/docs/gitlab.mdx +195 -0
  58. package/src/content/docs/ide.mdx +48 -0
  59. package/src/content/docs/index.mdx +359 -0
  60. package/src/content/docs/keybinds.mdx +191 -0
  61. package/src/content/docs/lsp.mdx +188 -0
  62. package/src/content/docs/mcp-servers.mdx +511 -0
  63. package/src/content/docs/models.mdx +223 -0
  64. package/src/content/docs/modes.mdx +331 -0
  65. package/src/content/docs/network.mdx +57 -0
  66. package/src/content/docs/permissions.mdx +237 -0
  67. package/src/content/docs/plugins.mdx +362 -0
  68. package/src/content/docs/providers.mdx +1889 -0
  69. package/src/content/docs/rules.mdx +180 -0
  70. package/src/content/docs/sdk.mdx +391 -0
  71. package/src/content/docs/server.mdx +286 -0
  72. package/src/content/docs/share.mdx +128 -0
  73. package/src/content/docs/skills.mdx +220 -0
  74. package/src/content/docs/themes.mdx +369 -0
  75. package/src/content/docs/tools.mdx +345 -0
  76. package/src/content/docs/troubleshooting.mdx +300 -0
  77. package/src/content/docs/tui.mdx +390 -0
  78. package/src/content/docs/web.mdx +136 -0
  79. package/src/content/docs/windows-wsl.mdx +113 -0
  80. package/src/content/docs/zen.mdx +251 -0
  81. package/src/content.config.ts +7 -0
  82. package/src/pages/[...slug].md.ts +18 -0
  83. package/src/pages/s/[id].astro +113 -0
  84. package/src/styles/custom.css +405 -0
  85. package/src/types/lang-map.d.ts +27 -0
  86. package/tsconfig.json +9 -0
@@ -0,0 +1,323 @@
1
+ ---
2
+ title: Commands
3
+ description: Create custom commands for repetitive tasks.
4
+ ---
5
+
6
+ Custom commands let you specify a prompt you want to run when that command is executed in the TUI.
7
+
8
+ ```bash frame="none"
9
+ /my-command
10
+ ```
11
+
12
+ Custom commands are in addition to the built-in commands like `/init`, `/undo`, `/redo`, `/share`, `/help`. [Learn more](/docs/tui#commands).
13
+
14
+ ---
15
+
16
+ ## Create command files
17
+
18
+ Create markdown files in the `commands/` directory to define custom commands.
19
+
20
+ Create `.neocode/commands/test.md`:
21
+
22
+ ```md title=".neocode/commands/test.md"
23
+ ---
24
+ description: Run tests with coverage
25
+ agent: build
26
+ model: anthropic/claude-3-5-sonnet-20241022
27
+ ---
28
+
29
+ Run the full test suite with coverage report and show any failures.
30
+ Focus on the failing tests and suggest fixes.
31
+ ```
32
+
33
+ The frontmatter defines command properties. The content becomes the template.
34
+
35
+ Use the command by typing `/` followed by the command name.
36
+
37
+ ```bash frame="none"
38
+ "/test"
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Configure
44
+
45
+ You can add custom commands through the NeoCode config or by creating markdown files in the `commands/` directory.
46
+
47
+ ---
48
+
49
+ ### JSON
50
+
51
+ Use the `command` option in your NeoCode [config](/docs/config):
52
+
53
+ ```json title="neocode.jsonc" {4-12}
54
+ {
55
+ "$schema": "https://neo.khulnasoft.com/config.json",
56
+ "command": {
57
+ // This becomes the name of the command
58
+ "test": {
59
+ // This is the prompt that will be sent to the LLM
60
+ "template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes.",
61
+ // This is shown as the description in the TUI
62
+ "description": "Run tests with coverage",
63
+ "agent": "build",
64
+ "model": "anthropic/claude-3-5-sonnet-20241022"
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ Now you can run this command in the TUI:
71
+
72
+ ```bash frame="none"
73
+ /test
74
+ ```
75
+
76
+ ---
77
+
78
+ ### Markdown
79
+
80
+ You can also define commands using markdown files. Place them in:
81
+
82
+ - Global: `~/.config/neocode/commands/`
83
+ - Per-project: `.neocode/commands/`
84
+
85
+ ```markdown title="~/.config/neocode/commands/test.md"
86
+ ---
87
+ description: Run tests with coverage
88
+ agent: build
89
+ model: anthropic/claude-3-5-sonnet-20241022
90
+ ---
91
+
92
+ Run the full test suite with coverage report and show any failures.
93
+ Focus on the failing tests and suggest fixes.
94
+ ```
95
+
96
+ The markdown file name becomes the command name. For example, `test.md` lets
97
+ you run:
98
+
99
+ ```bash frame="none"
100
+ /test
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Prompt config
106
+
107
+ The prompts for the custom commands support several special placeholders and syntax.
108
+
109
+ ---
110
+
111
+ ### Arguments
112
+
113
+ Pass arguments to commands using the `$ARGUMENTS` placeholder.
114
+
115
+ ```md title=".neocode/commands/component.md"
116
+ ---
117
+ description: Create a new component
118
+ ---
119
+
120
+ Create a new React component named $ARGUMENTS with TypeScript support.
121
+ Include proper typing and basic structure.
122
+ ```
123
+
124
+ Run the command with arguments:
125
+
126
+ ```bash frame="none"
127
+ /component Button
128
+ ```
129
+
130
+ And `$ARGUMENTS` will be replaced with `Button`.
131
+
132
+ You can also access individual arguments using positional parameters:
133
+
134
+ - `$1` - First argument
135
+ - `$2` - Second argument
136
+ - `$3` - Third argument
137
+ - And so on...
138
+
139
+ For example:
140
+
141
+ ```md title=".neocode/commands/create-file.md"
142
+ ---
143
+ description: Create a new file with content
144
+ ---
145
+
146
+ Create a file named $1 in the directory $2
147
+ with the following content: $3
148
+ ```
149
+
150
+ Run the command:
151
+
152
+ ```bash frame="none"
153
+ /create-file config.json src "{ \"key\": \"value\" }"
154
+ ```
155
+
156
+ This replaces:
157
+
158
+ - `$1` with `config.json`
159
+ - `$2` with `src`
160
+ - `$3` with `{ "key": "value" }`
161
+
162
+ ---
163
+
164
+ ### Shell output
165
+
166
+ Use _!`command`_ to inject [bash command](/docs/tui#bash-commands) output into your prompt.
167
+
168
+ For example, to create a custom command that analyzes test coverage:
169
+
170
+ ```md title=".neocode/commands/analyze-coverage.md"
171
+ ---
172
+ description: Analyze test coverage
173
+ ---
174
+
175
+ Here are the current test results:
176
+ !`npm test`
177
+
178
+ Based on these results, suggest improvements to increase coverage.
179
+ ```
180
+
181
+ Or to review recent changes:
182
+
183
+ ```md title=".neocode/commands/review-changes.md"
184
+ ---
185
+ description: Review recent changes
186
+ ---
187
+
188
+ Recent git commits:
189
+ !`git log --oneline -10`
190
+
191
+ Review these changes and suggest any improvements.
192
+ ```
193
+
194
+ Commands run in your project's root directory and their output becomes part of the prompt.
195
+
196
+ ---
197
+
198
+ ### File references
199
+
200
+ Include files in your command using `@` followed by the filename.
201
+
202
+ ```md title=".neocode/commands/review-component.md"
203
+ ---
204
+ description: Review component
205
+ ---
206
+
207
+ Review the component in @src/components/Button.tsx.
208
+ Check for performance issues and suggest improvements.
209
+ ```
210
+
211
+ The file content gets included in the prompt automatically.
212
+
213
+ ---
214
+
215
+ ## Options
216
+
217
+ Let's look at the configuration options in detail.
218
+
219
+ ---
220
+
221
+ ### Template
222
+
223
+ The `template` option defines the prompt that will be sent to the LLM when the command is executed.
224
+
225
+ ```json title="neocode.json"
226
+ {
227
+ "command": {
228
+ "test": {
229
+ "template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes."
230
+ }
231
+ }
232
+ }
233
+ ```
234
+
235
+ This is a **required** config option.
236
+
237
+ ---
238
+
239
+ ### Description
240
+
241
+ Use the `description` option to provide a brief description of what the command does.
242
+
243
+ ```json title="neocode.json"
244
+ {
245
+ "command": {
246
+ "test": {
247
+ "description": "Run tests with coverage"
248
+ }
249
+ }
250
+ }
251
+ ```
252
+
253
+ This is shown as the description in the TUI when you type in the command.
254
+
255
+ ---
256
+
257
+ ### Agent
258
+
259
+ Use the `agent` config to optionally specify which [agent](/docs/agents) should execute this command.
260
+ If this is a [subagent](/docs/agents/#subagents) the command will trigger a subagent invocation by default.
261
+ To disable this behavior, set `subtask` to `false`.
262
+
263
+ ```json title="neocode.json"
264
+ {
265
+ "command": {
266
+ "review": {
267
+ "agent": "plan"
268
+ }
269
+ }
270
+ }
271
+ ```
272
+
273
+ This is an **optional** config option. If not specified, defaults to your current agent.
274
+
275
+ ---
276
+
277
+ ### Subtask
278
+
279
+ Use the `subtask` boolean to force the command to trigger a [subagent](/docs/agents/#subagents) invocation.
280
+ This is useful if you want the command to not pollute your primary context and will **force** the agent to act as a subagent,
281
+ even if `mode` is set to `primary` on the [agent](/docs/agents) configuration.
282
+
283
+ ```json title="neocode.json"
284
+ {
285
+ "command": {
286
+ "analyze": {
287
+ "subtask": true
288
+ }
289
+ }
290
+ }
291
+ ```
292
+
293
+ This is an **optional** config option.
294
+
295
+ ---
296
+
297
+ ### Model
298
+
299
+ Use the `model` config to override the default model for this command.
300
+
301
+ ```json title="neocode.json"
302
+ {
303
+ "command": {
304
+ "analyze": {
305
+ "model": "anthropic/claude-3-5-sonnet-20241022"
306
+ }
307
+ }
308
+ }
309
+ ```
310
+
311
+ This is an **optional** config option.
312
+
313
+ ---
314
+
315
+ ## Built-in
316
+
317
+ neocode includes several built-in commands like `/init`, `/undo`, `/redo`, `/share`, `/help`; [learn more](/docs/tui#commands).
318
+
319
+ :::note
320
+ Custom commands can override built-in commands.
321
+ :::
322
+
323
+ If you define a custom command with the same name, it will override the built-in command.