@ebowwa/coder 0.2.0 → 0.7.63
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 +75 -44
- package/dist/index.js +52191 -1
- package/dist/interfaces/ui/terminal/cli/index.js +52776 -0
- package/native/README.md +5 -5
- package/native/index.d.ts +0 -150
- package/native/index.darwin-arm64.node +0 -0
- package/native/index.node +0 -0
- package/native/package.json +5 -5
- package/package.json +31 -16
- package/dist/cli.js +0 -148
- package/dist/index-0pkak453.js +0 -136
- package/dist/index-0qd0x8b4.js +0 -110
- package/dist/index-0x3kprq6.js +0 -240
- package/dist/index-1eawy937.js +0 -308
- package/dist/index-24m2aygy.js +0 -240
- package/dist/index-29xcjnne.js +0 -280
- package/dist/index-2avyytn5.js +0 -349
- package/dist/index-4ms367ey.js +0 -136
- package/dist/index-4w2t3b0m.js +0 -240
- package/dist/index-4xfgd8nz.js +0 -261
- package/dist/index-5acjp9gc.js +0 -157
- package/dist/index-5s15hr56.js +0 -136
- package/dist/index-6e4wf341.js +0 -349
- package/dist/index-6fvnkedw.js +0 -240
- package/dist/index-6rqpmd4g.js +0 -128
- package/dist/index-77ckwnbm.js +0 -280
- package/dist/index-9knxy49k.js +0 -128
- package/dist/index-9zrnw4zx.js +0 -128
- package/dist/index-bk21w99v.js +0 -280
- package/dist/index-c41n76fv.js +0 -240
- package/dist/index-cb4ppjdt.js +0 -255
- package/dist/index-cfb2edt6.js +0 -240
- package/dist/index-cmfa38hh.js +0 -308
- package/dist/index-datjz8q1.js +0 -257
- package/dist/index-eadf4wvn.js +0 -240
- package/dist/index-em5k0m3z.js +0 -345
- package/dist/index-gh8r333a.js +0 -110
- package/dist/index-gkx6k2tr.js +0 -261
- package/dist/index-h5cabfks.js +0 -155
- package/dist/index-hcrpwyy3.js +0 -261
- package/dist/index-hk7fwwa8.js +0 -257
- package/dist/index-jb8cw7f8.js +0 -136
- package/dist/index-kbyw4th1.js +0 -347
- package/dist/index-kgj5gqnm.js +0 -345
- package/dist/index-mdf6xp1z.js +0 -255
- package/dist/index-mrhv8kvc.js +0 -280
- package/dist/index-mt4743dd.js +0 -161
- package/dist/index-qnwsg97q.js +0 -240
- package/dist/index-qwdy6x44.js +0 -261
- package/dist/index-rmj77261.js +0 -157
- package/dist/index-sbbw1a61.js +0 -349
- package/dist/index-svy5bcpn.js +0 -345
- package/dist/index-tvmy7tm9.js +0 -261
- package/dist/index-tzz4vzkj.js +0 -312
- package/dist/index-vz80zmhe.js +0 -110
- package/dist/index-wed2fk67.js +0 -240
- package/dist/index-wksgzz8e.js +0 -280
- package/dist/index-wn2m4wma.js +0 -240
- package/dist/index-xha05vjc.js +0 -257
- package/dist/index-yc6eh8p8.js +0 -136
- package/dist/index-ycjxx9ft.js +0 -240
- package/dist/index-z0gzd0fc.js +0 -110
- package/dist/index-z8cwtf8j.js +0 -240
- package/dist/index-zy5mtt00.js +0 -128
package/README.md
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
# @ebowwa/
|
|
1
|
+
# @ebowwa/coder
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Based on binary analysis of Claude Code v2.1.50 (~92% feature parity).
|
|
6
|
-
|
|
7
|
-
## Features
|
|
8
|
-
|
|
9
|
-
- **API Client**: SSE streaming for Anthropic API with cost calculation
|
|
10
|
-
- **Agent Loop**: Turn-based processing with tool execution
|
|
11
|
-
- **Built-in Tools**: Read, Write, Edit, Bash, Glob, Grep
|
|
12
|
-
- **MCP Client**: Model Context Protocol support (stdio, HTTP, SSE, WebSocket)
|
|
13
|
-
- **Hook System**: 10 lifecycle events for customization
|
|
14
|
-
- **Skill System**: YAML frontmatter skills with `/skillname` invocation
|
|
15
|
-
- **Teammate System**: Multi-agent coordination with tmux backend
|
|
16
|
-
- **Native Module**: Rust-based performance for search, tokens, diff, compact
|
|
3
|
+
An AI-powered terminal coding assistant built with TypeScript + Bun + Rust.
|
|
17
4
|
|
|
18
5
|
## Installation
|
|
19
6
|
|
|
20
7
|
```bash
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
# Install globally
|
|
9
|
+
npm install -g @ebowwa/coder
|
|
10
|
+
|
|
11
|
+
# Or with bun
|
|
12
|
+
bun add -g @ebowwa/coder
|
|
23
13
|
```
|
|
24
14
|
|
|
25
15
|
## Usage
|
|
@@ -28,33 +18,33 @@ bun run build
|
|
|
28
18
|
|
|
29
19
|
```bash
|
|
30
20
|
# Interactive mode
|
|
31
|
-
|
|
21
|
+
coder
|
|
32
22
|
|
|
33
23
|
# Single query
|
|
34
|
-
|
|
24
|
+
coder "What files are in this directory?"
|
|
35
25
|
|
|
36
26
|
# With specific model
|
|
37
|
-
|
|
27
|
+
coder -m glm-5 "Explain this codebase"
|
|
38
28
|
|
|
39
29
|
# With permission mode
|
|
40
|
-
|
|
30
|
+
coder --permission-mode acceptEdits "Add a test"
|
|
41
31
|
```
|
|
42
32
|
|
|
43
33
|
### Programmatic
|
|
44
34
|
|
|
45
35
|
```typescript
|
|
46
|
-
import { createMessageStream, agentLoop, tools } from "@ebowwa/
|
|
36
|
+
import { createMessageStream, agentLoop, tools } from "@ebowwa/coder";
|
|
47
37
|
|
|
48
38
|
// Stream API messages
|
|
49
39
|
const result = await createMessageStream(messages, {
|
|
50
|
-
apiKey: process.env.
|
|
51
|
-
model: "
|
|
40
|
+
apiKey: process.env.API_KEY,
|
|
41
|
+
model: "glm-5",
|
|
52
42
|
onToken: (text) => process.stdout.write(text),
|
|
53
43
|
});
|
|
54
44
|
|
|
55
45
|
// Run agent loop
|
|
56
46
|
const agentResult = await agentLoop(messages, {
|
|
57
|
-
apiKey: process.env.
|
|
47
|
+
apiKey: process.env.API_KEY,
|
|
58
48
|
systemPrompt: "You are a helpful assistant.",
|
|
59
49
|
tools: [tools.ReadTool, tools.WriteTool, tools.BashTool],
|
|
60
50
|
permissionMode: "default",
|
|
@@ -62,26 +52,54 @@ const agentResult = await agentLoop(messages, {
|
|
|
62
52
|
});
|
|
63
53
|
```
|
|
64
54
|
|
|
55
|
+
## Features
|
|
56
|
+
|
|
57
|
+
- **API Client**: SSE streaming with cost calculation
|
|
58
|
+
- **Agent Loop**: Turn-based processing with tool execution
|
|
59
|
+
- **Built-in Tools**: Read, Write, Edit, Bash, Glob, Grep
|
|
60
|
+
- **MCP Client**: Model Context Protocol support (stdio, HTTP, SSE, WebSocket)
|
|
61
|
+
- **Hook System**: 10 lifecycle events for customization
|
|
62
|
+
- **Skill System**: YAML frontmatter skills with `/skillname` invocation
|
|
63
|
+
- **Teammate System**: Multi-agent coordination with tmux backend
|
|
64
|
+
- **Native Module**: Rust-based performance for critical operations
|
|
65
|
+
|
|
66
|
+
## Native Modules (Rust)
|
|
67
|
+
|
|
68
|
+
The `@ebowwa/coder-native` package provides high-performance operations:
|
|
69
|
+
|
|
70
|
+
| Module | Description |
|
|
71
|
+
|--------|-------------|
|
|
72
|
+
| **grep** | Ripgrep-based file search with regex support |
|
|
73
|
+
| **hash** | xxHash3/SHA-256 content hashing |
|
|
74
|
+
| **highlight** | Syntax highlighting with syntect |
|
|
75
|
+
| **structure** | Tree-sitter code structure parsing |
|
|
76
|
+
| **patterns** | Tool usage pattern analysis |
|
|
77
|
+
| **multi_edit** | Batch file editing with validation |
|
|
78
|
+
|
|
65
79
|
## Project Structure
|
|
66
80
|
|
|
67
81
|
```
|
|
68
|
-
|
|
69
|
-
├──
|
|
70
|
-
│ ├──
|
|
71
|
-
│ ├──
|
|
72
|
-
│ ├──
|
|
73
|
-
│ ├──
|
|
74
|
-
│ ├──
|
|
75
|
-
│ ├──
|
|
76
|
-
│ ├──
|
|
77
|
-
│ ├──
|
|
78
|
-
│
|
|
79
|
-
|
|
80
|
-
│ └──
|
|
81
|
-
│
|
|
82
|
-
│
|
|
83
|
-
│
|
|
84
|
-
│
|
|
82
|
+
coder/
|
|
83
|
+
├── packages/
|
|
84
|
+
│ ├── src/
|
|
85
|
+
│ │ ├── types/ # TypeScript type definitions
|
|
86
|
+
│ │ ├── core/ # API client, agent loop, checkpoints
|
|
87
|
+
│ │ ├── tools/ # Built-in tools (Read, Write, Edit, Bash, etc.)
|
|
88
|
+
│ │ ├── mcp/ # MCP client implementation
|
|
89
|
+
│ │ ├── hooks/ # Hook system for lifecycle events
|
|
90
|
+
│ │ ├── skills/ # Skill parsing and invocation
|
|
91
|
+
│ │ ├── teammates/ # Multi-agent coordination
|
|
92
|
+
│ │ ├── native/ # Native module loader
|
|
93
|
+
│ │ └── interfaces/ # CLI and UI interfaces
|
|
94
|
+
│ └── rust/
|
|
95
|
+
│ └── src/
|
|
96
|
+
│ ├── grep.rs # Ripgrep-based file search
|
|
97
|
+
│ ├── hash.rs # Content hashing (xxHash3, SHA-256)
|
|
98
|
+
│ ├── highlight.rs # Syntax highlighting
|
|
99
|
+
│ ├── structure.rs # Tree-sitter parsing
|
|
100
|
+
│ ├── patterns.rs # Tool pattern analysis
|
|
101
|
+
│ ├── multi_edit.rs # Batch file operations
|
|
102
|
+
│ └── diff.rs # Diff calculation
|
|
85
103
|
├── native/ # Compiled native modules
|
|
86
104
|
└── dist/ # Build output
|
|
87
105
|
```
|
|
@@ -90,13 +108,13 @@ claude-code-remake/
|
|
|
90
108
|
|
|
91
109
|
### Environment Variables
|
|
92
110
|
|
|
93
|
-
- `
|
|
111
|
+
- `API_KEY` - API key for your LLM provider
|
|
94
112
|
|
|
95
113
|
### CLI Options
|
|
96
114
|
|
|
97
115
|
| Option | Description | Default |
|
|
98
116
|
|--------|-------------|---------|
|
|
99
|
-
| `-m, --model` | Model to use |
|
|
117
|
+
| `-m, --model` | Model to use | glm-5 |
|
|
100
118
|
| `-p, --permission-mode` | Permission mode | default |
|
|
101
119
|
| `--max-tokens` | Maximum output tokens | 4096 |
|
|
102
120
|
| `--system-prompt` | Override system prompt | - |
|
|
@@ -105,6 +123,9 @@ claude-code-remake/
|
|
|
105
123
|
## Development
|
|
106
124
|
|
|
107
125
|
```bash
|
|
126
|
+
# Install dependencies
|
|
127
|
+
bun install
|
|
128
|
+
|
|
108
129
|
# Build TypeScript
|
|
109
130
|
bun run build:ts
|
|
110
131
|
|
|
@@ -116,8 +137,18 @@ bun run build
|
|
|
116
137
|
|
|
117
138
|
# Development mode with watch
|
|
118
139
|
bun run dev
|
|
140
|
+
|
|
141
|
+
# Run tests
|
|
142
|
+
bun test
|
|
119
143
|
```
|
|
120
144
|
|
|
145
|
+
## Packages
|
|
146
|
+
|
|
147
|
+
| Package | Version | Description |
|
|
148
|
+
|---------|---------|-------------|
|
|
149
|
+
| [@ebowwa/coder](https://www.npmjs.com/package/@ebowwa/coder) | 0.2.1 | Main CLI package |
|
|
150
|
+
| [@ebowwa/coder-native](https://www.npmjs.com/package/@ebowwa/coder-native) | 0.2.1 | Native Rust modules |
|
|
151
|
+
|
|
121
152
|
## License
|
|
122
153
|
|
|
123
154
|
MIT
|