codetyper-cli 0.1.78 → 0.2.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.
- package/README.md +107 -0
- package/dist/index.js +3423 -640
- package/package.json +1 -1
- package/src/version.json +1 -1
package/README.md
CHANGED
|
@@ -90,6 +90,28 @@ Full-screen terminal interface with real-time streaming responses.
|
|
|
90
90
|
- `Shift+Up/Down` - Scroll log panel
|
|
91
91
|
- `Ctrl+C` (twice) - Exit
|
|
92
92
|
|
|
93
|
+
### Vim Motions
|
|
94
|
+
|
|
95
|
+
Optional vim-style keyboard navigation for power users. Enable in settings.
|
|
96
|
+
|
|
97
|
+
**Normal Mode:**
|
|
98
|
+
- `j/k` - Scroll down/up
|
|
99
|
+
- `gg/G` - Jump to top/bottom
|
|
100
|
+
- `Ctrl+d/u` - Half page scroll
|
|
101
|
+
- `/` - Search, `n/N` - Next/prev match
|
|
102
|
+
- `i` - Enter insert mode
|
|
103
|
+
- `:` - Command mode (`:q` quit, `:w` save)
|
|
104
|
+
|
|
105
|
+
**Configuration:**
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"vim": {
|
|
109
|
+
"enabled": true,
|
|
110
|
+
"startInNormalMode": true
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
93
115
|
### Command Menu
|
|
94
116
|
|
|
95
117
|
Press `/` to access all commands organized by category.
|
|
@@ -250,6 +272,10 @@ CodeTyper has access to these built-in tools:
|
|
|
250
272
|
| `read` | Read file contents |
|
|
251
273
|
| `write` | Create or overwrite files |
|
|
252
274
|
| `edit` | Find and replace in files |
|
|
275
|
+
| `glob` | Find files by pattern |
|
|
276
|
+
| `grep` | Search file contents |
|
|
277
|
+
| `lsp` | Language Server Protocol operations |
|
|
278
|
+
| `web_search` | Search the web |
|
|
253
279
|
| `todo-read` | Read current todo list |
|
|
254
280
|
| `todo-write` | Update todo list |
|
|
255
281
|
|
|
@@ -263,6 +289,87 @@ Connect external MCP (Model Context Protocol) servers for extended capabilities:
|
|
|
263
289
|
# Then add a new server
|
|
264
290
|
```
|
|
265
291
|
|
|
292
|
+
## Extensibility
|
|
293
|
+
|
|
294
|
+
### Hooks System
|
|
295
|
+
|
|
296
|
+
Lifecycle hooks for intercepting tool execution and session events.
|
|
297
|
+
|
|
298
|
+
**Hook Events:**
|
|
299
|
+
- `PreToolUse` - Validate/modify before tool execution
|
|
300
|
+
- `PostToolUse` - Side effects after tool execution
|
|
301
|
+
- `SessionStart` - At session initialization
|
|
302
|
+
- `SessionEnd` - At session termination
|
|
303
|
+
- `UserPromptSubmit` - When user submits input
|
|
304
|
+
- `Stop` - When execution stops
|
|
305
|
+
|
|
306
|
+
**Configuration** (`.codetyper/hooks.json`):
|
|
307
|
+
```json
|
|
308
|
+
{
|
|
309
|
+
"hooks": [
|
|
310
|
+
{ "event": "PreToolUse", "script": ".codetyper/hooks/validate.sh", "timeout": 5000 },
|
|
311
|
+
{ "event": "PostToolUse", "script": ".codetyper/hooks/notify.sh" }
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Exit Codes:**
|
|
317
|
+
- `0` - Allow (optionally output `{"updatedInput": {...}}` to modify args)
|
|
318
|
+
- `1` - Warn but continue
|
|
319
|
+
- `2` - Block execution
|
|
320
|
+
|
|
321
|
+
### Plugin System
|
|
322
|
+
|
|
323
|
+
Extend CodeTyper with custom tools, commands, and hooks.
|
|
324
|
+
|
|
325
|
+
**Plugin Structure:**
|
|
326
|
+
```
|
|
327
|
+
.codetyper/plugins/{name}/
|
|
328
|
+
├── plugin.json # Manifest
|
|
329
|
+
├── tools/
|
|
330
|
+
│ └── *.ts # Custom tool definitions
|
|
331
|
+
├── commands/
|
|
332
|
+
│ └── *.md # Slash commands
|
|
333
|
+
└── hooks/
|
|
334
|
+
└── *.sh # Plugin-specific hooks
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
**Manifest** (`plugin.json`):
|
|
338
|
+
```json
|
|
339
|
+
{
|
|
340
|
+
"name": "my-plugin",
|
|
341
|
+
"version": "1.0.0",
|
|
342
|
+
"tools": [{ "name": "custom_tool", "file": "tool.ts" }],
|
|
343
|
+
"commands": [{ "name": "mycommand", "file": "cmd.md" }]
|
|
344
|
+
}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
**Custom Tool Definition:**
|
|
348
|
+
```typescript
|
|
349
|
+
import { z } from "zod";
|
|
350
|
+
export default {
|
|
351
|
+
name: "custom_tool",
|
|
352
|
+
description: "Does something",
|
|
353
|
+
parameters: z.object({ input: z.string() }),
|
|
354
|
+
execute: async (args, ctx) => ({ success: true, title: "Done", output: "..." }),
|
|
355
|
+
};
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Session Forking
|
|
359
|
+
|
|
360
|
+
Branch and rewind session history for experimentation.
|
|
361
|
+
|
|
362
|
+
**Commands:**
|
|
363
|
+
| Command | Description |
|
|
364
|
+
|---------|-------------|
|
|
365
|
+
| `/snapshot [name]` | Create checkpoint |
|
|
366
|
+
| `/rewind [n\|name]` | Go back to snapshot |
|
|
367
|
+
| `/fork [name]` | Branch current session |
|
|
368
|
+
| `/forks` | List all forks |
|
|
369
|
+
| `/switch [name]` | Switch to fork |
|
|
370
|
+
|
|
371
|
+
Sessions are stored in `.codetyper/sessions/` with automatic commit message suggestions.
|
|
372
|
+
|
|
266
373
|
## Development
|
|
267
374
|
|
|
268
375
|
```bash
|