@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.
Files changed (64) hide show
  1. package/README.md +75 -44
  2. package/dist/index.js +52191 -1
  3. package/dist/interfaces/ui/terminal/cli/index.js +52776 -0
  4. package/native/README.md +5 -5
  5. package/native/index.d.ts +0 -150
  6. package/native/index.darwin-arm64.node +0 -0
  7. package/native/index.node +0 -0
  8. package/native/package.json +5 -5
  9. package/package.json +31 -16
  10. package/dist/cli.js +0 -148
  11. package/dist/index-0pkak453.js +0 -136
  12. package/dist/index-0qd0x8b4.js +0 -110
  13. package/dist/index-0x3kprq6.js +0 -240
  14. package/dist/index-1eawy937.js +0 -308
  15. package/dist/index-24m2aygy.js +0 -240
  16. package/dist/index-29xcjnne.js +0 -280
  17. package/dist/index-2avyytn5.js +0 -349
  18. package/dist/index-4ms367ey.js +0 -136
  19. package/dist/index-4w2t3b0m.js +0 -240
  20. package/dist/index-4xfgd8nz.js +0 -261
  21. package/dist/index-5acjp9gc.js +0 -157
  22. package/dist/index-5s15hr56.js +0 -136
  23. package/dist/index-6e4wf341.js +0 -349
  24. package/dist/index-6fvnkedw.js +0 -240
  25. package/dist/index-6rqpmd4g.js +0 -128
  26. package/dist/index-77ckwnbm.js +0 -280
  27. package/dist/index-9knxy49k.js +0 -128
  28. package/dist/index-9zrnw4zx.js +0 -128
  29. package/dist/index-bk21w99v.js +0 -280
  30. package/dist/index-c41n76fv.js +0 -240
  31. package/dist/index-cb4ppjdt.js +0 -255
  32. package/dist/index-cfb2edt6.js +0 -240
  33. package/dist/index-cmfa38hh.js +0 -308
  34. package/dist/index-datjz8q1.js +0 -257
  35. package/dist/index-eadf4wvn.js +0 -240
  36. package/dist/index-em5k0m3z.js +0 -345
  37. package/dist/index-gh8r333a.js +0 -110
  38. package/dist/index-gkx6k2tr.js +0 -261
  39. package/dist/index-h5cabfks.js +0 -155
  40. package/dist/index-hcrpwyy3.js +0 -261
  41. package/dist/index-hk7fwwa8.js +0 -257
  42. package/dist/index-jb8cw7f8.js +0 -136
  43. package/dist/index-kbyw4th1.js +0 -347
  44. package/dist/index-kgj5gqnm.js +0 -345
  45. package/dist/index-mdf6xp1z.js +0 -255
  46. package/dist/index-mrhv8kvc.js +0 -280
  47. package/dist/index-mt4743dd.js +0 -161
  48. package/dist/index-qnwsg97q.js +0 -240
  49. package/dist/index-qwdy6x44.js +0 -261
  50. package/dist/index-rmj77261.js +0 -157
  51. package/dist/index-sbbw1a61.js +0 -349
  52. package/dist/index-svy5bcpn.js +0 -345
  53. package/dist/index-tvmy7tm9.js +0 -261
  54. package/dist/index-tzz4vzkj.js +0 -312
  55. package/dist/index-vz80zmhe.js +0 -110
  56. package/dist/index-wed2fk67.js +0 -240
  57. package/dist/index-wksgzz8e.js +0 -280
  58. package/dist/index-wn2m4wma.js +0 -240
  59. package/dist/index-xha05vjc.js +0 -257
  60. package/dist/index-yc6eh8p8.js +0 -136
  61. package/dist/index-ycjxx9ft.js +0 -240
  62. package/dist/index-z0gzd0fc.js +0 -110
  63. package/dist/index-z8cwtf8j.js +0 -240
  64. package/dist/index-zy5mtt00.js +0 -128
package/README.md CHANGED
@@ -1,25 +1,15 @@
1
- # @ebowwa/claude-code-remake
1
+ # @ebowwa/coder
2
2
 
3
- A reimplementation of Claude Code CLI using TypeScript + Bun + Rust.
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
- bun install
22
- bun run build
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
- bun run cli
21
+ coder
32
22
 
33
23
  # Single query
34
- bun run cli "What files are in this directory?"
24
+ coder "What files are in this directory?"
35
25
 
36
26
  # With specific model
37
- bun run cli -m claude-opus-4-6 "Explain this codebase"
27
+ coder -m glm-5 "Explain this codebase"
38
28
 
39
29
  # With permission mode
40
- bun run cli --permission-mode acceptEdits "Add a test"
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/claude-code-remake";
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.ANTHROPIC_API_KEY,
51
- model: "claude-sonnet-4-6",
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.ANTHROPIC_API_KEY,
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
- claude-code-remake/
69
- ├── src/
70
- │ ├── types/ # TypeScript type definitions
71
- │ ├── core/ # API client, agent loop
72
- │ ├── tools/ # Built-in tools (Read, Write, Edit, Bash, etc.)
73
- │ ├── mcp/ # MCP client implementation
74
- │ ├── hooks/ # Hook system for lifecycle events
75
- │ ├── skills/ # Skill parsing and invocation
76
- │ ├── teammates/ # Multi-agent coordination
77
- │ ├── native/ # Native module loader
78
- └── cli.ts # CLI entry point
79
- ├── rust/
80
- │ └── src/
81
- ├── search.rs # Ripgrep-based file search
82
- ├── tokens.rs # Token counting
83
- ├── diff.rs # Diff calculation
84
- └── compact.rs # Content compaction
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
- - `ANTHROPIC_API_KEY` - API key for Claude
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 | claude-sonnet-4-6 |
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