mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 22:05:50 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1071270ce3 | ||
|
|
8399d9ed20 | ||
|
|
513ccc3003 |
@@ -42,8 +42,9 @@
|
|||||||
```sh
|
```sh
|
||||||
bun i -g claude-code-best
|
bun i -g claude-code-best
|
||||||
bun pm -g trust claude-code-best
|
bun pm -g trust claude-code-best
|
||||||
ccb # 直接打开 claude code
|
ccb # 以 nodejs 打开 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-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',
|
'CONTEXT_COLLAPSE',
|
||||||
'MONITOR_TOOL',
|
'MONITOR_TOOL',
|
||||||
'FORK_SUBAGENT',
|
'FORK_SUBAGENT',
|
||||||
'UDS_INBOX',
|
// 'UDS_INBOX',
|
||||||
'KAIROS',
|
'KAIROS',
|
||||||
'COORDINATOR_MODE',
|
'COORDINATOR_MODE',
|
||||||
'LAN_PIPES',
|
'LAN_PIPES',
|
||||||
@@ -112,3 +112,17 @@ if (!rgScript.success) {
|
|||||||
} else {
|
} else {
|
||||||
console.log(`Bundled download-ripgrep script to ${outdir}/`)
|
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",
|
"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",
|
"description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"author": "claude-code-best <claude-code-best@proton.me>",
|
"author": "claude-code-best <claude-code-best@proton.me>",
|
||||||
@@ -25,8 +25,9 @@
|
|||||||
"bun": ">=1.2.0"
|
"bun": ">=1.2.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"ccb": "dist/cli.js",
|
"ccb": "dist/cli-node.js",
|
||||||
"claude-code-best": "dist/cli.js"
|
"ccb-bun": "dist/cli-bun.js",
|
||||||
|
"claude-code-best": "dist/cli-node.js"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
@@ -34,8 +35,8 @@
|
|||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
"scripts/download-ripgrep.ts",
|
"scripts/postinstall.cjs",
|
||||||
"scripts/postinstall.cjs"
|
"scripts/setup-chrome-mcp.mjs"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "bun run build.ts",
|
"build": "bun run build.ts",
|
||||||
|
|||||||
@@ -9,18 +9,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { execFileSync } from "node:child_process";
|
import { execFileSync } from "node:child_process";
|
||||||
|
import { createRequire } from "node:module";
|
||||||
import { dirname, join } from "node:path";
|
import { dirname, join } from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const require = createRequire(import.meta.url);
|
||||||
const cliPath = join(
|
const cliPath = require.resolve("mcp-chrome-bridge/dist/cli.js");
|
||||||
__dirname,
|
|
||||||
"..",
|
|
||||||
"node_modules",
|
|
||||||
"mcp-chrome-bridge",
|
|
||||||
"dist",
|
|
||||||
"cli.js",
|
|
||||||
);
|
|
||||||
|
|
||||||
const userArgs = process.argv.slice(2);
|
const userArgs = process.argv.slice(2);
|
||||||
|
|
||||||
|
|||||||
@@ -336,14 +336,15 @@ export const PermissionResultSchema = lazySchema(() =>
|
|||||||
|
|
||||||
export const PermissionModeSchema = lazySchema(() =>
|
export const PermissionModeSchema = lazySchema(() =>
|
||||||
z
|
z
|
||||||
.enum(['default', 'acceptEdits', 'bypassPermissions', 'plan', 'dontAsk'])
|
.enum(['default', 'acceptEdits', 'bypassPermissions', 'plan', 'dontAsk', 'auto'])
|
||||||
.describe(
|
.describe(
|
||||||
'Permission mode for controlling how tool executions are handled. ' +
|
'Permission mode for controlling how tool executions are handled. ' +
|
||||||
"'default' - Standard behavior, prompts for dangerous operations. " +
|
"'default' - Standard behavior, prompts for dangerous operations. " +
|
||||||
"'acceptEdits' - Auto-accept file edit operations. " +
|
"'acceptEdits' - Auto-accept file edit operations. " +
|
||||||
"'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). " +
|
"'bypassPermissions' - Bypass all permission checks (requires allowDangerouslySkipPermissions). " +
|
||||||
"'plan' - Planning mode, no actual tool execution. " +
|
"'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",
|
type: "http",
|
||||||
url: "http://127.0.0.1:12306/mcp",
|
url: "http://127.0.0.1:12306/mcp",
|
||||||
scope: "dynamic",
|
scope: "dynamic",
|
||||||
|
"headers": {
|
||||||
|
"Authorization": "Bearer my-static-token",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user