这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Ignore yarn lockfiles as we support both npm and Bun
yarn.lock
# Keep Bun lockfiles (both binary and text format)
# bun.lockb
# bun.lock

# Build outputs
dist/
Expand Down Expand Up @@ -53,6 +58,9 @@ coverage/
# Optional npm cache directory
.npm

# Bun cache
.bun/

# Optional eslint cache
.eslintcache

Expand All @@ -65,7 +73,7 @@ coverage/
# Optional REPL history
.node_repl_history

# Output of 'npm pack'
# Output of 'npm pack' and 'bun pack'
*.tgz

# Yarn Integrity file
Expand Down
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
src/
tsconfig.json

# Lock files from other package managers
yarn.lock

# Development and build tools
.gitignore
.eslintrc*
Expand Down Expand Up @@ -30,6 +33,12 @@ Thumbs.db
npm-debug.log*
yarn-debug.log*
yarn-error.log*
bun-debug.log*

# Bun specific files
bun.lockb
bun.lock
.bun/

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

## Installation

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

### Global Installation (Recommended)
```bash
bun add -g @vibe-kit/grok-cli
```

Or with npm (fallback):
```bash
npm install -g @vibe-kit/grok-cli
```

### Local Development
```bash
git clone <repository>
cd grok-cli
npm install
npm run build
npm link
bun install
bun run build
bun link
```

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

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

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

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

### Linear Integration Example
Expand Down Expand Up @@ -400,19 +405,19 @@ grok mcp remove server-name

```bash
# Install dependencies
npm install
bun install

# Development mode
npm run dev
bun run dev

# Build project
npm run build
bun run build

# Run linter
npm run lint
bun run lint

# Type check
npm run typecheck
bun run typecheck
```

## Architecture
Expand Down
Loading
Loading