deplyze-code 0.1.0 → 0.1.3

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 CHANGED
@@ -1,210 +1,161 @@
1
- # Deplyze Code
2
-
3
- <p align="right"><strong>中文</strong> | <a href="./README.en.md">English</a></p>
4
-
5
- Deplyze Code 是一个基于 Gemini API Key 的终端编码助手,保留了原始风格的 Ink TUI REPL 交互体验。
6
-
7
- > 当前主流程已经切换到 Gemini API Key 运行路径,核心终端 UI、斜杠命令、工具调用和 `/model` 交互保持可用。
8
-
9
- <p align="center">
10
- <img src="docs/00runtime.png" alt="运行截图" width="800">
11
- </p>
12
-
13
- ## 功能
14
-
15
- - 完整的 Ink TUI 与交互式 REPL
16
- - `--print` 无头模式,适合脚本和 CI
17
- - 支持斜杠命令、工具、MCP、插件与 Skills
18
- - 支持通过 `/model` 切换 Gemini 模型
19
- - 保留简化版 Recovery CLI
20
-
21
- ---
22
-
23
- ## 快速开始
24
-
25
- ### 1. 安装 Bun
26
-
27
- 本项目依赖 [Bun](https://bun.sh)。
28
-
29
- ```bash
30
- # macOS / Linux
31
- curl -fsSL https://bun.sh/install | bash
32
- ```
33
-
34
- ```bash
35
- # macOS(Homebrew)
36
- brew install bun
37
- ```
38
-
39
- ```powershell
40
- # Windows(PowerShell)
41
- powershell -c "irm bun.sh/install.ps1 | iex"
42
- ```
43
-
44
- 安装完成后确认:
45
-
46
- ```bash
47
- bun --version
48
- ```
49
-
50
- ### 2. 安装依赖
51
-
52
- ```bash
53
- bun install
54
- ```
55
-
56
- ### 3. 配置环境变量
57
-
58
- 复制示例文件:
59
-
60
- ```bash
61
- cp .env.example .env
62
- ```
63
-
64
- 至少配置:
65
-
66
- ```env
67
- GEMINI_API_KEY=your_api_key_here
68
- ```
69
-
70
- 可选配置:
71
-
72
- ```env
73
- GEMINI_MODEL=gemini-3.1-pro-preview
74
- GEMINI_SMALL_FAST_MODEL=gemini-3.1-flash-lite-preview
75
- DISABLE_TELEMETRY=1
76
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
77
- ```
78
-
79
- ### 4. 从源码启动
80
-
81
- #### macOS / Linux
82
-
83
- ```bash
84
- ./bin/deplyze
85
- ```
86
-
87
- ```bash
88
- ./bin/deplyze -p "hello"
89
- ```
90
-
91
- ```bash
92
- echo "inspect this repository" | ./bin/deplyze -p
93
- ```
94
-
95
- ```bash
96
- ./bin/deplyze --help
97
- ```
98
-
99
- #### Windows
100
-
101
- ```powershell
102
- bun ./bin/deplyze
103
- ```
104
-
105
- ```powershell
106
- bun ./bin/deplyze -p "hello"
107
- ```
108
-
109
- ```powershell
110
- bun ./bin/deplyze --help
111
- ```
112
-
113
- ### 5. 全局安装
114
-
115
- ```bash
116
- npm install -g deplyze-code
117
- ```
118
-
119
- 安装后直接运行:
120
-
121
- ```bash
122
- deplyze
123
- ```
124
-
125
- ---
126
-
127
- ## 环境变量
128
-
129
- | 变量 | 必填 | 说明 |
130
- |------|------|------|
131
- | `GEMINI_API_KEY` | 是 | 主交互运行路径所需的 Gemini API Key |
132
- | `GEMINI_MODEL` | 否 | 默认主模型覆盖 |
133
- | `GEMINI_SMALL_FAST_MODEL` | 否 | 快速验证/低成本模型覆盖 |
134
- | `DISABLE_TELEMETRY` | | 设为 `1` 可禁用遥测 |
135
- | `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` | 否 | 设为 `1` 可禁用非必要网络请求 |
136
-
137
- ---
138
-
139
- ## 模型
140
-
141
- 当前 `/model` 主流程提供:
142
-
143
- - `Gemini 3.1 Pro`
144
- - `Gemini 3 Flash`
145
- - `Gemini 3.1 Flash-Lite`
146
-
147
- 运行时实际使用的 Gemini API 模型句柄为:
148
-
149
- - `gemini-3.1-pro-preview`
150
- - `gemini-3-flash-preview`
151
- - `gemini-3.1-flash-lite-preview`
152
-
153
- ---
154
-
155
- ## 降级模式
156
-
157
- 如果完整 TUI 异常,可以使用简化版 Recovery CLI:
158
-
159
- ```bash
160
- CLAUDE_CODE_FORCE_RECOVERY_CLI=1 ./bin/deplyze
161
- ```
162
-
163
- PowerShell:
164
-
165
- ```powershell
166
- $env:CLAUDE_CODE_FORCE_RECOVERY_CLI='1'
167
- bun ./bin/deplyze
168
- ```
169
-
170
- ---
171
-
172
- ## 项目结构
173
-
174
- ```text
175
- bin/deplyze # 发布入口脚本
176
- preload.ts # Bun preload(设置 MACRO 全局变量)
177
- .env.example # 环境变量模板
178
- src/
179
- ├── entrypoints/cli.tsx # CLI 主入口
180
- ├── main.tsx # TUI 主逻辑(Commander.js + React/Ink)
181
- ├── localRecoveryCli.ts # Recovery CLI
182
- ├── screens/REPL.tsx # 交互式 REPL 界面
183
- ├── components/ # UI 组件
184
- ├── commands/ # 斜杠命令
185
- ├── tools/ # Agent 工具(Bash、Edit、Grep 等)
186
- ├── services/ # 服务层
187
- ├── hooks/ # React hooks
188
- └── utils/ # 工具函数
189
- ```
190
-
191
- ---
192
-
193
- ## 技术栈
194
-
195
- | 类别 | 技术 |
196
- |------|------|
197
- | 运行时 | [Bun](https://bun.sh) |
198
- | 语言 | TypeScript |
199
- | 终端 UI | React + [Ink](https://github.com/vadimdemedes/ink) |
200
- | CLI 解析 | Commander.js |
201
- | API | Gemini + [`@google/genai`](https://www.npmjs.com/package/@google/genai) |
202
- | 协议 | MCP, LSP |
203
-
204
- ---
205
-
206
- ## 说明
207
-
208
- - 当前主流程只要求 `GEMINI_API_KEY`。
209
- - 仓库中仍保留旧登录与旧 onboarding 代码,但正常 Gemini 使用不依赖它们。
210
- - `CLAUDE.md` 文件名出于兼容性考虑暂时保持不变。
1
+ # Deplyze Code
2
+
3
+ Deplyze Code is a Gemini-powered terminal coding assistant with an interactive Ink TUI, REPL, tools, and slash commands.
4
+
5
+ This package is intended to be installed globally and started with:
6
+
7
+ ```bash
8
+ deplyze
9
+ ```
10
+
11
+ ## Status
12
+
13
+ - Current private release: `0.1.3`
14
+ - Active auth path: Gemini API key
15
+ - Active model picker: Gemini 3.1 Pro, Gemini 3 Flash, Gemini 3.1 Flash-Lite
16
+ - `CLAUDE.md` remains the repository guidance filename for compatibility
17
+
18
+ ## Install
19
+
20
+ Install Bun first if it is not already available:
21
+
22
+ ```bash
23
+ curl -fsSL https://bun.sh/install | bash
24
+ ```
25
+
26
+ ```powershell
27
+ powershell -c "irm bun.sh/install.ps1 | iex"
28
+ ```
29
+
30
+ Install the package globally:
31
+
32
+ ```bash
33
+ npm install -g deplyze-code
34
+ ```
35
+
36
+ ## Required Environment Variable
37
+
38
+ Set your Gemini API key:
39
+
40
+ ```bash
41
+ export GEMINI_API_KEY="your_api_key_here"
42
+ ```
43
+
44
+ PowerShell:
45
+
46
+ ```powershell
47
+ $env:GEMINI_API_KEY="your_api_key_here"
48
+ ```
49
+
50
+ Optional:
51
+
52
+ ```bash
53
+ export GEMINI_MODEL="gemini-3.1-pro-preview"
54
+ export GEMINI_SMALL_FAST_MODEL="gemini-3.1-flash-lite-preview"
55
+ ```
56
+
57
+ ## Start
58
+
59
+ Run:
60
+
61
+ ```bash
62
+ deplyze
63
+ ```
64
+
65
+ On first launch with `GEMINI_API_KEY` set, Deplyze Code should open directly into the main REPL without the legacy onboarding flow.
66
+
67
+ ## If `deplyze` Is Not Found
68
+
69
+ If global install succeeds but the shell says `deplyze` is not recognized, your npm global bin directory is probably not on `PATH`.
70
+
71
+ Check the prefix:
72
+
73
+ ```bash
74
+ npm prefix -g
75
+ ```
76
+
77
+ Make sure the corresponding global bin directory is on your shell `PATH`, then reopen the terminal.
78
+
79
+ ## Basic Usage
80
+
81
+ Plain interactive launch:
82
+
83
+ ```bash
84
+ deplyze
85
+ ```
86
+
87
+ Single prompt:
88
+
89
+ ```bash
90
+ deplyze -p "hello"
91
+ ```
92
+
93
+ Repository question:
94
+
95
+ ```bash
96
+ deplyze -p "Inspect this repository and tell me what file launches the REPL."
97
+ ```
98
+
99
+ Bash tool example:
100
+
101
+ ```bash
102
+ deplyze -p "Use the Bash tool to print the current working directory, then answer with only that path." --allowedTools Bash --dangerously-skip-permissions
103
+ ```
104
+
105
+ ## Model Switching
106
+
107
+ Inside the interactive UI, run:
108
+
109
+ ```text
110
+ /model
111
+ ```
112
+
113
+ Available models in the active UI:
114
+
115
+ - `Gemini 3.1 Pro`
116
+ - `Gemini 3 Flash`
117
+ - `Gemini 3.1 Flash-Lite`
118
+
119
+ Underlying Gemini API model handles:
120
+
121
+ - `gemini-3.1-pro-preview`
122
+ - `gemini-3-flash-preview`
123
+ - `gemini-3.1-flash-lite-preview`
124
+
125
+ ## What This Release Uses
126
+
127
+ - Provider flow: Gemini API key
128
+ - Required auth for normal usage: `GEMINI_API_KEY`
129
+ - UI flow: existing Deplyze Code TUI and REPL
130
+ - Legacy login and OAuth code still exists in the repository, but it is not required for the standard Gemini path
131
+
132
+ ## Source Checkout Usage
133
+
134
+ If you are running from a local checkout instead of a global install:
135
+
136
+ ```bash
137
+ bun install
138
+ ./bin/deplyze
139
+ ```
140
+
141
+ Windows:
142
+
143
+ ```powershell
144
+ bun install
145
+ bun ./bin/deplyze
146
+ ```
147
+
148
+ ## Recovery Mode
149
+
150
+ If you need the simplified recovery CLI:
151
+
152
+ ```bash
153
+ CLAUDE_CODE_FORCE_RECOVERY_CLI=1 deplyze
154
+ ```
155
+
156
+ PowerShell:
157
+
158
+ ```powershell
159
+ $env:CLAUDE_CODE_FORCE_RECOVERY_CLI='1'
160
+ deplyze
161
+ ```
package/bin/deplyze CHANGED
@@ -8,8 +8,10 @@ import { fileURLToPath } from 'node:url'
8
8
  const packageRoot = join(dirname(fileURLToPath(import.meta.url)), '..')
9
9
  const cwd = process.cwd()
10
10
  const envFile = join(cwd, '.env')
11
+ const preloadFile = join(packageRoot, 'preload.ts')
11
12
 
12
13
  const args: string[] = []
14
+ args.push(`--preload=${preloadFile}`)
13
15
  if (existsSync(envFile)) {
14
16
  args.push(`--env-file=${envFile}`)
15
17
  }
package/package.json CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
- "name": "deplyze-code",
3
- "version": "0.1.0",
4
- "type": "module",
5
- "bin": {
6
- "deplyze": "./bin/deplyze"
7
- },
8
- "scripts": {
9
- "deplyze": "bun run ./bin/deplyze",
10
- "start": "bun run ./bin/deplyze"
11
- },
2
+ "name": "deplyze-code",
3
+ "version": "0.1.3",
4
+ "description": "Deplyze Code is a Gemini-powered terminal coding assistant with an interactive Ink TUI.",
5
+ "type": "module",
6
+ "bin": {
7
+ "deplyze": "bin/deplyze"
8
+ },
9
+ "scripts": {
10
+ "test": "bun test",
11
+ "smoke": "bun run ./scripts/smoke.ts",
12
+ "deplyze": "bun run ./bin/deplyze",
13
+ "start": "bun run ./bin/deplyze"
14
+ },
12
15
  "dependencies": {
13
16
  "@anthropic-ai/sandbox-runtime": "^0.0.44",
14
17
  "@anthropic-ai/sdk": "^0.80.0",
package/preload.ts CHANGED
@@ -1,5 +1,5 @@
1
- const version = process.env.CLAUDE_CODE_LOCAL_VERSION ?? '0.1.0';
2
- const packageUrl = process.env.CLAUDE_CODE_LOCAL_PACKAGE_URL ?? 'deplyze-code';
1
+ const version = process.env.CLAUDE_CODE_LOCAL_VERSION ?? '0.1.3';
2
+ const packageUrl = process.env.CLAUDE_CODE_LOCAL_PACKAGE_URL ?? 'deplyze-code';
3
3
  const buildTime = process.env.CLAUDE_CODE_LOCAL_BUILD_TIME ?? new Date().toISOString();
4
4
 
5
5
  process.env.CLAUDE_CODE_LOCAL_SKIP_REMOTE_PREFETCH ??= '1';