feat: 添加命令行参数解析和策略启动功能,支持静默模式和帮助信息

This commit is contained in:
discountry
2025-09-28 01:26:00 +08:00
parent 0e4ae67573
commit 5c1283fac2
4 changed files with 273 additions and 2 deletions
+7 -1
View File
@@ -7,7 +7,13 @@
"dev": "bun run index.ts",
"start": "bun run index.ts",
"test": "bun x vitest run",
"test:watch": "bun x vitest"
"test:watch": "bun x vitest",
"start:trend:silent": "bun run index.ts --strategy trend --silent",
"start:maker:silent": "bun run index.ts --strategy maker --silent",
"start:offset:silent": "bun run index.ts --strategy offset-maker --silent",
"pm2:start:trend": "pm2 start bun --name ritmex-trend --cwd . --restart-delay 5000 -- run index.ts --strategy trend --silent",
"pm2:start:maker": "pm2 start bun --name ritmex-maker --cwd . --restart-delay 5000 -- run index.ts --strategy maker --silent",
"pm2:start:offset": "pm2 start bun --name ritmex-offset --cwd . --restart-delay 5000 -- run index.ts --strategy offset-maker --silent"
},
"devDependencies": {
"@types/bun": "latest",