22
33# 🗡️ Blade Code
44
5- ** Next-Generation AI-Powered Coding Assistant**
5+ ** Next-Generation AI Coding Assistant (CLI) **
66
77[ ![ npm version] ( https://img.shields.io/npm/v/blade-code.svg?style=flat-square )] ( https://www.npmjs.com/package/blade-code )
88[ ![ License] ( https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square )] ( LICENSE )
@@ -17,131 +17,79 @@ English | [简体中文](README.md)
1717
1818## ✨ Key Features
1919
20- - 🤖 ** Intelligent Conversations** - LLM-powered with context understanding and multi-turn dialogues
21- - 🛠️ ** Rich Toolset** - 18+ built-in tools: file operations, code search, shell execution, Git, and more
22- - 🔗 ** MCP Protocol** - Model Context Protocol support for seamless external tool integration
23- - 🎨 ** Modern UI** - React + Ink based terminal UI with Markdown rendering and syntax highlighting
24- - 💾 ** Session Management** - Multi-session, continuation, recovery, and forking support
25- - 🔒 ** Secure & Controllable** - Three-tier permission system (allow/ask/deny), tool whitelisting
20+ - 🤖 ** Smart Chat** - Context-aware, multi-turn collaboration with session continuity
21+ - 🆓 ** Out of the Box** - Built-in free GLM-4.7 model, plus custom models
22+ - 🛠️ ** Rich Tooling** - 20+ built-in tools: file/search/shell/git/web and more
23+ - 🔗 ** Extensible** - MCP, plugins, and Skills system
24+ - 📋 ** Structured Workflows** - Spec / Plan / Subagents
25+ - 🔒 ** Secure Control** - Permission modes: default/autoEdit/plan/yolo + allow/deny lists
26+ - 🎨 ** Modern UI** - React + Ink TUI with Markdown and syntax highlighting
2627
2728---
2829
2930## 🚀 Quick Start
3031
31- ### Try Without Installation
32-
3332``` bash
3433npx blade-code
35- npx blade-code --print " Explain what TypeScript is"
36- ```
3734
38- ### Global Installation
39-
40- ``` bash
4135npm install -g blade-code
4236# or
4337pnpm add -g blade-code
44- ```
45-
46- ### Basic Usage
4738
48- ``` bash
49- blade # Interactive mode
50- blade " Help me analyze this project" # Enter with initial message
51- blade --print " Write a quicksort" # Print mode (for piping)
52- blade --continue # Continue last conversation
39+ blade
40+ blade " Help me analyze this project"
41+ blade --print " Write a quicksort"
5342```
5443
55- > On first run, if no API key is configured, a setup wizard will appear automatically .
44+ > Uses the built-in free model by default; run ` blade ` to configure your own provider .
5645
5746---
5847
59- ## 🔐 Configuration
48+ ## ⚙️ Optional Configuration
6049
61- ### Config File
50+ Config supports global and project scope: ` ~/.blade/config.json ` or ` .blade/config.json ` .
51+ See docs for the full schema.
6252
63- ``` bash
64- mkdir -p ~ /.blade
65- cat > ~ /.blade/config.json << 'EOF '
53+ ``` json
6654{
6755 "provider" : " openai-compatible" ,
68- "apiKey": "your-api-key ",
56+ "apiKey" : " ${BLADE_API_KEY} " ,
6957 "baseUrl" : " https://api.openai.com/v1" ,
70- "model": "gpt-4 "
58+ "model" : " gpt-4o-mini "
7159}
72- EOF
7360```
7461
75- Supports environment variable interpolation: ` "apiKey": "${BLADE_API_KEY}" `
76-
77- ### Get API Keys
78-
79- - ** Qwen** : [ DashScope Console] ( https://dashscope.console.aliyun.com/apiKey )
80- - ** VolcEngine** : [ Volcano Ark Console] ( https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey )
81- - ** OpenAI** : [ OpenAI Platform] ( https://platform.openai.com/api-keys )
82-
8362---
8463
85- ## 💬 Usage Examples
64+ ## 🧰 CLI At a Glance
8665
87- ``` bash
88- # Smart tool invocation
89- blade " List all TypeScript files"
90- blade " Find code containing TODO"
91- blade " Review code in src/utils"
92-
93- # Session management
94- blade --session-id " my-project" " Start new project"
95- blade --resume < id> # Resume session
96- blade --resume < id> --fork-session # Fork session
97-
98- # Security control
99- blade --allowed-tools " Read,Grep" " Read-only operations"
100- blade --permission-mode plan " Plan only, no execution"
101- blade --yolo " Auto-approve all operations"
102- ```
66+ ** Common Commands**
10367
104- ---
105-
106- ## 📚 Command Reference
107-
108- ### Main Commands
109-
110- | Command | Description |
111- | ---------| -------------|
112- | ` blade ` | Start interactive assistant |
113- | ` blade config ` | Configuration management |
114- | ` blade mcp ` | MCP server management |
115- | ` blade doctor ` | System health check |
116- | ` blade update ` | Check for updates |
117-
118- ### Common Options
119-
120- | Option | Short | Description |
121- | --------| -------| -------------|
122- | ` --print ` | ` -p ` | Print response and exit |
123- | ` --continue ` | ` -c ` | Continue recent session |
124- | ` --resume <id> ` | ` -r ` | Resume specific session |
125- | ` --yolo ` | | Auto-approve all operations |
68+ - ` blade ` start interactive UI
69+ - ` blade mcp ` manage MCP servers
70+ - ` blade doctor ` environment check
71+ - ` blade update ` check for updates
72+ - ` blade install ` install a specific version (experimental)
12673
127- ### Slash Commands
74+ ** Common Options **
12875
129- Use in interactive mode: ` /init ` ` /help ` ` /clear ` ` /compact ` ` /context ` ` /agents ` ` /permissions ` ` /mcp ` ` /resume ` ` /theme ` ` /model `
76+ - ` --print/-p ` print mode (pipe-friendly)
77+ - ` --output-format ` output: text/json/stream-json
78+ - ` --permission-mode ` permission mode
79+ - ` --resume/-r ` resume session / ` --session-id ` set session
13080
13181---
13282
13383## 📖 Documentation
13484
135- - ** [ User Docs] ( https://echovic.github.io/blade-doc/#/ ) ** - Installation, configuration, usage guides
136- - ** [ Developer Docs] ( docs/development/ README.md ) ** - Architecture, implementation details
137- - ** [ Contributing Guide] ( CONTRIBUTING.md ) ** - Open source contribution
85+ - ** [ User Docs] ( https://echovic.github.io/blade-doc/#/ ) **
86+ - ** [ Docs entry in repo ] ( docs/README.md ) **
87+ - ** [ Contributing Guide] ( CONTRIBUTING.md ) **
13888
13989---
14090
14191## 🤝 Contributing
14292
143- Contributions welcome! See [ Contributing Guide] ( CONTRIBUTING.md ) .
144-
14593``` bash
14694git clone https://github.com/echoVic/blade-code.git
14795cd blade-code && pnpm install && pnpm dev
@@ -151,20 +99,15 @@ cd blade-code && pnpm install && pnpm dev
15199
152100## 💬 Community
153101
154- Add WeChat ** VIc-Forever** with note "Blade" to join the group.
155-
156- ---
157-
158- ## 💬 Community
159-
160- Add assistant on WeChat ** VIc-Forever** , remark "Blade" to join the group.
102+ Add WeChat ** VIc-Forever** , remark "Blade" to join the group.
161103
162104---
163105
164106## 🔗 Related Resources
165107
166108- [ NPM Package] ( https://www.npmjs.com/package/blade-code )
167- - [ Report Issues] ( https://github.com/echoVic/blade-doc/issues )
109+ - [ Discord Community] ( https://discord.gg/utXDVcv6 ) - Join our Discord server
110+ - [ Report Issues] ( https://github.com/echoVic/blade-code/issues )
168111
169112---
170113
0 commit comments