blade-code 0.1.0 → 0.1.2

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/docs/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # 🗡️ Blade Code 用户文档
2
+
3
+ 欢迎使用 Blade Code!这是一款基于 React + Ink 构建的新一代 AI 编程助手命令行工具,支持智能对话、工具调用、多模型切换、权限管理等功能。
4
+
5
+ > 🎉 **v0.1.0 首个开源版本已发布!** 内置免费 GLM-4.7 模型,开箱即用。
6
+
7
+ ## ✨ 核心特性
8
+
9
+ - 🤖 **智能对话** - 基于大语言模型,支持上下文理解和多轮对话
10
+ - 🆓 **开箱即用** - 内置免费 GLM-4.7 模型,无需配置即可体验
11
+ - 🛠️ **丰富工具** - 内置 20+ 工具:文件读写、代码搜索、Shell 执行、Git 操作、网络请求等
12
+ - 🔗 **MCP 协议** - 支持 Model Context Protocol,轻松扩展外部工具
13
+ - 🎨 **现代 UI** - 基于 React + Ink,支持 Markdown 渲染和语法高亮
14
+ - 💾 **会话管理** - 多会话、继续对话、会话恢复、会话 Fork
15
+ - 🔒 **安全可控** - 四级权限模式(default/autoEdit/plan/yolo)、工具白名单、操作确认
16
+ - 📋 **Spec 模式** - 规格驱动开发,结构化工作流
17
+ - 🧠 **Subagents** - 可定制的子代理系统,支持任务分发
18
+ - ⚡ **Skills 系统** - 动态 Prompt 扩展机制
19
+
20
+ ## 🚀 快速开始
21
+
22
+ ```bash
23
+ # 零安装试用(内置免费模型,无需配置)
24
+ npx blade-code
25
+
26
+ # 全局安装
27
+ npm install -g blade-code
28
+
29
+ # 启动交互式界面
30
+ blade
31
+
32
+ # 带首条消息启动
33
+ blade "帮我分析这个项目"
34
+ ```
35
+
36
+ > 首次运行会自动使用内置免费模型 GLM-4.7,也可通过模型配置向导添加自己的 API 密钥。
37
+
38
+ ## 📚 文档导航
39
+
40
+ ### 入门指南
41
+
42
+ - **[安装指南](getting-started/installation.md)** - 详细的安装步骤和环境要求
43
+ - **[快速开始](getting-started/quick-start.md)** - 5 分钟快速上手
44
+
45
+ ### 配置
46
+
47
+ - **[配置系统](configuration/config-system.md)** - 双文件配置体系完整指南
48
+ - **[权限控制](configuration/permissions.md)** - 四级权限模式详解
49
+ - **[主题配置](configuration/themes.md)** - 主题配置和自定义
50
+
51
+ ### 使用指南
52
+
53
+ - **[Slash 命令](guides/slash-commands.md)** - 内置和自定义命令
54
+ - **[Subagents 系统](guides/subagents.md)** - 子代理配置与使用
55
+ - **[Plan 模式](guides/plan-mode.md)** - 只读调研与方案规划
56
+ - **[Spec 模式](guides/spec-mode.md)** - 规格驱动开发工作流
57
+ - **[@ 文件提及](guides/at-file-mentions.md)** - 快速引用项目文件
58
+ - **[Skills 系统](guides/skills.md)** - 动态 Prompt 扩展
59
+ - **[Hooks 系统](guides/hooks.md)** - 工具执行钩子
60
+
61
+ ### 参考
62
+
63
+ - **[CLI 命令](reference/cli-commands.md)** - 命令行参数参考
64
+ - **[工具列表](reference/tool-list.md)** - 所有可用工具
65
+
66
+ ### 其他
67
+
68
+ - **[常见问题](faq.md)** - FAQ
69
+ - **[更新日志](changelog.md)** - 版本历史
70
+
71
+ ## 💬 交流群
72
+
73
+ - [Discord 社区](https://discord.gg/utXDVcv6) - 加入我们的 Discord 服务器
74
+ - 微信群:添加小助手微信 **VIc-Forever**,备注「Blade」拉你进群
75
+
76
+ ## 🔗 相关资源
77
+
78
+ - [官网](https://echovic.github.io/blade-code/#/)
79
+ - [GitHub 仓库](https://github.com/echoVic/blade-code)
80
+ - [NPM 包](https://www.npmjs.com/package/blade-code)
81
+ - [问题反馈](https://github.com/echoVic/blade-doc/issues)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blade-code",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "description": "🗡️ Blade Code - 智能代码助手命令行工具",
6
6
  "type": "module",
@@ -11,8 +11,50 @@
11
11
  "dist",
12
12
  "vendor/ripgrep/**",
13
13
  "README.md",
14
- "CHANGELOG.md"
14
+ "docs/public/changelog.md"
15
15
  ],
16
+ "scripts": {
17
+ "dev": "bun --watch src/blade.tsx",
18
+ "build": "rm -rf dist && bun run scripts/build.ts",
19
+ "start": "bun run dist/blade.js",
20
+ "test": "node scripts/test.js",
21
+ "test:all": "vitest run --config vitest.config.ts",
22
+ "test:unit": "node scripts/test.js unit",
23
+ "test:integration": "node scripts/test.js integration",
24
+ "test:cli": "node scripts/test.js cli",
25
+ "test:coverage": "node scripts/test.js all --coverage",
26
+ "test:unit:coverage": "node scripts/test.js unit --coverage",
27
+ "test:integration:coverage": "node scripts/test.js integration --coverage",
28
+ "test:cli:coverage": "node scripts/test.js cli --coverage",
29
+ "test:watch": "vitest --watch --config vitest.config.ts",
30
+ "test:unit:watch": "vitest --watch --config vitest.config.ts --project unit",
31
+ "test:integration:watch": "vitest --watch --config vitest.config.ts --project integration",
32
+ "test:cli:watch": "vitest --watch --config vitest.config.ts --project cli",
33
+ "test:debug": "node scripts/test.js all --debug",
34
+ "test:verbose": "node scripts/test.js all --verbose",
35
+ "test:ci": "vitest run --config vitest.config.ts --coverage --reporter=verbose",
36
+ "test:performance": "vitest --testNamePattern=\"performance\" --verbose",
37
+ "lint": "biome lint src tests",
38
+ "lint:fix": "biome lint --write src tests",
39
+ "format": "biome format --write src tests",
40
+ "format:check": "biome format src tests",
41
+ "check": "biome check src tests",
42
+ "check:fix": "biome check --write src tests",
43
+ "type-check": "tsc --noEmit",
44
+ "check:full": "npm run type-check && npm run lint && npm run format:check && npm run test:ci",
45
+ "security:audit": "pnpm audit",
46
+ "security:test": "bash scripts/run-security-tests.sh",
47
+ "vendor:ripgrep": "node scripts/download-ripgrep.js",
48
+ "vendor:ripgrep:clean": "rm -rf vendor/ripgrep/darwin-* vendor/ripgrep/linux-* vendor/ripgrep/win32-*",
49
+ "release": "node scripts/release.js",
50
+ "release:dry": "node scripts/release.js --dry-run",
51
+ "release:major": "node scripts/release.js --major",
52
+ "release:minor": "node scripts/release.js --minor",
53
+ "release:patch": "node scripts/release.js --patch",
54
+ "clean": "rm -rf dist node_modules/.cache coverage",
55
+ "prepare": "test -n \"$CI\" || bun run build",
56
+ "preflight": "npm run clean && pnpm install && npm run format && npm run lint && npm run build && npm run type-check && npm run test:ci"
57
+ },
16
58
  "keywords": [
17
59
  "cli",
18
60
  "blade",
@@ -39,15 +81,11 @@
39
81
  "url": "https://github.com/echoVic/blade-code/issues"
40
82
  },
41
83
  "engines": {
42
- "node": ">=16.0.0"
84
+ "node": ">=20.0.0"
43
85
  },
44
86
  "devDependencies": {
45
87
  "@biomejs/biome": "^2.2.4",
46
- "@testing-library/react": "^16.2.0",
47
- "@testing-library/user-event": "^14.5.0",
48
88
  "@types/bun": "^1.3.4",
49
- "@types/diff": "^8.0.0",
50
- "@types/inquirer": "^9.0.8",
51
89
  "@types/json-schema": "^7.0.15",
52
90
  "@types/lodash-es": "^4.17.12",
53
91
  "@types/node": "^22.15.24",
@@ -55,15 +93,12 @@
55
93
  "@types/react": "^19.1.12",
56
94
  "@types/react-dom": "^19.1.9",
57
95
  "@types/semver": "^7.7.1",
58
- "@types/uuid": "^10.0.0",
59
96
  "@types/write-file-atomic": "^4.0.3",
60
97
  "@types/ws": "^8.5.12",
61
98
  "@types/yargs": "^17.0.33",
62
99
  "@vitest/coverage-v8": "^3.0.0",
63
- "execa": "^9.6.0",
64
100
  "jsdom": "^26.0.0",
65
101
  "knip": "^5.80.0",
66
- "ts-node": "^10.9.2",
67
102
  "typescript": "^5.9.2",
68
103
  "vitest": "^3.0.0"
69
104
  },
@@ -84,18 +119,14 @@
84
119
  "chalk": "^5.4.1",
85
120
  "diff": "^8.0.2",
86
121
  "fast-glob": "^3.3.3",
87
- "fullscreen-ink": "^0.1.0",
88
122
  "fuse.js": "^7.1.0",
89
- "glob": "^11.0.3",
90
123
  "gray-matter": "^4.0.3",
91
124
  "ink": "npm:@jrichman/ink@6.4.6",
92
125
  "ink-big-text": "^2.0.0",
93
126
  "ink-gradient": "^3.0.0",
94
- "ink-progress-bar": "^3.0.0",
95
127
  "ink-select-input": "^6.2.0",
96
128
  "ink-spinner": "^5.0.0",
97
129
  "ink-text-input": "^6.0.0",
98
- "inquirer": "^12.6.3",
99
130
  "js-tiktoken": "^1.0.21",
100
131
  "lodash-es": "^4.17.21",
101
132
  "lowlight": "^3.3.0",
@@ -117,46 +148,5 @@
117
148
  "zod": "^3.24.2",
118
149
  "zod-to-json-schema": "^3.24.6",
119
150
  "zustand": "^5.0.9"
120
- },
121
- "scripts": {
122
- "dev": "bun --watch src/blade.tsx",
123
- "build": "rm -rf dist && bun run scripts/build.ts",
124
- "start": "bun run dist/blade.js",
125
- "test": "node scripts/test.js",
126
- "test:all": "vitest run --config vitest.config.ts",
127
- "test:unit": "node scripts/test.js unit",
128
- "test:integration": "node scripts/test.js integration",
129
- "test:cli": "node scripts/test.js cli",
130
- "test:coverage": "node scripts/test.js all --coverage",
131
- "test:unit:coverage": "node scripts/test.js unit --coverage",
132
- "test:integration:coverage": "node scripts/test.js integration --coverage",
133
- "test:cli:coverage": "node scripts/test.js cli --coverage",
134
- "test:watch": "vitest --watch --config vitest.config.ts",
135
- "test:unit:watch": "vitest --watch --config vitest.config.ts --project unit",
136
- "test:integration:watch": "vitest --watch --config vitest.config.ts --project integration",
137
- "test:cli:watch": "vitest --watch --config vitest.config.ts --project cli",
138
- "test:debug": "node scripts/test.js all --debug",
139
- "test:verbose": "node scripts/test.js all --verbose",
140
- "test:ci": "vitest run --config vitest.config.ts --coverage --reporter=verbose",
141
- "test:performance": "vitest --testNamePattern=\"performance\" --verbose",
142
- "lint": "biome lint src tests",
143
- "lint:fix": "biome lint --write src tests",
144
- "format": "biome format --write src tests",
145
- "format:check": "biome format src tests",
146
- "check": "biome check src tests",
147
- "check:fix": "biome check --write src tests",
148
- "type-check": "tsc --noEmit",
149
- "check:full": "npm run type-check && npm run lint && npm run format:check && npm run test:ci",
150
- "security:audit": "pnpm audit",
151
- "security:test": "bash scripts/run-security-tests.sh",
152
- "vendor:ripgrep": "node scripts/download-ripgrep.js",
153
- "vendor:ripgrep:clean": "rm -rf vendor/ripgrep/darwin-* vendor/ripgrep/linux-* vendor/ripgrep/win32-*",
154
- "release": "node scripts/release.js",
155
- "release:dry": "node scripts/release.js --dry-run",
156
- "release:major": "node scripts/release.js --major",
157
- "release:minor": "node scripts/release.js --minor",
158
- "release:patch": "node scripts/release.js --patch",
159
- "clean": "rm -rf dist node_modules/.cache coverage",
160
- "preflight": "npm run clean && pnpm install && npm run format && npm run lint && npm run build && npm run type-check && npm run test:ci"
161
151
  }
162
- }
152
+ }