Skip to content

Commit afcc2ac

Browse files
committed
Migrate MCP & CLI interface in the server, leave just wrapper scripts
1 parent 90e9fdf commit afcc2ac

16 files changed

+19
-1720
lines changed

build-setup/build-cli.ts

Lines changed: 0 additions & 80 deletions
This file was deleted.

httptoolkit-ctl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
3+
exec "$SCRIPT_DIR/httptoolkit-server/bin/httptoolkit-server" ctl "$@"

httptoolkit-ctl.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
"%~dp0httptoolkit-server\bin\httptoolkit-server.cmd" ctl %*

httptoolkit-mcp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
3+
exec "$SCRIPT_DIR/httptoolkit-server/bin/httptoolkit-server" mcp "$@"

httptoolkit-mcp.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
"%~dp0httptoolkit-server\bin\httptoolkit-server.cmd" mcp %*

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@
1010
"scripts": {
1111
"postinstall": "electron-builder install-app-deps",
1212
"server:setup": "tsx ./build-setup/setup-server.ts",
13-
"build": "npm run build:src && npm run build:cli && npm run build:electron",
13+
"build": "npm run build:src && npm run build:electron",
1414
"build:src": "tsc",
1515
"postbuild:src": "tsx ./build-setup/strip-preload-map.ts",
1616
"build:electron": "npm run server:setup && electron-builder build --config ./build-setup/electron-builder.config.cjs",
1717
"build:dir-only": "npm run server:setup && electron-builder --dir",
1818
"start": "npm run server:setup && npm run start:app",
1919
"start:dev": "tsx ./build-setup/skip-server.ts && cross-env HTK_DEV=true APP_URL='http://localhost:8080' npm run start:app",
2020
"start:app": "tsc-watch --onSuccess \"electron .\"",
21-
"build:cli": "tsx ./build-setup/build-cli.ts",
22-
"test": "npm run server:setup && npm run build:src && npm run test:unit && npm run build:cli && npm run test:smoke",
23-
"test:unit": "node --experimental-strip-types --import ./test/register-stubs.js --test test/ui-bridge.spec.ts",
24-
"test:smoke": "playwright test"
21+
"test": "npm run server:setup && npm run build:src && playwright test"
2522
},
2623
"keywords": [],
2724
"author": "Tim Perry",
@@ -61,7 +58,8 @@
6158
],
6259
"extraResources": [
6360
"httptoolkit-server/**/*",
64-
"httptoolkit-cli{,.*}"
61+
"httptoolkit-ctl{,.*}",
62+
"httptoolkit-mcp{,.*}"
6563
],
6664
"artifactName": "HttpToolkit-${version}-${arch}.${ext}",
6765
"mac": {

0 commit comments

Comments
 (0)