Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"benchmark": "uv run python benchmarks/scripts/run_eval.py",
"dev": "tsx src/main.ts",
"dev:bun": "bun src/main.ts",
"ui": "tsx scripts/start-ui.ts",
"ui:build": "npm --prefix web-ui run build",
"build": "npm run clean-dist && npm run copy-yaml && npm run compile && npm run build-manifest",
"compile": "tsc --build && node -e \"require('fs').chmodSync('dist/src/main.js', 0o755)\"",
"build-manifest": "tsx src/build-manifest.ts",
Expand Down
27 changes: 27 additions & 0 deletions scripts/start-ui.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { startServer } from '../src/web-ui-server.js';

const port = Number(process.env.PORT) || 3000;

async function main() {
console.log('\x1b[36m%s\x1b[0m', '═══════════════════════════════════════════════════════');
console.log('\x1b[1m\x1b[35m%s\x1b[0m', ' ⚑ WEBCMD AI-AGENT DASHBOARD & BROWSER RUNNER ⚑ ');
console.log('\x1b[36m%s\x1b[0m', '═══════════════════════════════════════════════════════');
console.log('Starting Webcmd Web UI server...');

try {
const info = await startServer(port);
console.log();
console.log('\x1b[32mβœ” Server active:\x1b[0m \x1b[1mhttp://localhost:%d\x1b[0m', info.port);
console.log('\x1b[90m API endpoints:\x1b[0m http://localhost:%d/api/health', info.port);
console.log('\x1b[90m Sessions API:\x1b[0m http://localhost:%d/api/sessions', info.port);
console.log('\x1b[90m Learned Sites:\x1b[0m http://localhost:%d/api/sites', info.port);
console.log('\x1b[90m Workflows:\x1b[0m http://localhost:%d/api/workflows', info.port);
console.log();
console.log('\x1b[33mPress Ctrl+C to stop the Web UI server.\x1b[0m');
} catch (err: any) {
console.error('\x1b[31mFailed to start Web UI server:\x1b[0m', err.message);
process.exit(1);
}
}

main();
Loading