Skip to content

Commit 9180c4b

Browse files
authored
fix: migrate to bun (#78)
* Convert to ES and install with bun * Delete package-lock.json * Update README with bun info * Update .gitignore * Update .npmignore * Bump version * Unignore package lock
1 parent 7a7f197 commit 9180c4b

File tree

7 files changed

+1343
-250
lines changed

7 files changed

+1343
-250
lines changed

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ node_modules/
33
npm-debug.log*
44
yarn-debug.log*
55
yarn-error.log*
6+
# Ignore yarn lockfiles as we support both npm and Bun
7+
yarn.lock
8+
# Keep Bun lockfiles (both binary and text format)
9+
# bun.lockb
10+
# bun.lock
611

712
# Build outputs
813
dist/
@@ -53,6 +58,9 @@ coverage/
5358
# Optional npm cache directory
5459
.npm
5560

61+
# Bun cache
62+
.bun/
63+
5664
# Optional eslint cache
5765
.eslintcache
5866

@@ -65,7 +73,7 @@ coverage/
6573
# Optional REPL history
6674
.node_repl_history
6775

68-
# Output of 'npm pack'
76+
# Output of 'npm pack' and 'bun pack'
6977
*.tgz
7078

7179
# Yarn Integrity file

.npmignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
src/
33
tsconfig.json
44

5+
# Lock files from other package managers
6+
yarn.lock
7+
58
# Development and build tools
69
.gitignore
710
.eslintrc*
@@ -30,6 +33,12 @@ Thumbs.db
3033
npm-debug.log*
3134
yarn-debug.log*
3235
yarn-error.log*
36+
bun-debug.log*
37+
38+
# Bun specific files
39+
bun.lockb
40+
bun.lock
41+
.bun/
3342

3443
# Environment files
3544
.env*

README.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,32 @@ A conversational AI CLI tool powered by Grok with intelligent text editor capabi
1313
- **🚀 Morph Fast Apply**: Optional high-speed code editing at 4,500+ tokens/sec with 98% accuracy
1414
- **🔌 MCP Tools**: Extend capabilities with Model Context Protocol servers (Linear, GitHub, etc.)
1515
- **💬 Interactive UI**: Beautiful terminal interface built with Ink
16-
- **🌍 Global Installation**: Install and use anywhere with `npm i -g @vibe-kit/grok-cli`
16+
- **🌍 Global Installation**: Install and use anywhere with `bun add -g @vibe-kit/grok-cli`
1717

1818
## Installation
1919

2020
### Prerequisites
21-
- Node.js 16+
21+
- Bun 1.0+ (or Node.js 18+ as fallback)
2222
- Grok API key from X.AI
2323
- (Optional, Recommended) Morph API key for Fast Apply editing
2424

2525
### Global Installation (Recommended)
2626
```bash
27+
bun add -g @vibe-kit/grok-cli
28+
```
29+
30+
Or with npm (fallback):
31+
```bash
2732
npm install -g @vibe-kit/grok-cli
2833
```
2934

3035
### Local Development
3136
```bash
3237
git clone <repository>
3338
cd grok-cli
34-
npm install
35-
npm run build
36-
npm link
39+
bun install
40+
bun run build
41+
bun link
3742
```
3843

3944
## Setup
@@ -208,7 +213,7 @@ Process a single prompt and exit (useful for scripting and automation):
208213
```bash
209214
grok --prompt "show me the package.json file"
210215
grok -p "create a new file called example.js with a hello world function"
211-
grok --prompt "run npm test and show me the results" --directory /path/to/project
216+
grok --prompt "run bun test and show me the results" --directory /path/to/project
212217
grok --prompt "complex task" --max-tool-rounds 50 # Limit tool usage for faster execution
213218
```
214219

@@ -348,7 +353,7 @@ Grok CLI supports MCP (Model Context Protocol) servers, allowing you to extend t
348353
#### Add a custom MCP server:
349354
```bash
350355
# Add an stdio-based MCP server
351-
grok mcp add my-server --transport stdio --command "node" --args server.js
356+
grok mcp add my-server --transport stdio --command "bun" --args server.js
352357

353358
# Add an HTTP-based MCP server
354359
grok mcp add my-server --transport http --url "http://localhost:3000"
@@ -359,7 +364,7 @@ grok mcp add my-server --transport stdio --command "python" --args "-m" "my_mcp_
359364

360365
#### Add from JSON configuration:
361366
```bash
362-
grok mcp add-json my-server '{"command": "node", "args": ["server.js"], "env": {"API_KEY": "your_key"}}'
367+
grok mcp add-json my-server '{"command": "bun", "args": ["server.js"], "env": {"API_KEY": "your_key"}}'
363368
```
364369

365370
### Linear Integration Example
@@ -400,19 +405,19 @@ grok mcp remove server-name
400405

401406
```bash
402407
# Install dependencies
403-
npm install
408+
bun install
404409

405410
# Development mode
406-
npm run dev
411+
bun run dev
407412

408413
# Build project
409-
npm run build
414+
bun run build
410415

411416
# Run linter
412-
npm run lint
417+
bun run lint
413418

414419
# Type check
415-
npm run typecheck
420+
bun run typecheck
416421
```
417422

418423
## Architecture

0 commit comments

Comments
 (0)