Skip to content

Latest commit

 

History

History
160 lines (111 loc) · 4.43 KB

File metadata and controls

160 lines (111 loc) · 4.43 KB

🗡️ Blade Code

Next-Generation AI Coding Assistant (CLI + Web UI)

npm version License Node.js Version PRs Welcome

English | 简体中文


📸 Screenshots

Blade Code CLI

CLI Terminal Interface

Blade Code Web UI

Web UI Interface (new in 0.2.0)


✨ Key Features

  • 🤖 Smart Chat - Context-aware, multi-turn collaboration with session continuity
  • 🌐 Dual Interface - CLI terminal + Web UI, switch as you like
  • 🛠️ Rich Tooling - 20+ built-in tools: file/search/shell/git/web and more
  • 🔍 Smart Search - WebSearch with multi-provider fallback (Exa → DuckDuckGo → SearXNG)
  • 🔗 Extensible - MCP, plugins, and Skills system
  • 📋 Structured Workflows - Spec / Plan / Subagents
  • 🔒 Secure Control - Permission modes: default/autoEdit/plan/yolo/spec + allow/deny lists
  • 🎨 Modern UI - React + Ink TUI / React + Vite Web UI

🚀 Quick Start

# Quick try
npx blade-code

# Global install
npm install -g blade-code
# or
pnpm add -g blade-code

# CLI mode
blade
blade "Help me analyze this project"
blade --print "Write a quicksort"
blade --headless "Analyze this repo and propose a refactor"
blade --headless --output-format jsonl "Run the full agent loop in CI"

# Web UI mode (new in 0.2.0)
blade web                    # Start and open browser
blade serve --port 3000      # Headless server mode

Run blade and type /model add to configure your model on first launch.


⚙️ Optional Configuration

Config supports global and project scope: ~/.blade/config.json or .blade/config.json. See docs for the full schema.

{
  "provider": "openai-compatible",
  "apiKey": "${BLADE_API_KEY}",
  "baseUrl": "https://api.openai.com/v1",
  "model": "gpt-4o-mini"
}

🧰 CLI At a Glance

Common Commands

  • blade start interactive CLI
  • blade web start Web UI (new in 0.2.0)
  • blade serve start headless server (new in 0.2.0)
  • blade mcp manage MCP servers
  • blade doctor environment check
  • blade update check for updates

Common Options

  • --print/-p print mode (pipe-friendly)
  • --headless full agent mode without Ink UI, prints streamed events to the terminal
  • --output-format output: text/json/stream-json/jsonl
  • --permission-mode permission mode
  • --resume/-r resume session / --session-id set session

Headless Mode

  • blade --headless "..." runs the full agent loop without the interactive Ink UI
  • default permission mode is yolo, unless explicitly overridden with --permission-mode
  • --output-format jsonl emits a stable machine-friendly event stream for CI, sandbox runs, and tests

📖 Documentation


🤝 Contributing

git clone https://github.com/echoVic/blade-code.git
cd blade-code && pnpm install && pnpm dev

💬 Community

Add WeChat VIc-Forever, remark "Blade" to join the group.


🔗 Related Resources


⭐ Star History

Star History Chart

📄 License

MIT - Made with ❤️ by echoVic