From 3074b38199cb1f9afd4a5b058d44566d80f86207 Mon Sep 17 00:00:00 2001 From: Wenbo Zhao <179686042+wenbo97@users.noreply.github.com> Date: Sat, 17 Jan 2026 12:55:26 +0800 Subject: [PATCH 1/3] Create quick start copilot-api cmd shell; Create quick start claude cli shell; Update Bun download link in readme.md --- README.md | 2 +- package.json | 2 +- start-claude.cmd | 10 ++++++++++ start-copilot-api.cmd | 12 ++++++++++++ start.bat | 20 -------------------- 5 files changed, 24 insertions(+), 22 deletions(-) create mode 100644 start-claude.cmd create mode 100644 start-copilot-api.cmd delete mode 100644 start.bat diff --git a/README.md b/README.md index 884af9cd2..b52955622 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ https://github.com/user-attachments/assets/7654b383-669d-4eb9-b23c-06d7aefee8c5 ## Prerequisites -- Bun (>= 1.2.x) +- Bun (>= 1.2.x) [Bun Installation](https://bun.com/docs/installation#windows) - GitHub account with Copilot subscription (individual, business, or enterprise) ## Installation diff --git a/package.json b/package.json index a5adbb8e7..4a9ff6468 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ ], "scripts": { "build": "tsdown", - "dev": "bun run --watch ./src/main.ts", + "dev": "bun run --watch ./src/main.ts start --trace", "knip": "knip-bun", "lint": "eslint --cache", "lint:all": "eslint --cache .", diff --git a/start-claude.cmd b/start-claude.cmd new file mode 100644 index 000000000..5446f334e --- /dev/null +++ b/start-claude.cmd @@ -0,0 +1,10 @@ +@ECHO OFF + +set ANTHROPIC_BASE_URL=http://localhost:4141 +set ANTHROPIC_AUTH_TOKEN=dummy-key +set ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-4.5 +set ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4.5 +set ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4.5 +call claude + +ECHO Exist claude... \ No newline at end of file diff --git a/start-copilot-api.cmd b/start-copilot-api.cmd new file mode 100644 index 000000000..492e05f58 --- /dev/null +++ b/start-copilot-api.cmd @@ -0,0 +1,12 @@ +@echo off +echo ================================================ +echo GitHub Copilot API Server with Usage Viewer +echo Start Copilot API Server at %~dp0 +echo ================================================ +echo. + +ECHO Starting Copilot-Api service... + +CALL CD /D %~dp0 && npm run dev + +pause diff --git a/start.bat b/start.bat deleted file mode 100644 index 1a0f8cb83..000000000 --- a/start.bat +++ /dev/null @@ -1,20 +0,0 @@ -@echo off -echo ================================================ -echo GitHub Copilot API Server with Usage Viewer -echo ================================================ -echo. - -if not exist node_modules ( - echo Installing dependencies... - bun install - echo. -) - -echo Starting server... -echo The usage viewer page will open automatically after the server starts -echo. - -start "" "https://ericc-ch.github.io/copilot-api?endpoint=http://localhost:4141/usage" -bun run dev - -pause From f46efd6d1efe36dc5ffd6e2cb5f2023cede646e3 Mon Sep 17 00:00:00 2001 From: Wenbo Zhao <179686042+wenbo97@users.noreply.github.com> Date: Sat, 17 Jan 2026 12:58:47 +0800 Subject: [PATCH 2/3] Remove trace option as default --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a9ff6468..345a9546f 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ ], "scripts": { "build": "tsdown", - "dev": "bun run --watch ./src/main.ts start --trace", + "dev": "bun run --watch ./src/main.ts start", "knip": "knip-bun", "lint": "eslint --cache", "lint:all": "eslint --cache .", From 6170c5b793e47022aefd057dc0250b9a41c70337 Mon Sep 17 00:00:00 2001 From: Wenbo Zhao <179686042+wenbo97@users.noreply.github.com> Date: Sat, 17 Jan 2026 13:02:11 +0800 Subject: [PATCH 3/3] Recover start.bat --- start.bat | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 start.bat diff --git a/start.bat b/start.bat new file mode 100644 index 000000000..c621304bd --- /dev/null +++ b/start.bat @@ -0,0 +1,20 @@ +@echo off +echo ================================================ +echo GitHub Copilot API Server with Usage Viewer +echo ================================================ +echo. + +if not exist node_modules ( + echo Installing dependencies... + bun install + echo. +) + +echo Starting server... +echo The usage viewer page will open automatically after the server starts +echo. + +start "" "https://ericc-ch.github.io/copilot-api?endpoint=http://localhost:4141/usage" +bun run dev + +pause \ No newline at end of file