@get-blu/blu-code 1.0.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.
- package/LICENSE +22 -0
- package/README.md +296 -0
- package/bin/blu.exe +0 -0
- package/bin/cli.js +24 -0
- package/package.json +26 -0
- package/scripts/install-npm.js +86 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kujtim Hoxha
|
|
4
|
+
Copyright (c) 2026 Garv Agnihotri (Blu)
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# Blu
|
|
2
|
+
|
|
3
|
+
>Blu is a Go-powered terminal UI that brings AI-assisted coding directly into your command line. It connects to leading models and gives them tools to read, analyze, and modify your codebase from an elegant TUI built with Bubble Tea.
|
|
4
|
+
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://go.dev/)
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Blu is a Go-powered terminal UI that transforms your command line into an intelligent development environment. It connects to leading AI models and provides them with powerful tools to read, analyze, and modify your codebase - all from an elegant TUI built with [Bubble Tea](https://github.com/charmbracelet/bubbletea).
|
|
11
|
+
|
|
12
|
+
**Key capabilities:**
|
|
13
|
+
- Chat with AI models that can see and edit your files
|
|
14
|
+
- Execute bash commands through AI suggestions
|
|
15
|
+
- Apply complex code refactors automatically
|
|
16
|
+
- Get real-time LSP diagnostics and code intelligence
|
|
17
|
+
- Manage multiple conversation sessions with full context
|
|
18
|
+
- Use Model Context Protocol (MCP) servers for extensibility
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
### Installation
|
|
23
|
+
|
|
24
|
+
**Via install script:**
|
|
25
|
+
```bash
|
|
26
|
+
curl -fsSL https://raw.githubusercontent.com/Get-Blu/blu-code/main/install | bash
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**From source:**
|
|
30
|
+
```bash
|
|
31
|
+
git clone https://github.com/Get-Blu/blu-code.git
|
|
32
|
+
cd blu-code
|
|
33
|
+
go build -o blu
|
|
34
|
+
blu
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Setup
|
|
38
|
+
|
|
39
|
+
1. Set your API key(s):
|
|
40
|
+
```bash
|
|
41
|
+
export ANTHROPIC_API_KEY="your-key-here"
|
|
42
|
+
# or OPENAI_API_KEY, GEMINI_API_KEY
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
2. Create a `.blu.json` config file (optional):
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"agents": {
|
|
49
|
+
"coder": {
|
|
50
|
+
"model": "claude-sonnet-4-5-20250929",
|
|
51
|
+
"maxTokens": 8192
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"autoCompact": true
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. Launch Blu:
|
|
59
|
+
```bash
|
|
60
|
+
blu
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Features
|
|
64
|
+
|
|
65
|
+
### Multi-Model Support
|
|
66
|
+
Switch between Claude, GPT, Gemini, or any OpenAI-compatible endpoint. Use different models for different tasks within the same session.
|
|
67
|
+
|
|
68
|
+
### Intelligent File Operations
|
|
69
|
+
- **Glob patterns**: Find files matching complex patterns
|
|
70
|
+
- **Smart grep**: Search across your codebase with regex
|
|
71
|
+
- **Atomic edits**: Apply precise diffs and patches
|
|
72
|
+
- **Batch operations**: Modify multiple files in one go
|
|
73
|
+
|
|
74
|
+
### Development Tools
|
|
75
|
+
- **LSP Integration**: Real-time diagnostics and code intelligence via Language Server Protocol
|
|
76
|
+
- **Command execution**: Run bash commands directly from chat
|
|
77
|
+
- **MCP Support**: Extend with Model Context Protocol servers
|
|
78
|
+
- **Version control aware**: Understands your git context
|
|
79
|
+
|
|
80
|
+
### Productivity Features
|
|
81
|
+
- **Session management**: Switch between multiple conversations (`Ctrl+S`)
|
|
82
|
+
- **Custom commands**: Create reusable prompt templates (`Ctrl+K`)
|
|
83
|
+
- **Auto-compaction**: Intelligent context window management
|
|
84
|
+
- **SQLite persistence**: Full local history storage
|
|
85
|
+
- **Interactive sidebar**: Visualize file changes in real-time
|
|
86
|
+
|
|
87
|
+
## Usage
|
|
88
|
+
|
|
89
|
+
### Basic Workflow
|
|
90
|
+
|
|
91
|
+
1. **Start a conversation**: Launch `blu` and ask a question
|
|
92
|
+
2. **Let AI explore**: Blu can read files, search your codebase, and understand context
|
|
93
|
+
3. **Review changes**: See proposed file modifications in the sidebar
|
|
94
|
+
4. **Apply or reject**: Accept changes you want, skip the rest
|
|
95
|
+
|
|
96
|
+
## Keyboard Shortcuts
|
|
97
|
+
|
|
98
|
+
### Global Shortcuts
|
|
99
|
+
|
|
100
|
+
| Shortcut | Action |
|
|
101
|
+
| -------- | ------------------------------------------------------- |
|
|
102
|
+
| `Ctrl+C` | Quit application |
|
|
103
|
+
| `Ctrl+?` | Toggle help dialog |
|
|
104
|
+
| `?` | Toggle help dialog (when not in editing mode) |
|
|
105
|
+
| `Ctrl+L` | View logs |
|
|
106
|
+
| `Ctrl+S` | Switch session |
|
|
107
|
+
| `Ctrl+K` | Command dialog |
|
|
108
|
+
| `Ctrl+O` | Toggle model selection dialog |
|
|
109
|
+
| `Ctrl+P` | Toggle provider selection (API key configuration) |
|
|
110
|
+
| `Esc` | Close current overlay/dialog or return to previous mode |
|
|
111
|
+
|
|
112
|
+
### Chat Page Shortcuts
|
|
113
|
+
|
|
114
|
+
| Shortcut | Action |
|
|
115
|
+
| -------- | --------------------------------------- |
|
|
116
|
+
| `Ctrl+N` | Create new session |
|
|
117
|
+
| `Ctrl+X` | Cancel current operation/generation |
|
|
118
|
+
| `i` | Focus editor (when not in writing mode) |
|
|
119
|
+
| `Esc` | Exit writing mode and focus messages |
|
|
120
|
+
|
|
121
|
+
### Editor Shortcuts
|
|
122
|
+
|
|
123
|
+
| Shortcut | Action |
|
|
124
|
+
| ------------------- | ----------------------------------------- |
|
|
125
|
+
| `Ctrl+S` | Send message (when editor is focused) |
|
|
126
|
+
| `Enter` or `Ctrl+S` | Send message (when editor is not focused) |
|
|
127
|
+
| `Ctrl+E` | Open external editor |
|
|
128
|
+
| `Esc` | Blur editor and focus messages |
|
|
129
|
+
|
|
130
|
+
### Session Dialog Shortcuts
|
|
131
|
+
|
|
132
|
+
| Shortcut | Action |
|
|
133
|
+
| ---------- | ---------------- |
|
|
134
|
+
| `↑` or `k` | Previous session |
|
|
135
|
+
| `↓` or `j` | Next session |
|
|
136
|
+
| `Enter` | Select session |
|
|
137
|
+
| `Esc` | Close dialog |
|
|
138
|
+
|
|
139
|
+
### Model Dialog Shortcuts
|
|
140
|
+
|
|
141
|
+
| Shortcut | Action |
|
|
142
|
+
| ---------- | ----------------- |
|
|
143
|
+
| `↑` or `k` | Move up |
|
|
144
|
+
| `↓` or `j` | Move down |
|
|
145
|
+
| `←` or `h` | Previous provider (within model dialog) |
|
|
146
|
+
| `→` or `l` | Next provider (within model dialog) |
|
|
147
|
+
| `Esc` | Close dialog |
|
|
148
|
+
|
|
149
|
+
### Provider & API Key Dialog Shortcuts
|
|
150
|
+
|
|
151
|
+
| Shortcut | Action |
|
|
152
|
+
| -------- | -------------------- |
|
|
153
|
+
| `↑` / `↓` | Move up/down |
|
|
154
|
+
| `Enter` | Select provider |
|
|
155
|
+
| `Esc` | Close dialog |
|
|
156
|
+
| `Enter` | Save API key (input) |
|
|
157
|
+
|
|
158
|
+
### Permission Dialog Shortcuts
|
|
159
|
+
|
|
160
|
+
| Shortcut | Action |
|
|
161
|
+
| ----------------------- | ---------------------------- |
|
|
162
|
+
| `←` or `left` | Switch options left |
|
|
163
|
+
| `→` or `right` or `tab` | Switch options right |
|
|
164
|
+
| `Enter` or `space` | Confirm selection |
|
|
165
|
+
| `a` | Allow permission |
|
|
166
|
+
| `A` | Allow permission for session |
|
|
167
|
+
| `d` | Deny permission |
|
|
168
|
+
|
|
169
|
+
### Logs Page Shortcuts
|
|
170
|
+
|
|
171
|
+
| Shortcut | Action |
|
|
172
|
+
| ------------------ | ------------------- |
|
|
173
|
+
| `Backspace` or `q` | Return to chat page |
|
|
174
|
+
|
|
175
|
+
## Configuration
|
|
176
|
+
|
|
177
|
+
Place `.blu.json` in your home directory (`~/.blu.json`) or project root:
|
|
178
|
+
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"agents": {
|
|
182
|
+
"coder": {
|
|
183
|
+
"model": "claude-3.7-sonnet",
|
|
184
|
+
"maxTokens": 8192,
|
|
185
|
+
"temperature": 0.7
|
|
186
|
+
},
|
|
187
|
+
"summarizer": {
|
|
188
|
+
"model": "gpt-4o-mini",
|
|
189
|
+
"maxTokens": 2048
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"autoCompact": true,
|
|
193
|
+
"mcpServers": {
|
|
194
|
+
"filesystem": {
|
|
195
|
+
"command": "npx",
|
|
196
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed"]
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Supported Models
|
|
203
|
+
|
|
204
|
+
**Anthropic (Claude):**
|
|
205
|
+
- `claude-4.6-opus` - Claude 4.6 Opus (flagship capability)
|
|
206
|
+
- `claude-3.7-sonnet` - Claude 3.7 Sonnet (recommended for coding)
|
|
207
|
+
|
|
208
|
+
**OpenAI:**
|
|
209
|
+
- `gpt-5.3-codex` - GPT-5.3 Codex (latest agentic flagship)
|
|
210
|
+
- `gpt-5.2` - GPT-5.2 (multimodal, fast)
|
|
211
|
+
- `o3-ultra` - O3 Ultra (advanced reasoning)
|
|
212
|
+
|
|
213
|
+
**Google:**
|
|
214
|
+
- `gemini-3-deep-think` - Gemini 3 Deep Think (advanced scientific/engineering)
|
|
215
|
+
- `gemini-3.0-pro` - Gemini 3.0 Pro (multimodal reasoning)
|
|
216
|
+
- `gemini-2.0-flash` - Gemini 2.0 Flash (high speed intelligence)
|
|
217
|
+
|
|
218
|
+
**DeepSeek:**
|
|
219
|
+
- `deepseek-v3.2` - DeepSeek V3.2
|
|
220
|
+
- `deepseek-r1` - DeepSeek R1 (reasoning model)
|
|
221
|
+
|
|
222
|
+
**xAI:**
|
|
223
|
+
- `grok-4.1` - Grok 4.1
|
|
224
|
+
- `grok-4.20` - Grok 4.20 (Enterprise)
|
|
225
|
+
|
|
226
|
+
### Environment Variables
|
|
227
|
+
|
|
228
|
+
| Variable | Purpose |
|
|
229
|
+
|----------|---------|
|
|
230
|
+
| `ANTHROPIC_API_KEY` | Claude API access |
|
|
231
|
+
| `OPENAI_API_KEY` | GPT-4 API access |
|
|
232
|
+
| `GEMINI_API_KEY` | Gemini API access |
|
|
233
|
+
| `BLU_DEBUG=true` | Enable debug logging |
|
|
234
|
+
| `BLU_CONFIG=/path/to/.blu.json` | Custom config location |
|
|
235
|
+
|
|
236
|
+
## Troubleshooting
|
|
237
|
+
|
|
238
|
+
**Blu won't start**
|
|
239
|
+
- Check your API keys are set
|
|
240
|
+
- Verify Go 1.21+ is installed
|
|
241
|
+
- Try `blu --debug` for detailed logs
|
|
242
|
+
|
|
243
|
+
**AI can't see my files**
|
|
244
|
+
- Ensure you're running Blu from your project directory
|
|
245
|
+
- Check file permissions
|
|
246
|
+
- Verify paths in error messages
|
|
247
|
+
|
|
248
|
+
**Context window errors**
|
|
249
|
+
- Enable `autoCompact` in config
|
|
250
|
+
- Start a new session for fresh context
|
|
251
|
+
- Use more concise prompts
|
|
252
|
+
|
|
253
|
+
## Building from Source
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
# Clone the repository
|
|
257
|
+
git clone https://github.com/Get-Blu/blu-code.git
|
|
258
|
+
cd blu-code
|
|
259
|
+
|
|
260
|
+
# Install dependencies
|
|
261
|
+
go mod download
|
|
262
|
+
|
|
263
|
+
# Build
|
|
264
|
+
go build -o blu
|
|
265
|
+
|
|
266
|
+
# Run tests
|
|
267
|
+
go test ./...
|
|
268
|
+
|
|
269
|
+
# Install globally
|
|
270
|
+
sudo mv blu /usr/local/bin/
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
## Contributing
|
|
274
|
+
|
|
275
|
+
Contributions are welcome! Please feel free to submit issues or pull requests.
|
|
276
|
+
|
|
277
|
+
1. Fork the repository
|
|
278
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
279
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
280
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
281
|
+
5. Open a Pull Request
|
|
282
|
+
|
|
283
|
+
## Credits
|
|
284
|
+
|
|
285
|
+
Blu builds on the excellent work of:
|
|
286
|
+
|
|
287
|
+
- **[OpenCode](https://github.com/opencode-ai/opencode)** - The foundation Blu is built upon
|
|
288
|
+
- **[@adamdottv](https://github.com/adamdottv)** - Original OpenCode design and architecture
|
|
289
|
+
- **[@isaacphi](https://github.com/isaacphi)** - LSP integration via `mcp-language-server`
|
|
290
|
+
- **[Bubble Tea](https://github.com/charmbracelet/bubbletea)** - Excellent TUI framework
|
|
291
|
+
|
|
292
|
+
## License
|
|
293
|
+
|
|
294
|
+
Distributed under the **MIT License**. See `LICENSE` for more information.
|
|
295
|
+
|
|
296
|
+
**Created by [Garv Agnihotri](https://github.com/Get-Blu)**
|
package/bin/blu.exe
ADDED
|
Binary file
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const os = process.platform;
|
|
6
|
+
|
|
7
|
+
// Determine the binary name based on the OS
|
|
8
|
+
const binaryName = os === 'win32' ? 'blu.exe' : 'blu';
|
|
9
|
+
const binaryPath = path.join(__dirname, binaryName);
|
|
10
|
+
|
|
11
|
+
// Construct the arguments
|
|
12
|
+
const args = process.argv.slice(2);
|
|
13
|
+
|
|
14
|
+
// Spawn the binary
|
|
15
|
+
const child = spawn(binaryPath, args, { stdio: 'inherit' });
|
|
16
|
+
|
|
17
|
+
child.on('exit', (code) => {
|
|
18
|
+
process.exit(code);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
child.on('error', (err) => {
|
|
22
|
+
console.error(`Failed to start subprocess: ${err}`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@get-blu/blu-code",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Terminal-based AI assistant for software development",
|
|
5
|
+
"bin": {
|
|
6
|
+
"blu": "./bin/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node scripts/install-npm.js"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/Get-Blu/blu-code.git"
|
|
14
|
+
},
|
|
15
|
+
"author": "Get-Blu",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=12.0.0"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"bin",
|
|
22
|
+
"scripts/install-npm.js",
|
|
23
|
+
"README.md",
|
|
24
|
+
"LICENSE"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const https = require('https');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const os = require('os');
|
|
5
|
+
const { version } = require('../package.json');
|
|
6
|
+
|
|
7
|
+
const platform = process.platform;
|
|
8
|
+
const arch = process.arch;
|
|
9
|
+
|
|
10
|
+
// Map OS
|
|
11
|
+
let goos = '';
|
|
12
|
+
let ext = '';
|
|
13
|
+
if (platform === 'win32') {
|
|
14
|
+
goos = 'windows';
|
|
15
|
+
ext = '.exe';
|
|
16
|
+
} else if (platform === 'darwin') {
|
|
17
|
+
goos = 'darwin';
|
|
18
|
+
} else if (platform === 'linux') {
|
|
19
|
+
goos = 'linux';
|
|
20
|
+
} else {
|
|
21
|
+
console.error(`Unsupported OS: ${platform}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Map Architecture
|
|
26
|
+
let goarch = '';
|
|
27
|
+
if (arch === 'x64') {
|
|
28
|
+
goarch = 'amd64';
|
|
29
|
+
} else if (arch === 'arm64') {
|
|
30
|
+
goarch = 'arm64';
|
|
31
|
+
} else {
|
|
32
|
+
console.error(`Unsupported architecture: ${arch}`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Construct URL
|
|
37
|
+
// Artifact names from GitHub Release: blu-code-linux-amd64, blu-code-windows-amd64.exe
|
|
38
|
+
const binName = `blu-code-${goos}-${goarch}${ext}`;
|
|
39
|
+
const url = `https://github.com/Get-Blu/blu-code/releases/download/v${version}/${binName}`;
|
|
40
|
+
|
|
41
|
+
console.log(`Downloading ${url} ...`);
|
|
42
|
+
|
|
43
|
+
const destDir = path.join(__dirname, '..', 'bin');
|
|
44
|
+
if (!fs.existsSync(destDir)) {
|
|
45
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const destFile = path.join(destDir, `blu${ext}`);
|
|
49
|
+
|
|
50
|
+
const file = fs.createWriteStream(destFile);
|
|
51
|
+
|
|
52
|
+
https.get(url, (response) => {
|
|
53
|
+
if (response.statusCode === 302 || response.statusCode === 301) {
|
|
54
|
+
// Handle redirect
|
|
55
|
+
https.get(response.headers.location, (response) => {
|
|
56
|
+
if (response.statusCode !== 200) {
|
|
57
|
+
console.error(`Failed to download binary: ${response.statusCode}`);
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
response.pipe(file);
|
|
61
|
+
file.on('finish', () => {
|
|
62
|
+
file.close();
|
|
63
|
+
console.log(`Download complete: ${destFile}`);
|
|
64
|
+
if (platform !== 'win32') {
|
|
65
|
+
fs.chmodSync(destFile, 0o755);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
} else if (response.statusCode !== 200) {
|
|
70
|
+
console.error(`Failed to download binary: ${response.statusCode}`);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
} else {
|
|
73
|
+
response.pipe(file);
|
|
74
|
+
file.on('finish', () => {
|
|
75
|
+
file.close();
|
|
76
|
+
console.log(`Download complete: ${destFile}`);
|
|
77
|
+
if (platform !== 'win32') {
|
|
78
|
+
fs.chmodSync(destFile, 0o755);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}).on('error', (err) => {
|
|
83
|
+
fs.unlink(destFile, () => { }); // Delete the file async. (But we don't check result)
|
|
84
|
+
console.error(`Error downloading binary: ${err.message}`);
|
|
85
|
+
process.exit(1);
|
|
86
|
+
});
|