@okx_ai/okx-trade-cli 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +24 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -3
- package/scripts/postinstall.js +0 -14
package/dist/index.js
CHANGED
|
@@ -5739,6 +5739,28 @@ function loadProfileConfig(opts) {
|
|
|
5739
5739
|
});
|
|
5740
5740
|
}
|
|
5741
5741
|
|
|
5742
|
+
// src/tips.ts
|
|
5743
|
+
import { existsSync as existsSync4, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "fs";
|
|
5744
|
+
import { join as join4 } from "path";
|
|
5745
|
+
import { homedir as homedir4 } from "os";
|
|
5746
|
+
function showFirstRunTips(version) {
|
|
5747
|
+
const okxDir = join4(homedir4(), ".okx");
|
|
5748
|
+
const marker = join4(okxDir, ".tips-shown");
|
|
5749
|
+
if (existsSync4(marker)) return;
|
|
5750
|
+
const w = (s) => process.stderr.write(s);
|
|
5751
|
+
w("\n");
|
|
5752
|
+
w(` @okx_ai/okx-trade-cli v${version}
|
|
5753
|
+
`);
|
|
5754
|
+
w(" \u26A0\uFE0F Security Tips: NEVER send API keys in agent chat. Create a dedicated sub-account for your agent. Test on demo before going live.\n");
|
|
5755
|
+
w(" \u26A0\uFE0F \u5B89\u5168\u63D0\u793A\uFF1A\u5207\u52FF\u5728Agent\u5BF9\u8BDD\u4E2D\u53D1\u9001API Key\u3002\u8BF7\u521B\u5EFAAgent\u4E13\u7528\u5B50\u8D26\u6237\u63A5\u5165\u3002\u5148\u5728\u6A21\u62DF\u76D8\u5145\u5206\u6D4B\u8BD5\uFF0C\u518D\u63A5\u5165\u5B9E\u76D8\u3002\n");
|
|
5756
|
+
w("\n");
|
|
5757
|
+
try {
|
|
5758
|
+
mkdirSync4(okxDir, { recursive: true });
|
|
5759
|
+
writeFileSync4(marker, (/* @__PURE__ */ new Date()).toISOString() + "\n");
|
|
5760
|
+
} catch {
|
|
5761
|
+
}
|
|
5762
|
+
}
|
|
5763
|
+
|
|
5742
5764
|
// src/commands/client-setup.ts
|
|
5743
5765
|
import * as fs2 from "fs";
|
|
5744
5766
|
var DETECTABLE_CLIENTS = ["claude-desktop", "cursor", "windsurf"];
|
|
@@ -8241,7 +8263,7 @@ async function cmdDcaSubOrders(run, opts) {
|
|
|
8241
8263
|
// src/index.ts
|
|
8242
8264
|
var _require = createRequire(import.meta.url);
|
|
8243
8265
|
var CLI_VERSION = _require("../package.json").version;
|
|
8244
|
-
var GIT_HASH = true ? "
|
|
8266
|
+
var GIT_HASH = true ? "c49054f" : "dev";
|
|
8245
8267
|
function handleConfigCommand(action, rest, json, lang, force) {
|
|
8246
8268
|
if (action === "init") return cmdConfigInit(lang === "zh" ? "zh" : "en");
|
|
8247
8269
|
if (action === "show") return cmdConfigShow(json);
|
|
@@ -8692,6 +8714,7 @@ function handleBotCommand(run, action, rest, v, json) {
|
|
|
8692
8714
|
if (action === "dca") return handleBotDcaCommand(run, rest[0], v, json);
|
|
8693
8715
|
}
|
|
8694
8716
|
async function main() {
|
|
8717
|
+
showFirstRunTips(CLI_VERSION);
|
|
8695
8718
|
checkForUpdates("@okx_ai/okx-trade-cli", CLI_VERSION);
|
|
8696
8719
|
const { values, positionals } = parseCli(process.argv.slice(2));
|
|
8697
8720
|
if (values.version) {
|