mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 21:05:51 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1071270ce3 | ||
|
|
8399d9ed20 | ||
|
|
513ccc3003 |
@@ -42,8 +42,9 @@
|
||||
```sh
|
||||
bun i -g claude-code-best
|
||||
bun pm -g trust claude-code-best
|
||||
ccb # 直接打开 claude code
|
||||
CLAUDE_BRIDGE_BASE_URL=https://remote-control.claude-code-best.win/ CLAUDE_BRIDGE_OAUTH_TOKEN=test-my-key bun run dev --remote-control # 我们有自部署的远程控制
|
||||
ccb # 以 nodejs 打开 claude code
|
||||
ccb-bun # 以 bun 形态打开
|
||||
CLAUDE_BRIDGE_BASE_URL=https://remote-control.claude-code-best.win/ CLAUDE_BRIDGE_OAUTH_TOKEN=test-my-key ccb --remote-control # 我们有自部署的远程控制
|
||||
```
|
||||
|
||||
## ⚡ 快速开始(源码版)
|
||||
|
||||
16
build.ts
16
build.ts
@@ -36,7 +36,7 @@ const DEFAULT_BUILD_FEATURES = [
|
||||
'CONTEXT_COLLAPSE',
|
||||
'MONITOR_TOOL',
|
||||
'FORK_SUBAGENT',
|
||||
'UDS_INBOX',
|
||||
// 'UDS_INBOX',
|
||||
'KAIROS',
|
||||
'COORDINATOR_MODE',
|
||||
'LAN_PIPES',
|
||||
@@ -112,3 +112,17 @@ if (!rgScript.success) {
|
||||
} else {
|
||||
console.log(`Bundled download-ripgrep script to ${outdir}/`)
|
||||
}
|
||||
|
||||
// Step 6: Generate cli-bun and cli-node executable entry points
|
||||
const cliBun = join(outdir, 'cli-bun.js')
|
||||
const cliNode = join(outdir, 'cli-node.js')
|
||||
|
||||
await writeFile(cliBun, '#!/usr/bin/env bun\nimport "./cli.js"\n')
|
||||
await writeFile(cliNode, '#!/usr/bin/env node\nimport "./cli.js"\n')
|
||||
|
||||
// Make both executable
|
||||
const { chmodSync } = await import('fs')
|
||||
chmodSync(cliBun, 0o755)
|
||||
chmodSync(cliNode, 0o755)
|
||||
|
||||
console.log(`Generated ${cliBun} (shebang: bun) and ${cliNode} (shebang: node)`)
|
||||
|
||||
11
package.json
11
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "claude-code-best",
|
||||
"version": "1.2.1",
|
||||
"version": "1.3.2",
|
||||
"description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal",
|
||||
"type": "module",
|
||||
"author": "claude-code-best <claude-code-best@proton.me>",
|
||||
@@ -25,8 +25,9 @@
|
||||
"bun": ">=1.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"ccb": "dist/cli.js",
|
||||
"claude-code-best": "dist/cli.js"
|
||||
"ccb": "dist/cli-node.js",
|
||||
"ccb-bun": "dist/cli-bun.js",
|
||||
"claude-code-best": "dist/cli-node.js"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*",
|
||||
@@ -34,8 +35,8 @@
|
||||
],
|
||||
"files": [
|
||||
"dist",
|
||||
"scripts/download-ripgrep.ts",
|
||||
"scripts/postinstall.cjs"
|
||||
"scripts/postinstall.cjs",
|
||||
"scripts/setup-chrome-mcp.mjs"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "bun run build.ts",
|
||||
|
||||
@@ -9,18 +9,11 @@
|
||||
*/
|
||||
|
||||
import { execFileSync } from "node:child_process";
|
||||
import { createRequire } from "node:module";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const cliPath = join(
|
||||
__dirname,
|
||||
"..",
|
||||
"node_modules",
|
||||
"mcp-chrome-bridge",
|
||||
"dist",
|
||||
"cli.js",
|
||||
);
|
||||
const require = createRequire(import.meta.url);
|
||||
const cliPath = require.resolve("mcp-chrome-bridge/dist/cli.js");
|
||||
|
||||
const userArgs = process.argv.slice(2);
|
||||
|
||||
|
||||
@@ -336,14 +336,15 @@ export const PermissionResultSchema = lazySchema(() =>
|
||||
|
||||
export const PermissionModeSchema = lazySchema(() =>
|
||||
z
|
||||
.enum(['default', 'acceptEdits', 'bypassPermissions', 'plan', 'dontAsk'])
|
||||
.enum(['default', 'acceptEdits', 'bypassPermissions', 'plan', 'dontAsk', 'auto'])
|
||||
.describe(
|
||||
'Permission mode for controlling how tool executions are handled. ' +
|
||||
"'default' - Standard behavior, prompts for dangerous operations. " +
|
||||
"'acceptEdits' - Auto-accept file edit operations. " +
|
||||
"'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). " +
|
||||
"'plan' - Planning mode, no actual tool execution. " +
|
||||
"'dontAsk' - Don't prompt for permissions, deny if not pre-approved.",
|
||||
"'dontAsk' - Don't prompt for permissions, deny if not pre-approved. " +
|
||||
"'auto' - Automatic mode (transcript classifier).",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -2276,6 +2276,9 @@ async function run(): Promise<CommanderCommand> {
|
||||
type: "http",
|
||||
url: "http://127.0.0.1:12306/mcp",
|
||||
scope: "dynamic",
|
||||
"headers": {
|
||||
"Authorization": "Bearer my-static-token",
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user